-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conversation
There was a problem hiding this 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
services/APIService/main.py
Outdated
app = FastAPI(debug=True) | ||
app = FastAPI( | ||
debug=True, | ||
title="ARA API Service", |
There was a problem hiding this comment.
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
services/APIService/main.py
Outdated
@@ -643,6 +661,57 @@ async def delete_saved_podcast( | |||
) | |||
|
|||
|
|||
@app.post("/rag") | |||
async def rag( | |||
payload: dict, |
There was a problem hiding this comment.
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?
services/APIService/main.py
Outdated
""" | ||
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"]): |
There was a problem hiding this comment.
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
services/APIService/main.py
Outdated
@@ -643,6 +661,57 @@ async def delete_saved_podcast( | |||
) | |||
|
|||
|
|||
@app.post("/rag") | |||
async def rag( |
There was a problem hiding this comment.
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.
All good comments. Will address |
No description provided.