RagQueryResponse
RAG query response model
Properties
| Property | Type | Required | Description |
|---|---|---|---|
query | string | β Yes | - |
answer | string | β Yes | - |
citations | array | β Yes | - |
documents_found | integer | β Yes | - |
processing_time_ms | integer | β Yes | - |
timestamp | string | β Yes | - |
Example
{
"query": "example",
"answer": "example",
"citations": [],
"documents_found": 0,
"processing_time_ms": 0,
"timestamp": "example"
}Used In
Code Examples
TypeScript
interface RagQueryResponse {
query: string;
answer: string;
citations: Record<string, any>[];
documents_found: number;
processing_time_ms: number;
timestamp: string;
}
// Usage example
const data: RagQueryResponse = {
"query": "example",
"answer": "example",
"citations": [],
"documents_found": 0,
"processing_time_ms": 0,
"timestamp": "example"
};Python
from data_layer.schemas import RagQueryResponse
# Create instance
data = RagQueryResponse(
# Add your field values here
)cURL
curl -X POST "https://altsportsleagues-backend-2qcdjegnaa-uc.a.run.app/api/endpoint" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{ "query": "example", "answer": "example", "citations": [], "documents_found": 0, "processing_time_ms": 0, "timestamp": "example" }'Validation Rules
Required Fields: query, answer, citations, documents_found, processing_time_ms, timestamp
Additional Information
- Type: object
- Source: Generated from Pydantic models in
data_layer/schemas/ - Auto-validated: All fields are validated by FastAPI
This documentation is auto-generated from the OpenAPI specification.