mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-19 13:23:35 +00:00
community: add metadata to chain logging; (#22122)
Hey, I'm Sasha. The SDK engineer from [Comet](https://comet.com). This PR updates the CometTracer class. Added metadata to CometTracerr. From now on, both chains and spans will send it.
This commit is contained in:
parent
7c0459faf2
commit
1c9ceff503
@ -66,9 +66,11 @@ class CometTracer(BaseTracer):
|
||||
run_dict: Dict[str, Any] = run.dict()
|
||||
if not run.parent_run_id:
|
||||
# This is the first run, which maps to a chain
|
||||
metadata = run_dict["extra"].get("metadata", None)
|
||||
|
||||
chain_: "Chain" = self._chain.Chain(
|
||||
inputs=run_dict["inputs"],
|
||||
metadata=None,
|
||||
metadata=metadata,
|
||||
experiment_info=self._experiment_info.get(),
|
||||
)
|
||||
self._chains_map[run.id] = chain_
|
||||
|
Loading…
Reference in New Issue
Block a user