open-notebook/open_notebook/graphs
danrush777 1a6fe4723b fix: handle structured content format in LLM response parsing
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
2026-02-08 22:29:45 +01:00
..
ask.py fix: handle structured content format in LLM response parsing 2026-02-08 22:29:45 +01:00
chat.py fix: handle structured content format in LLM response parsing 2026-02-08 22:29:45 +01:00
CLAUDE.md docs: generate comprehensive CLAUDE.md reference documentation across codebase 2026-01-03 16:27:52 -03:00
prompt.py fix: handle structured content format in LLM response parsing 2026-02-08 22:29:45 +01:00
source.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
source_chat.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
tools.py change model provisioning parameters 2024-11-08 16:08:54 -03:00
transformation.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00