Fix empty list in content on tool calls causing ollama parse error (#102)

This is related to google/adk-python#49
This commit is contained in:
Selcuk Gun
2025-04-12 17:34:57 -07:00
committed by GitHub
parent 089c1e6428
commit cfbcc17644
2 changed files with 2 additions and 2 deletions

View File

@@ -536,7 +536,7 @@ def test_content_to_message_param_function_call():
content.parts[0].function_call.id = "test_tool_call_id"
message = _content_to_message_param(content)
assert message["role"] == "assistant"
assert message["content"] == []
assert message["content"] == None
assert message["tool_calls"][0].type == "function"
assert message["tool_calls"][0].id == "test_tool_call_id"
assert message["tool_calls"][0].function.name == "test_function"