Trace of custom classes gives nondescriptive info #1310
Unanswered
mjungiewicz-exadel
asked this question in
Support
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the bug
I'm using this code https://github.com/Yifan-Song793/RestGPT and I'm trying to use LangFuse to trace it.
I've tried a few options.
First, I changed this line https://github.com/Yifan-Song793/RestGPT/blob/d99012860cb45323975bf5780152d7aa44f390f5/run.py#L61
to this code
llm = ChatOpenAI(model_name="gpt-4-turbo-preview", temperature=0.0, callbacks=[handler])
.I'm creating the handler like this
handler = CallbackHandler(config['langfuse_pk'], config['langfuse_sk'])
.This gave me such a trace:
It seems that all the necessary elements are traced, but instead of having the name ChatOpenAI everywhere I'd like to see in which particular class the generation happens (eg. Planner, API Selector, etc).
I've also tried to change this line https://github.com/Yifan-Song793/RestGPT/blob/d99012860cb45323975bf5780152d7aa44f390f5/run.py#L76 to this code
rest_gpt.invoke(query, config={"callbacks":[handler]})
and the result looks like this:If I connect the handler with both of the above ways, I'm getting this:
Would be grateful for your help.
To reproduce
Use the https://github.com/Yifan-Song793/RestGPT code with mentioned changes.
Additional information
No response
Beta Was this translation helpful? Give feedback.
All reactions