This commit is contained in:
2025-09-26 17:15:54 +08:00
commit db0e5965ec
211 changed files with 40437 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
from typing import Dict, Any, Optional
from pydantic import BaseModel
class UserMessage(BaseModel):
content: str
timestamp: Optional[str] = None
class AssistantMessage(BaseModel):
content: str
citations_mapping_csv: Optional[str] = None
timestamp: Optional[str] = None
class ToolMessage(BaseModel):
tool_name: str
tool_call_id: str
content: str # Usually JSON string of results
timestamp: Optional[str] = None
class ChatRequest(BaseModel):
session_id: str
messages: list[Dict[str, Any]]
client_hints: Optional[Dict[str, Any]] = None
class ChatResponse(BaseModel):
"""Base response for non-streaming endpoints"""
answer: str
citations_mapping_csv: str
tool_results: list[Dict[str, Any]]
session_id: str