add base64 decode for context.application
This commit is contained in:
parent
b2eba19fb1
commit
d8d38ab132
2 changed files with 6 additions and 0 deletions
|
|
@ -1,3 +1,6 @@
|
|||
import base64
|
||||
import json
|
||||
|
||||
from fastapi import APIRouter, HTTPException
|
||||
|
||||
from src.services.estimation_service_v2 import EstimationService
|
||||
|
|
@ -20,6 +23,8 @@ async def insurance_chat(request: models.InsuranceChatRequest):
|
|||
application = None
|
||||
if request.context and request.context.application:
|
||||
application = request.context.application
|
||||
elif request.context and request.context.applicationDTO:
|
||||
application = json.loads(base64.b64decode(request.context.applicationDTO).decode())
|
||||
|
||||
result = await chat_service.process_insurance_chat(
|
||||
message=request.message,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue