Skip to content

Commit

Permalink
Fix validation response error for update files
Browse files Browse the repository at this point in the history
  • Loading branch information
NolanTrem committed Oct 5, 2024
1 parent bbd0587 commit 6445b4a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion js/sdk/__tests__/r2rClientIntegrationSuperUser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ describe("r2rClient Integration Tests", () => {
).resolves.not.toThrow();
});

// TOOD: Fix in R2R, table logs has no column named run_id
test("Agentic RAG response with streaming", async () => {
const messages = [
{ role: "system", content: "You are a helpful assistant." },
Expand Down
4 changes: 3 additions & 1 deletion py/core/main/api/ingestion_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,13 @@ async def update_files_app(
"is_update": True,
}

raw_message = await self.orchestration_provider.run_workflow(
raw_message: dict[str, Union[str, None]] = await self.orchestration_provider.run_workflow( # type: ignore
"update-files", {"request": workflow_input}, {}
)
raw_message["message"] = "Update task queued successfully."
raw_message["document_ids"] = workflow_input["document_ids"]
if "task_id" not in raw_message:
raw_message["task_id"] = None
return raw_message # type: ignore

ingest_chunks_extras = self.openapi_extras.get("ingest_chunks", {})
Expand Down
2 changes: 1 addition & 1 deletion py/shared/api/models/ingestion/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class UpdateResponse(BaseModel):
...,
description="A message describing the result of the ingestion request.",
)
task_id: UUID = Field(
task_id: Optional[UUID] = Field(
...,
description="The task ID of the ingestion request.",
)
Expand Down

0 comments on commit 6445b4a

Please sign in to comment.