add request copy to estimation response
This commit is contained in:
parent
ee1bb20d54
commit
0d1bf3f1ac
2 changed files with 7 additions and 0 deletions
|
|
@ -40,6 +40,12 @@ async def estimate(request: models.EstimationRequest):
|
|||
|
||||
estimation_service = EstimationService()
|
||||
estimation_response = await estimation_service.estimate_insurance(request.applicants, request.phq, request.plans)
|
||||
estimation_response.request = request
|
||||
try:
|
||||
if estimation_response.request.plans:
|
||||
estimation_response.request.plans[0].tier = f"Tier {estimation_response.details.tier}"
|
||||
except Exception as e:
|
||||
pass
|
||||
|
||||
return estimation_response
|
||||
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ class EstimationResponse(BaseModel):
|
|||
status: str
|
||||
details: EstimationDetails
|
||||
results: List[EstimationResult]
|
||||
request: EstimationRequest | None = None
|
||||
|
||||
class InsuranceChatRequest(BaseModel):
|
||||
message: str = Field(..., description="User message")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue