Fix to log the client app calling the chat API

- Remove unused subscribed variable from the chat API
- Unexpectedly dropped client app logging when migrated API chat to do
  advanced streaming in july
This commit is contained in:
Debanjum Singh Solanky
2024-10-17 15:24:43 -07:00
parent 884fe42602
commit 9affeb9e85

View File

@@ -574,7 +574,6 @@ async def chat(
chat_metadata: dict = {}
connection_alive = True
user: KhojUser = request.user.object
subscribed: bool = has_required_scope(request, ["premium"])
event_delimiter = "␃🔚␗"
q = unquote(q)
nonlocal conversation_id
@@ -641,7 +640,7 @@ async def chat(
request=request,
telemetry_type="api",
api="chat",
client=request.user.client_app,
client=common.client,
user_agent=request.headers.get("user-agent"),
host=request.headers.get("host"),
metadata=chat_metadata,