fix: Fix anthropic step parallel tool calling and add tests [LET-5438] (#5379)
* Fix anthropic step parallel tool calling and add tests * Remove print statements
This commit is contained in:
committed by
Caren Thomas
parent
248c7c0b44
commit
25f140bd13
@@ -71,10 +71,9 @@ class SimpleLLMRequestAdapter(LettaLLMRequestAdapter):
|
||||
self.content = self.reasoning_content + (self.content or [])
|
||||
|
||||
# Extract tool call
|
||||
if self.chat_completions_response.choices[0].message.tool_calls:
|
||||
self.tool_call = self.chat_completions_response.choices[0].message.tool_calls[0]
|
||||
else:
|
||||
self.tool_call = None
|
||||
tool_calls = self.chat_completions_response.choices[0].message.tool_calls or []
|
||||
self.tool_calls = list(tool_calls)
|
||||
self.tool_call = self.tool_calls[0] if self.tool_calls else None
|
||||
|
||||
# Extract usage statistics
|
||||
self.usage.step_count = 1
|
||||
|
||||
Reference in New Issue
Block a user