| Name | Type | Description |
|---|---|---|
name* | str | Name of the run. |
run_type | ls_client.RUN_TYPE_T | Default: 'chain'Type of run (e.g., |
inputs | Optional[dict] | Default: None |
project_name | Optional[str] | Default: None |
address | Optional[str] | Default: None |
parent | Optional[Union[run_trees.RunTree, str, Mapping, Literal['ignore']]] | Default: None |
tags | Optional[list[str]] | Default: None |
metadata | Optional[Mapping[str, Any]] | Default: None |
client | Optional[ls_client.Client] | Default: None |
run_id | Optional[ls_client.ID_TYPE] | Default: None |
reference_example_id | Optional[ls_client.ID_TYPE] | Default: None |
exceptions_to_handle | Optional[tuple[type[BaseException], ...]] | Default: None |
extra | Optional[dict] | Default: None |
| Name | Type |
|---|---|
| name | str |
| run_type | ls_client.RUN_TYPE_T |
| inputs | Optional[dict] |
| extra | Optional[dict] |
| project_name | Optional[str] |
| address | Optional[str] |
| parent | Optional[Union[run_trees.RunTree, str, Mapping, Literal['ignore']]] |
| tags | Optional[list[str]] |
| metadata | Optional[Mapping[str, Any]] |
| client | Optional[ls_client.Client] |
| run_id | Optional[ls_client.ID_TYPE] |
| reference_example_id | Optional[ls_client.ID_TYPE] |
| exceptions_to_handle | Optional[tuple[type[BaseException], ...]] |
| attachments | Optional[schemas.Attachments] |
Manage a LangSmith run in context.
This class can be used as both a synchronous and asynchronous context manager.
address is in beta. It is enabled per workspace; a
workspace without it rejects the runs, so tracing is lost rather than
falling back to a project. It may change without notice.
Initial input data for the run.
Project name to associate the run with.
(beta) An address string, e.g. from langsmith.address.agent, to log the
run to instead of a project. Cannot be combined with a project in
the same call. Defaults to the LANGSMITH_AGENT_* env vars.
Parent run.
Can be a RunTree, dotted order string, or tracing headers.
List of tags for the run.
Additional metadata for the run.
LangSmith client for custom settings.
Preset identifier for the run.
Associates run with a dataset example.
Only for root runs in evaluation.
Exception types to ignore.
Extra data to send to LangSmith.
Use 'metadata' instead.