Override on_stream_chunk callback to process streaming content.
This method is connected as a signal handler to Agent.Base.stream_chunk signal in Agent.Base.register_tool_monitoring() when the tool is activated. It's disconnected in Agent.Base.unregister_tool() when the tool completes.
The signal is emitted by Agent.Base.handle_stream_chunk() which is called by Chat when streaming chunks arrive from the Ollama API.
| new_text |
The new text chunk |
| is_thinking |
Whether this is a thinking chunk |
| response |
The response object |