mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
Rollback to metadata deepcopy
This commit is contained in:
parent
cff66d6151
commit
496445481d
1 changed files with 15 additions and 15 deletions
|
@ -317,6 +317,11 @@ class LangFuseLogger:
|
|||
|
||||
try:
|
||||
tags = []
|
||||
try:
|
||||
metadata = copy.deepcopy(
|
||||
metadata
|
||||
) # Avoid modifying the original metadata
|
||||
except:
|
||||
new_metadata = {}
|
||||
for key, value in metadata.items():
|
||||
if (
|
||||
|
@ -326,12 +331,7 @@ class LangFuseLogger:
|
|||
or isinstance(value, int)
|
||||
or isinstance(value, float)
|
||||
):
|
||||
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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue