Update a run in the LangSmith API.
update_run(
self,
run_id: ID_TYPE,
*,
name: Optional[str] = None,
run_type: Optional[RUN_TYPE_T] = None,
start_time: Optional[datetime.datetime] = None,
end_time: Optional[datetime.datetime] = None,
error: Optional[str] = None,
inputs: Optional[dict] = None,
outputs: Optional[dict] = None,
events: Optional[Sequence[dict]] = None,
extra: Optional[dict] = None,
tags: Optional[list[str]] = None,
attachments: Optional[ls_schemas.Attachments] = None,
dangerously_allow_filesystem: bool = False,
reference_example_id: str | uuid.UUID | None = None,
api_key: Optional[str] = None,
api_url: Optional[str] = None,
service_key: Optional[str] = None,
tenant_id: Optional[str] = None,
authorization: Optional[str] = None,
cookie: Optional[str] = None,
**kwargs: Any = {}
) -> None| Name | Type | Description |
|---|---|---|
run_id* | Union[UUID, str] | The ID of the run to update. |
name | Optional[str] | Default: NoneThe name of the run. |
run_type | Optional[str] | Default: NoneThe type of the run (e.g., llm, chain, tool). |
start_time | Optional[datetime.datetime] | Default: NoneThe start time of the run. |
end_time | Optional[datetime.datetime] | Default: NoneThe end time of the run. |
error | Optional[str] | Default: NoneThe error message of the run. |
inputs | Optional[Dict] | Default: NoneThe input values for the run. |
outputs | Optional[Dict] | Default: NoneThe output values for the run. |
events | Optional[Sequence[dict]] | Default: NoneThe events for the run. |
extra | Optional[Dict] | Default: NoneThe extra information for the run. |
tags | Optional[List[str]] | Default: NoneThe tags for the run. |
attachments | Optional[Dict[str, Attachment]] | Default: NoneA dictionary of attachments to add to the run. The keys are the attachment names, and the values are Attachment objects containing the data and mime type. |
reference_example_id | Optional[Union[str, uuid.UUID]] | Default: NoneID of the example that was the source of the run inputs. Used for runs that were part of an experiment. |
api_key | Optional[str] | Default: NoneThe API key to use for this specific run. |
api_url | Optional[str] | Default: NoneThe API URL to use for this specific run. |
service_key | Optional[str] | Default: NoneThe service JWT key for service-to-service auth. |
tenant_id | Optional[str] | Default: NoneThe tenant ID for multi-tenant requests. |
authorization | Optional[str] | Default: NoneThe Authorization header value. |
cookie | Optional[str] | Default: NoneThe Cookie header value. |
**kwargs | Any | Default: {}Kwargs are ignored. |