kranthi
kranthi10mo ago

debug callback handler

Hi @Marc , i'm using langfuse callback handler in my project in an LLM chain. I notice, different llm calls data logged under same trace.
No description
5 Replies
Clemo
Clemo10mo ago
Looking into this. Give us a moment as we’re in transit this weekend.
Marc
Marc10mo ago
Hi @kranthi, how do you add the callback handler? Happy to help debug this There will be a slight change to the default behavior of the callback handler to improve this, would love to confirm based on your implementation
kranthi
kranthi10mo ago
from langfuse.callback import CallbackHandler handler = CallbackHandler(PUBLIC_KEY, SECRET_KEY) from langchain.chains import LLMChain chain = LLMChain(llm=llm, prompt=prompt, callbacks=[handler]) @Marc
Marc
Marc10mo ago
Thank you, I was able to reproduce this problem and we are fixing it with the next release @kranthi from v2 onwards this should be fixed Please let me know if you still encounter the same issue
kranthi
kranthi10mo ago
Thank you Marc.