initial commit

This commit is contained in:
ipu 2025-07-25 14:01:16 +03:00
commit aaba8753ef
36 changed files with 3682 additions and 0 deletions

56
src/api/v1/models.py Normal file
View file

@ -0,0 +1,56 @@
from pydantic import BaseModel, Field
from typing import Optional, List, Dict, Any
class InsuranceChatRequest(BaseModel):
message: str = Field(..., description="User message")
session_id: Optional[str] = Field(None, description="Chat session ID")
class Source(BaseModel):
plan_name: str
chunk_number: int
content_chunk: str
class HistoryItem(BaseModel):
role: str
message: str
class InsuranceChatResponse(BaseModel):
session_id: str
answer: str
sources: List[Source] = []
history: List[HistoryItem] = []
class EstimationRequest(BaseModel):
uid: str = Field(..., description="Application unique identifier")
applicants: List[Dict[str, Any]] = Field(..., description="List of applicants")
plans: List[Dict[str, Any]] = Field(..., description="List of insurance plans")
phq: Dict[str, Any] = Field(..., description="Personal Health Questionnaire data")
income: Optional[float] = Field(0, description="Annual income")
address: Optional[Dict[str, Any]] = Field({}, description="Address information")
class EstimationResponse(BaseModel):
uid: str
status: str
data: Dict[str, Any]
external: Optional[Dict[str, Any]] = None
class SessionCreateResponse(BaseModel):
session_id: str
class SessionResponse(BaseModel):
id: str
organization_id: Optional[str] = None
agent_id: Optional[str] = None
created_at: Optional[str] = None
class SessionsListResponse(BaseModel):
sessions: List[SessionResponse]
class AgentsListResponse(BaseModel):
agents: List[Dict[str, Any]]
class HealthResponse(BaseModel):
status: str
service: str
version: str
dependencies: Dict[str, str]