Skip to content

Commit

Permalink
upsert document info infront of hatchet
Browse files Browse the repository at this point in the history
  • Loading branch information
emrgnt-cmplxty committed Jan 11, 2025
1 parent 8be9af4 commit 74cc1b4
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions py/core/main/api/v3/documents_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,6 @@ async def create_document(
),
}

# TODO - Modify create_chunks so that we can add chunks to existing document

if run_with_orchestration:
# Run ingestion with orchestration
raw_message = (
Expand Down Expand Up @@ -537,6 +535,21 @@ async def create_document(
)

if run_with_orchestration:
# TODO - Modify create_chunks so that we can add chunks to existing document
document_info = (
self.services.ingestion._create_document_info_from_file(
document_id,
auth_user,
file_name,
workflow_input["metadata"],
"v0",
workflow_input["size_in_bytes"],
)
)
await self.providers.database.documents_handler.upsert_documents_overview(
document_info
)

raw_message: dict[str, str | None] = await self.providers.orchestration.run_workflow( # type: ignore
"ingest-files",
{"request": workflow_input},
Expand Down

0 comments on commit 74cc1b4

Please sign in to comment.