SportsIntelligenceResponse
Response model for sports intelligence chat
Properties
| Property | Type | Required | Description |
|---|---|---|---|
response | string | β Yes | AI response to the query |
query_type | string | β Yes | Type of query processed |
workflow_triggered | object | β No | Workflow that was triggered |
data_sources | object | β No | Data sources used |
confidence | number | β Yes | Confidence score of the response |
follow_up_actions | object | β No | Suggested follow-up actions |
metadata | object | β No | Additional metadata |
credits_used | number | β Yes | Credits consumed for this query |
credits_remaining | number | β Yes | User's remaining credits |
insufficient_credits | boolean | β No | Whether user has insufficient credits |
Example
{
"response": "example",
"query_type": "example",
"workflow_triggered": {},
"data_sources": {},
"confidence": 0,
"follow_up_actions": {},
"metadata": {},
"credits_used": 0,
"credits_remaining": 0,
"insufficient_credits": false
}Used In
Code Examples
TypeScript
interface SportsIntelligenceResponse {
response: string;
query_type: string;
workflow_triggered?: any;
data_sources?: any;
confidence: number;
follow_up_actions?: any;
metadata?: any;
credits_used: number;
credits_remaining: number;
insufficient_credits?: boolean;
}
// Usage example
const data: SportsIntelligenceResponse = {
"response": "example",
"query_type": "example",
"workflow_triggered": {},
"data_sources": {},
"confidence": 0,
"follow_up_actions": {},
"metadata": {},
"credits_used": 0,
"credits_remaining": 0,
"insufficient_credits": false
};Python
from data_layer.schemas import SportsIntelligenceResponse
# Create instance
data = SportsIntelligenceResponse(
# 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 '{ "response": "example", "query_type": "example", "workflow_triggered": {}, "data_sources": {}, "confidence": 0, "follow_up_actions": {}, "metadata": {}, "credits_used": 0, "credits_remaining": 0, "insufficient_credits": false }'Validation Rules
Required Fields: response, query_type, confidence, credits_used, credits_remaining
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.