Skip to content

Commit 7036a75

Browse files
Update langfuse/langchain/CallbackHandler.py
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
1 parent 9049a7e commit 7036a75

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

langfuse/langchain/CallbackHandler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ def _parse_usage_model(usage: typing.Union[pydantic.BaseModel, dict]) -> Any:
971971
if "input" in usage_model:
972972
usage_model["input"] = max(0, usage_model["input"] - value)
973973

974-
usage_model = {k: v for k, v in usage_model.items() if isinstance(v, int)}
974+
usage_model = {k: v for k, v in usage_model.items() if type(v) is int}
975975

976976
return usage_model if usage_model else None
977977

0 commit comments

Comments
 (0)