v6
latestOpenAPI 3.1.02026-08-08111207269.5 KBchat
Chat
Chat endpoint using LiteLLM with GitHub Copilot and optional RAG.
This endpoint requires the user to be authenticated with both Extralit and GitHub (via the /auth/github/login flow).
If dataset_id is provided, the endpoint will perform RAG retrieval:
- Generate embedding for the user's query
- Search for relevant documents in the dataset
- Inject retrieved context into the system prompt
Args: request: Chat request with model, messages, and optional dataset_id current_user: Authenticated Extralit user db: Database session (injected for RAG) search_engine: Search engine instance (injected for RAG)
Returns: StreamingResponse with chat completion
Raises: HTTPException: If user is not authenticated with GitHub
post/chat
Request body
Response
Successful Response
{"stackTrail":"paths:/chat:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}