fix(langchain): filter string keys from usage object#1191
Merged
Conversation
Contributor
There was a problem hiding this comment.
LGTM
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile
|
|
||
|
|
||
| # all models here need to be tested here because we take the model from the kwargs / invocation_params or we need to make an actual call for setup | ||
| @pytest.mark.skip("Flaky") |
Contributor
There was a problem hiding this comment.
Skipped test marked as flaky. Consider referencing an issue or ticket to track fixing the flakiness instead of permanently skipping.
Suggested change
| @pytest.mark.skip("Flaky") | |
| @pytest.mark.skip("Flaky, see issue #1234") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
Filters out string values from usage data in
_parse_usage_modelinCallbackHandler.pyto ensure accurate service tier calculations.CallbackHandler.py,_parse_usage_modelnow filters out string values from usage data, retaining only numeric values.test_modelsintest_extract_model.pyas flaky and skips it.This description was created by
for 4bc677f. You can customize this summary. It will automatically update as commits are pushed.
Greptile Summary
Disclaimer: Experimental PR review
Modifies the
langfuse/langchain/CallbackHandler.pyto filter out non-numeric values from usage model data, ensuring accurate service tier calculations._parse_usage_modelfunction to retain only numerical values in usage metrics