List runs from the LangSmith API.
list_runs(
self,
*,
project_id: Optional[Union[ID_TYPE, Sequence[ID_TYPE]]] = None,
project_name: Optional[Union[str, Sequence[str]]] = None,
run_type: Optional[str] = None,
trace_id: Optional[ID_TYPE] = None,
reference_example_id: Optional[ID_TYPE] = None,
query: Optional[str] = None,
filter: Optional[str] = None,
trace_filter: Optional[str] = None,
tree_filter: Optional[str] = None,
is_root: Optional[bool] = None,
parent_run_id: Optional[ID_TYPE] = None,
start_time: Optional[datetime.datetime] = None,
error: Optional[bool] = None,
run_ids: Optional[Sequence[ID_TYPE]] = None,
select: Optional[Sequence[str]] = None,
limit: Optional[int] = None,
**kwargs: Any = {}
) -> Iterator[ls_schemas.Run]| Name | Type | Description |
|---|---|---|
project_id | Optional[Union[ID_TYPE, Sequence[ID_TYPE]]] | Default: NoneThe ID(s) of the project to filter by. |
project_name | Optional[Union[str, Sequence[str]]] | Default: NoneThe name(s) of the project to filter by. |
run_type | Optional[str] | Default: NoneThe type of the runs to filter by. |
trace_id | Optional[ID_TYPE] | Default: NoneThe ID of the trace to filter by. |
reference_example_id | Optional[ID_TYPE] | Default: NoneThe ID of the reference example to filter by. |
query | Optional[str] | Default: NoneThe query string to filter by. |
filter | Optional[str] | Default: NoneThe filter string to filter by. |
trace_filter | Optional[str] | Default: NoneFilter to apply to the ROOT run in the trace tree. This is meant to be used in conjunction with the regular |
tree_filter | Optional[str] | Default: NoneFilter to apply to OTHER runs in the trace tree, including sibling and child runs. This is meant to be used in conjunction with the regular |
is_root | Optional[bool] | Default: NoneWhether to filter by root runs. |
parent_run_id | Optional[ID_TYPE] | Default: NoneThe ID of the parent run to filter by. |
start_time | Optional[datetime.datetime] | Default: NoneThe start time to filter by. |
error | Optional[bool] | Default: NoneWhether to filter by error status. |
run_ids | Optional[Sequence[ID_TYPE]] | Default: NoneThe IDs of the runs to filter by. |
select | Optional[Sequence[str]] | Default: NoneThe fields to select. |
limit | Optional[int] | Default: NoneThe maximum number of runs to return. |
**kwargs | Any | Default: {}Additional keyword arguments. |