We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf65d04 commit 5a45765Copy full SHA for 5a45765
src/inferencesh/models/llm.py
@@ -239,7 +239,11 @@ def merge_messages(messages: List[ContextMessage]) -> ContextMessage:
239
return ContextMessage(role=messages[0].role, text=text, image=image)
240
241
def merge_tool_calls(messages: List[ContextMessage]) -> List[Dict[str, Any]]:
242
- return [msg.tool_calls for msg in messages if msg.tool_calls]
+ tool_calls = []
243
+ for msg in messages:
244
+ if msg.tool_calls:
245
+ tool_calls.extend(msg.tool_calls)
246
+ return tool_calls
247
248
user_input_text = ""
249
if hasattr(input_data, "text"):
0 commit comments