Initialize the delta tool call fields explicitly (#17340)
Signed-off-by: Max de Bayser <mbayser@br.ibm.com> Co-authored-by: igmainc <igmainc@icloud.com>
This commit is contained in:
committed by
GitHub
parent
7ea6cb28b2
commit
05a4324f8e
@@ -32,7 +32,7 @@ class StreamingToolReconstructor:
|
||||
assert len(delta.tool_calls) < 2, (
|
||||
"Streaming should include only one tool call per update.")
|
||||
for call_delta in delta.tool_calls:
|
||||
assert call_delta.type == "function", (
|
||||
assert call_delta.type is None or call_delta.type == "function", (
|
||||
"Streaming tool calls should only emit function calls. Got "
|
||||
f"{call_delta.type}")
|
||||
current_tool_call = self.tool_calls[
|
||||
|
||||
Reference in New Issue
Block a user