Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/google/adk/models/lite_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,8 @@ def _part_has_payload(part: types.Part) -> bool:
return True
if part.file_data and (part.file_data.file_uri or part.file_data.data):
return True
if part.function_response:
return True
return False


Expand Down
17 changes: 17 additions & 0 deletions tests/unittests/models/test_litellm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,23 @@ async def test_generate_content_async_adds_fallback_user_message(
4,
id="user content is not the last message scenario",
),
pytest.param(
LlmRequest(
contents=[
types.Content(
role="user",
parts=[
types.Part.from_function_response(
name="test_function",
response={"result": "test_result"},
)
],
),
]
),
1,
id="user content with function_response has payload",
),
Comment thread
alexkuzmik marked this conversation as resolved.
Outdated
]


Expand Down