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,22 +317,22 @@ class LangFuseLogger:
|
||||||
|
|
||||||
try:
|
try:
|
||||||
tags = []
|
tags = []
|
||||||
new_metadata = {}
|
try:
|
||||||
for key, value in metadata.items():
|
metadata = copy.deepcopy(
|
||||||
if (
|
metadata
|
||||||
isinstance(value, list)
|
) # Avoid modifying the original metadata
|
||||||
or isinstance(value, dict)
|
except:
|
||||||
or isinstance(value, str)
|
new_metadata = {}
|
||||||
or isinstance(value, int)
|
for key, value in metadata.items():
|
||||||
or isinstance(value, float)
|
if (
|
||||||
):
|
isinstance(value, list)
|
||||||
try:
|
or isinstance(value, dict)
|
||||||
|
or isinstance(value, str)
|
||||||
|
or isinstance(value, int)
|
||||||
|
or isinstance(value, float)
|
||||||
|
):
|
||||||
new_metadata[key] = copy.deepcopy(value)
|
new_metadata[key] = copy.deepcopy(value)
|
||||||
except Exception as e:
|
metadata = new_metadata
|
||||||
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")
|
supports_tags = Version(langfuse.version.__version__) >= Version("2.6.3")
|
||||||
supports_prompt = Version(langfuse.version.__version__) >= Version("2.7.3")
|
supports_prompt = Version(langfuse.version.__version__) >= Version("2.7.3")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue