Find answers from the community

Updated 9 months ago

Hi, I have an issue with local callback

Hi, I have an issue with local callback handlers. When I set a global callback handler (a customised version of the langfuse handler) I get a full trace. When I pass the handler (or rather a manager containing the handler) to individual query engines, vector stores etc as an argument it does not get used.

Is passing local callback handlers still supported? I don't want to use global or Settings because I need to adjust the callback handlers parameters based on the current user in an async multitenant enviroment.
L
j
7 comments
It is supported, but you kind of have to include it everywhere
There is a new instrumentation module that is a replacement for callbacks, still working on building this out
the UX is much nicer
I have passed it everywhere I possibly could and it is only being called when I explicitly called it, none of the query engines etc I pass it to are calling it 😦
I'll try to reproduce it in the most minimal example I can and get back to you!
In trying to produce said example I think I found the problem - I was using from_defaults and from_args in a lot of places, and they weren't always accepting a callback_manager, sometimes it was just going into **kwargs and being ignored!
Add a reply
Sign up and join the conversation on Discord