Skip to content

Commit e2c910f

Browse files
committed
fix: streaming_query: empty conversation ID
The query endpoint would treat an empty conversation ID as not provided, but the streaming query endpoint would treat it as if it were an ID (which doesn't belong to anyone, so it would fail). Align the behavior of the streaming query endpoint with the query endpoint, so when users provide a "conversation_id" with an empty string, it will be as if they didn't provide it at all.
1 parent d09b328 commit e2c910f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app/endpoints/streaming_query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ async def streaming_query_endpoint_handler( # pylint: disable=too-many-locals
399399
user_id, _user_name, token = auth
400400

401401
user_conversation: UserConversation | None = None
402-
if query_request.conversation_id is not None:
402+
if query_request.conversation_id:
403403
user_conversation = validate_conversation_ownership(
404404
user_id=user_id, conversation_id=query_request.conversation_id
405405
)

0 commit comments

Comments
 (0)