Closed rakeshgohel01 closed 2 weeks ago
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.
Issue
When I supplied callbacks directly to LLM object before passing to Agent constructor, the callbacks set by me were never called
Explanation
If an LLM is created with callbacks and assigned to agent, it gets overwritten in agent initialization when pydantic finishes validation.
code
Ideally it should append TokenCalcHandler to callbacks not assigned