handle empty parameters for anthropic function calling
This commit is contained in:
@@ -171,7 +171,8 @@ class AnthropicLLMService(LLMService):
|
|||||||
await self.call_function(context=context,
|
await self.call_function(context=context,
|
||||||
tool_call_id=tool_use_block.id,
|
tool_call_id=tool_use_block.id,
|
||||||
function_name=tool_use_block.name,
|
function_name=tool_use_block.name,
|
||||||
arguments=json.loads(json_accumulator))
|
arguments=json.loads(json_accumulator) if json_accumulator else dict()
|
||||||
|
)
|
||||||
|
|
||||||
# Calculate usage. Do this here in its own if statement, because there may be usage
|
# Calculate usage. Do this here in its own if statement, because there may be usage
|
||||||
# data embedded in messages that we do other processing for, above.
|
# data embedded in messages that we do other processing for, above.
|
||||||
|
|||||||
Reference in New Issue
Block a user