custom_tool_events.py
Run the Example
1
Set up your virtual environment
2
Install dependencies
3
Export your OpenAI API key
4
Enable custom events
In the saved file, add
stream_events=True next to stream=True in the agent.arun() call.5
Run the example
Save the code above as
custom_tool_events.py, then run: