Fix construction method for public share conversation URL

This commit is contained in:
sabaimran 2024-05-06 08:32:51 +05:30
parent 14c9bea663
commit f6aaecb04f

View file

@ -261,6 +261,8 @@ def duplicate_chat_history_public_conversation(
public_conversation_url = PublicConversationAdapters.get_public_conversation_url(public_conversation) public_conversation_url = PublicConversationAdapters.get_public_conversation_url(public_conversation)
domain = request.headers.get("host")
update_telemetry_state( update_telemetry_state(
request=request, request=request,
telemetry_type="api", telemetry_type="api",
@ -268,9 +270,7 @@ def duplicate_chat_history_public_conversation(
**common.__dict__, **common.__dict__,
) )
return Response( return Response(status_code=200, content=json.dumps({"status": "ok", "url": f"{domain}{public_conversation_url}"}))
status_code=200, content=json.dumps({"status": "ok", "url": f"{request.client.host}{public_conversation_url}"})
)
@api_chat.get("/sessions") @api_chat.get("/sessions")