Fix tool parsing: deduplicate tool calls, strip raw format from streaming content
- Add seen_signatures set to extract_tool_calls() to prevent duplicates - Add strip_tool_calls_from_content() method to remove <tool>...</tool> tags - Filter tool format from each chunk in real-time during streaming - Simplify post-stream tool call handling since content is already cleaned - Also handle non-streaming responses for tool call content cleanup
Showing
This diff is collapsed.
Please
register
or
sign in
to comment