Your lightweight open-source personal agent.
Python agent-frameworkai-agentai-agentschatbotchatopsdiscord-botllm-agentsllmslocal-llmmcpmodel-context-protocolmulti-agentopenai-compatibleopenclawpersonal-ai-assistantpythonself-hostedtelegram-bot-ai-assistantwebuiworkflow-automation
fix: omit empty content in assistant messages
Re-bin1db05c881ddf
diff --git a/nanobot/agent/context.py b/nanobot/agent/context.pyindex bed9e3647..cfd6318aa 100644--- a/nanobot/agent/context.py+++ b/nanobot/agent/context.py@@ -227,10 +227,8 @@ To recall past events, grep {workspace_path}/memory/HISTORY.md""""""msg: dict[str, Any] = {"role": "assistant"}- # Only include the content key when there is non-empty text.- # Some LLM backends reject empty text blocks, so omit the key- # to avoid sending empty content entries.- if content is not None and content != "":+ # Omit empty content — some backends reject empty text blocks+ if content:msg["content"] = contentif tool_calls: