-
Notifications
You must be signed in to change notification settings - Fork 140
feat(client): allow more params.(like langfuse_version, etc) #1165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile
0b4f495
to
04fb8bd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile
1b95ebb
to
465b18d
Compare
@XenoAmess Thanks for raising this! As per our contributing guide, could you please open a Github issue / discussion first to lay out your line of thinking for this change to continue the discussion there on why this should be merged / this feature is necessary? |
|
465b18d
to
f8fcb4f
Compare
Important
Enhance
on_chain_start
inlangchain.py
to dynamically update trace-level parameters using metadata prefixed withlangfuse_
.on_chain_start
inlangchain.py
, trace-level information is updated with metadata keys prefixed bylangfuse_
.session_id
anduser_id
based on metadata.update_dict
for updating trace information.This description was created by
for 0b4f495. It will automatically update as commits are pushed.
Greptile Summary
Disclaimer: Experimental PR review
Added support for dynamic trace parameter updates through metadata prefixing in the langchain callback handler, but introduced a bug that breaks existing functionality.
on_chain_start
wheresession_id
anduser_id
are incorrectly set to None instead of using metadata valueslangfuse_
prefixed metadata keysThe main issue is that the current implementation always sets
session_id
anduser_id
to None in theupdate_dict
, overriding any values that may have been set in metadata. This needs to be fixed to preserve the existing functionality while adding support for the new dynamic parameters.💡 (2/5) Greptile learns from your feedback when you react with 👍/👎!