debug estimation request
This commit is contained in:
parent
25f091d02c
commit
f873b7e710
2 changed files with 7 additions and 3 deletions
|
|
@ -78,12 +78,16 @@ async def init_chat(request: models.InitializeChatRequest):
|
|||
async def estimate(request: models.EstimationRequest):
|
||||
"""Handle insurance estimation requests"""
|
||||
try:
|
||||
if not request.applicants or not request.plans:
|
||||
if not request.applicants:
|
||||
raise HTTPException(
|
||||
status_code=400,
|
||||
detail="Missing required applicants or plans"
|
||||
)
|
||||
|
||||
|
||||
print("estimation request: ", request)
|
||||
if not request.plans:
|
||||
request.plans = list()
|
||||
|
||||
estimation_service = EstimationService()
|
||||
estimation_response = await estimation_service.estimate_insurance(request.applicants, request.phq, request.plans, request.coverage)
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ class EstimationRequest(BaseModel):
|
|||
userId: str | int | None = Field(None, description="Unique identifier")
|
||||
coverage: int = 1
|
||||
applicants: List[Applicant]
|
||||
plans: List[Plan]
|
||||
plans: List[Plan] | None = None
|
||||
phq: PHQ
|
||||
income: float
|
||||
address: Address
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue