Base URL: http://34.100.218.51:8000
GET /health
Returns service status.
- 200
application/json- Body:
{"status":"ok"}
- Body:
Example:
curl -sS http://34.100.218.51:8000/healthPOST /rag/med/retrieve
Runs the medical RAG pipeline and returns a single JSON response.
Request (application/json)
{
"query": "What are the symptoms of appendicitis?",
"session_id": "demo-session-1"
}Response
- 200
application/json- Body:
{ "response": "<ai_answer>" }
- Body:
- 400
application/json(query must be a meaningful question; at least two words)- Body:
{"error":"Query must be a meaningful medical question (at least two words)."}
- Body:
- 500
application/json- Body:
{"error":"<exception message>"}
- Body:
Example:
curl -sS -X POST http://34.100.218.51:8000/rag/med/retrieve \
-H 'Content-Type: application/json' \
-d '{"query":"What are the symptoms of appendicitis?","session_id":"demo-session-1"}'POST /rag/med/retrieve/stream
Runs the medical RAG pipeline and streams the answer as plain text.
Request (application/json)
{
"query": "Explain the difference between type 1 and type 2 diabetes.",
"session_id": "demo-session-1"
}Response
- 200
text/plain(streamed) - 400/500
application/jsonwith the same error shapes as/rag/med/retrieve
Example (streaming):
curl -N -X POST http://34.100.218.51:8000/rag/med/retrieve/stream \
-H 'Content-Type: application/json' \
-d '{"query":"Explain the difference between type 1 and type 2 diabetes.","session_id":"demo-session-1"}'uvicorn main:app --host 0.0.0.0 --port 8000