fix langfuse debug mode

This commit is contained in:
Ishaan Jaff 2024-05-11 14:08:39 -07:00
parent 97c81a5c7e
commit 1bf8e7ac75

View file

@ -377,7 +377,7 @@ class LangFuseLogger:
else:
trace_params["output"] = output
if debug == True:
if debug == True or (isinstance(debug, str) and debug.lower() == "true"):
if "metadata" in trace_params:
# log the raw_metadata in the trace
trace_params["metadata"]["metadata_passed_to_litellm"] = metadata