Unverified Commit bbf80ede authored by Adolfo Victoria's avatar Adolfo Victoria Committed by GitHub
Browse files

Fix type error (#31999)


Signed-off-by: default avatarAdolfo Victoria <adolfokarim@gmail.com>
Co-authored-by: default avatarAdolfo Victoria <adovi@meta.com>
parent 4505849b
...@@ -78,7 +78,9 @@ def _maybe_combine_reasoning_and_tool_call( ...@@ -78,7 +78,9 @@ def _maybe_combine_reasoning_and_tool_call(
This function checks if the last message is a reasoning message and This function checks if the last message is a reasoning message and
the current message is a tool call""" the current message is a tool call"""
if not ( if not (
isinstance(item, ResponseFunctionToolCall) and item.id.startswith(MCP_PREFIX) isinstance(item, ResponseFunctionToolCall)
and item.id
and item.id.startswith(MCP_PREFIX)
): ):
return None return None
if len(messages) == 0: if len(messages) == 0:
......
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