Some LLM providers (notably Gemini, DeepSeek via OpenAI-compatible
proxies) return ai_message.content as a list of content parts:
[{'type': 'text', 'text': '...', 'extras': {...}}]
The current code uses str() on non-string content, which produces the
Python repr of the entire list — not valid JSON. This breaks
PydanticOutputParser.parse() with OutputParserException.
This adds extract_text_content() to properly unwrap text from both
string and structured content formats, applied in ask.py, chat.py,
and prompt.py.
Fixes #329
|
||
|---|---|---|
| .. | ||
| ask.py | ||
| chat.py | ||
| CLAUDE.md | ||
| prompt.py | ||
| source.py | ||
| source_chat.py | ||
| tools.py | ||
| transformation.py | ||