diff --git a/nanobot/utils/helpers.py b/nanobot/utils/helpers.py index 86dc205e4..1f14cb36e 100644 --- a/nanobot/utils/helpers.py +++ b/nanobot/utils/helpers.py @@ -252,7 +252,7 @@ def split_message(content: str, max_len: int = 2000) -> list[str]: while content: if len(content) <= max_len: chunks.append(content) - breakmsg: dict[str, Any] = {"role": "assistant", "content": content} + break cut = content[:max_len] # Try to break at newline first, then space, then hard break pos = cut.rfind('\n')