We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0f84d6 commit d282e7eCopy full SHA for d282e7e
litellm/llms/ollama/completion/transformation.py
@@ -331,8 +331,10 @@ def transform_response(
331
response_text = response_json.get("response", "")
332
content = None
333
reasoning_content = None
334
- if response_text is not None:
+ if response_text is not None and isinstance(response_text, str):
335
reasoning_content, content = _parse_content_for_reasoning(response_text)
336
+ else:
337
+ content = response_text # type: ignore
338
model_response.choices[0].message.content = content # type: ignore
339
model_response.choices[0].message.reasoning_content = reasoning_content # type: ignore
340
model_response.created = int(time.time())
0 commit comments