Skip to content

Commit

Permalink
fix try / except langfuse deep copy
Browse files Browse the repository at this point in the history
  • Loading branch information
ishaan-jaff committed Jul 11, 2024
1 parent 7efe9be commit d0a7983
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion litellm/integrations/langfuse.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,12 @@ def _log_langfuse_v2(
or isinstance(value, int)
or isinstance(value, float)
):
new_metadata[key] = copy.deepcopy(value)
try:
new_metadata[key] = copy.deepcopy(value)
except Exception as e:
verbose_logger.error(
f"Langfuse [Non-blocking error] - error copying metadata: {str(e)}"
)
metadata = new_metadata

supports_tags = Version(langfuse.version.__version__) >= Version("2.6.3")
Expand Down

0 comments on commit d0a7983

Please sign in to comment.