mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-28 04:59:52 +01:00
Reasoning models often emit both <think> and </think> in a single streamed chunk. The previous code truncated `content` at <think> first, then tested the already-truncated string for </think>. The closing tag was gone, so `is_active` was never restored to True and the entire post-</think> answer was dropped — the user received silence. Snapshot the chunk as `original_content` and test both tags against the snapshot so the closing tag is still detectable after truncation. |
||
|---|---|---|
| .. | ||
| AliBL | ||
| coze | ||
| dify | ||
| fastgpt | ||
| gemini | ||
| homeassistant | ||
| ollama | ||
| openai | ||
| xinference | ||
| base.py | ||
| system_prompt.py | ||