Commit eaee49b
fix: Simplify content for ollama provider
Even though litellm type definitions and openai API specifies content as list of dictionaries (with type and relevant attributes potentially to allow multimodal inputs/outputs in addition to text), ollama has been demonstrating marshal errors. As a workaround this change simplifies the content as string when there is no more than one content part.
Fixes #642, #928, #376
PiperOrigin-RevId: 7668901411 parent 32c5ffa commit eaee49b
File tree
2 files changed
+12
-3
lines changed- src/google/adk/models
- tests/unittests/models
2 files changed
+12
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
199 | 207 | | |
200 | 208 | | |
201 | 209 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
889 | 889 | | |
890 | 890 | | |
891 | 891 | | |
| 892 | + | |
892 | 893 | | |
893 | 894 | | |
894 | | - | |
| 895 | + | |
895 | 896 | | |
896 | 897 | | |
897 | | - | |
| 898 | + | |
898 | 899 | | |
899 | 900 | | |
900 | | - | |
| 901 | + | |
901 | 902 | | |
902 | 903 | | |
903 | 904 | | |
| |||
0 commit comments