ChatMessage
Chat message model
Properties
| Property | Type | Required | Description |
|---|---|---|---|
role | string | β Yes | Message role: 'user' or 'assistant' |
content | string | β Yes | Message content |
Example
{
"role": "example",
"content": "example"
}Used In
Not used in any documented endpoints.
Code Examples
TypeScript
interface ChatMessage {
role: string;
content: string;
}
// Usage example
const data: ChatMessage = {
"role": "example",
"content": "example"
};Python
from data_layer.schemas import ChatMessage
# Create instance
data = ChatMessage(
# 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 '{ "role": "example", "content": "example" }'Validation Rules
Required Fields: role, content
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.