1
0
mirror of https://github.com/hwchase17/langchain.git synced 2025-05-03 22:28:04 +00:00

Include delayed inputs in langchain tracer ()

This commit is contained in:
William FH 2025-03-28 16:07:22 -07:00 committed by GitHub
parent 372dc7f991
commit b075eab3e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -222,7 +222,11 @@ class LangChainTracer(BaseTracer):
extra = run_dict.get("extra", {})
extra["runtime"] = get_runtime_environment()
run_dict["extra"] = extra
inputs_is_truthy = bool(run_dict.get("inputs"))
inputs_ = run_dict.get("inputs")
if inputs_ and (len(inputs_) > 1 or bool(next(iter(inputs_.values())))):
inputs_is_truthy = True
else:
inputs_is_truthy = False
run.extra["inputs_is_truthy"] = inputs_is_truthy
self.client.create_run(**run_dict, project_name=self.project_name)
except Exception as e: