🐛 fix(base.py): improve code readability by formatting the CreateTrace function call in multiple lines

This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-10-12 16:29:48 -03:00
commit 964b4ec7f2

View file

@ -34,7 +34,9 @@ def get_langfuse_callback(trace_id):
if langfuse := LangfuseInstance.get():
logger.debug("Langfuse credentials found")
try:
trace = langfuse.trace(CreateTrace(name="langflow-"+trace_id, id=trace_id))
trace = langfuse.trace(
CreateTrace(name="langflow-" + trace_id, id=trace_id)
)
return trace.getNewHandler()
except Exception as exc:
logger.error(f"Error initializing langfuse callback: {exc}")