first_visit logic
This commit is contained in:
parent
0e33063c99
commit
41fd8e3d15
2 changed files with 6 additions and 5 deletions
|
|
@ -57,8 +57,11 @@ async def init_chat(request: models.InitializeChatRequest):
|
|||
name = None
|
||||
if request.context and request.context.name:
|
||||
name = request.context.name.first_name
|
||||
first_visit = True
|
||||
if request.context:
|
||||
first_visit = request.context.isFirstVisit
|
||||
|
||||
result = await chat_service.initialize_chat(str(request.userId), application, name)
|
||||
result = await chat_service.initialize_chat(str(request.userId), application, name, first_visit)
|
||||
return models.InitializeChatResponse(
|
||||
session_id=result["session_id"],
|
||||
answer=result["answer"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue