fix: decorators + client error

This commit is contained in:
Siddhant Rai
2025-01-20 19:44:14 +05:30
parent a741388447
commit d441d5763f
4 changed files with 65 additions and 17 deletions

View File

@@ -61,14 +61,19 @@ class GoogleLLMHandler(LLMHandler):
tool_response, call_id = agent._execute_tool_action(
tools_dict, part.function_call
)
function_response_part = types.Part.from_function_response(
name=part.function_call.name,
response={"result": tool_response},
)
messages.append({"role": "model", "content": [part]})
messages.append(
{"role": "tool", "content": [function_response_part]}
{"role": "model", "content": [part.to_json_dict()]}
)
messages.append(
{
"role": "tool",
"content": [function_response_part.to_json_dict()],
}
)
if (