Commit 13b56ea0 authored by Your Name's avatar Your Name

Fix: Don't strip whitespace from model output

- Remove stripping in strip_tool_calls_from_content function
- Whitespace (spaces, newlines) are valid content and should be preserved
parent 7e7930f5
......@@ -652,9 +652,7 @@ class ToolCallParser:
# Clean up excessive newlines left from removal
text = re.sub(r'\n{3,}', '\n\n', text)
# Only strip if there's actual content (not just whitespace)
if text.strip():
text = text.strip()
# Don't strip whitespace - spaces and newlines are valid content
return text
def format_tools_for_prompt(tools: List[Tool], messages: List[ChatMessage]) -> List[ChatMessage]:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment