diff --git a/endpoints/OAI/utils/chat_completion.py b/endpoints/OAI/utils/chat_completion.py index 4ff2bf0b..69145c81 100644 --- a/endpoints/OAI/utils/chat_completion.py +++ b/endpoints/OAI/utils/chat_completion.py @@ -469,7 +469,7 @@ async def _chat_stream_collector( # out of a tag if ( "logprobs_content" in generation - and tag not in [t_think_end, t_tool_end] + and tag not in [t for t in (t_think_end, t_tool_end) if t] and not in_reasoning and not in_tool ):