Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] rag: connecting nv-ingest to TJ #40

Merged
merged 14 commits into from
Nov 19, 2024
Merged

[WIP] rag: connecting nv-ingest to TJ #40

merged 14 commits into from
Nov 19, 2024

Conversation

ishandhanani
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@aw632 aw632 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, left minor comments. Overall nit is to use use_vector_db for the bool arguments instead of vdb

app = FastAPI(debug=True)
app = FastAPI(
debug=True,
title="ARA API Service",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They want us to call it AIRA now for AI Research Assistant

@@ -643,6 +661,57 @@ async def delete_saved_podcast(
)


@app.post("/rag")
async def rag(
payload: dict,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: can we add typing for this payload instead of dict?

"""
with telemetry.tracer.start_as_current_span("api.rag") as span:
# Validate required fields
if not all(key in payload for key in ["query", "k", "job_id"]):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pydantic typing would also remove this part

@@ -643,6 +661,57 @@ async def delete_saved_podcast(
)


@app.post("/rag")
async def rag(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: we should call this query_vector_db or something similar, since this endpoint isn't actually generating anything.

@ishandhanani
Copy link
Collaborator Author

All good comments. Will address

@ishandhanani ishandhanani merged commit fe85e77 into main Nov 19, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants