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

Feature/change eval to post #234

Merged
merged 2 commits into from
Mar 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions r2r/main/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ async def rag_completion(
"settings": query.settings.rag_settings.dict(),
}
background_tasks.add_task(
requests.get, f"{url}/eval", json=payload
requests.post, f"{url}/eval", json=payload
)

return rag_completion
Expand Down Expand Up @@ -325,7 +325,7 @@ async def _stream_rag_completion(
f"Performing evaluation with payload: {payload} to url: {url}/eval"
)
background_tasks.add_task(
requests.get, f"{url}/eval", json=payload
requests.post, f"{url}/eval", json=payload
)

return StreamingResponse(
Expand All @@ -338,7 +338,7 @@ async def _stream_rag_completion(
)
raise HTTPException(status_code=500, detail=str(e))

@app.get("/eval")
@app.post("/eval")
async def eval(payload: EvalPayloadModel):
try:
query = payload.query
Expand Down