Unverified Commit f5154495 authored by Keyang Ru's avatar Keyang Ru Committed by GitHub
Browse files

Fix gpt-oss response api streaming issue (#9368)

parent e0ce171d
...@@ -107,6 +107,8 @@ class HarmonyContext(ConversationContext): ...@@ -107,6 +107,8 @@ class HarmonyContext(ConversationContext):
return self._messages return self._messages
def need_builtin_tool_call(self) -> bool: def need_builtin_tool_call(self) -> bool:
if not self.messages:
return False
last_msg = self.messages[-1] last_msg = self.messages[-1]
recipient = last_msg.recipient recipient = last_msg.recipient
return recipient is not None and ( return recipient is not None and (
......
...@@ -944,7 +944,7 @@ class OpenAIServingResponses(OpenAIServingChat): ...@@ -944,7 +944,7 @@ class OpenAIServingResponses(OpenAIServingChat):
type="output_text", type="output_text",
text="", text="",
annotations=[], annotations=[],
logprobs=[], logprobs=None,
), ),
) )
) )
...@@ -992,7 +992,7 @@ class OpenAIServingResponses(OpenAIServingChat): ...@@ -992,7 +992,7 @@ class OpenAIServingResponses(OpenAIServingChat):
type="output_text", type="output_text",
text="", text="",
annotations=[], annotations=[],
logprobs=[], logprobs=None,
), ),
) )
) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment