mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-26 01:01:40 +00:00
The OpenAI API returns content: null on assistant messages that only
contain tool calls. msg.get('content', '') returns None (not '') when
the key exists with value None, causing TypeError on len() and string
concatenation in _generate_summary and compress.
Fix: msg.get('content') or '' — handles both missing keys and None.
Tests from PR #216 (@Farukest). Fix also in PR #215 (@cutepawss).
Both PRs had stale branches and couldn't be merged directly.
Closes #211
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_auxiliary_client.py | ||
| test_context_compressor.py | ||
| test_model_metadata.py | ||
| test_prompt_builder.py | ||
| test_prompt_caching.py | ||
| test_redact.py | ||
| test_subagent_progress.py | ||