Set the inputs, outputs, tags, and metadata of the run.
If performed, this will override the default behavior of the end() method to ignore new outputs (that would otherwise be added) by the @traceable decorator.
If your LangChain or LangGraph versions are sufficiently up-to-date,
this will also override the default behavior of LangChainTracer.
set(
self,
*,
inputs: Optional[Mapping[str, Any]] = NOT_PROVIDED,
outputs: Optional[Mapping[str, Any]] = NOT_PROVIDED,
tags: Optional[Sequence[str]] = NOT_PROVIDED,
metadata: Optional[Mapping[str, Any]] = NOT_PROVIDED,
usage_metadata: Optional[ls_schemas.ExtractedUsageMetadata] = NOT_PROVIDED
) -> None| Name | Type | Description |
|---|---|---|
inputs | Optional[Mapping[str, Any]] | Default: NOT_PROVIDEDThe inputs to set. |
outputs | Optional[Mapping[str, Any]] | Default: NOT_PROVIDEDThe outputs to set. |
tags | Optional[Sequence[str]] | Default: NOT_PROVIDEDThe tags to set. |
metadata | Optional[Mapping[str, Any]] | Default: NOT_PROVIDEDThe metadata to set. |
usage_metadata | Optional[ls_schemas.ExtractedUsageMetadata] | Default: NOT_PROVIDEDUsage information to set. |