LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Client
  • AsyncClient
  • Run Helpers
  • Run Trees
  • Evaluation
  • Schemas
  • Utilities
  • Wrappers
  • Anonymizer
  • Testing
  • Expect API
  • Middleware
  • Pytest Plugin
  • Deployment SDK
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDK
Language
Theme
PythonlangsmithclientClientupdate_run
Method●Since v0.0

update_run

Copy
update_run(
  self,
  run_id: ID_TYPE,
  *,
  name: Optional[str
View source on GitHub
]
=
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

Parameters

NameTypeDescription
run_id*Union[UUID, str]

The ID of the run to update.

nameOptional[str]
Default:None

The name of the run.

run_typeOptional[str]
Default:None
start_timeOptional[datetime.datetime]
Default:None
end_timeOptional[datetime.datetime]
Default:None
errorOptional[str]
Default:None
inputsOptional[Dict]
Default:None
outputsOptional[Dict]
Default:None
eventsOptional[Sequence[dict]]
Default:None
extraOptional[Dict]
Default:None
tagsOptional[List[str]]
Default:None
attachmentsOptional[Dict[str, Attachment]]
Default:None
reference_example_idOptional[Union[str, uuid.UUID]]
Default:None
api_keyOptional[str]
Default:None
api_urlOptional[str]
Default:None
service_keyOptional[str]
Default:None
tenant_idOptional[str]
Default:None
authorizationOptional[str]
Default:None
cookieOptional[str]
Default:None
**kwargsAny
Default:{}

Update a run in the LangSmith API.

The type of the run (e.g., llm, chain, tool).

The start time of the run.

The end time of the run.

The error message of the run.

The input values for the run.

The output values for the run.

The events for the run.

The extra information for the run.

The tags for the run.

A 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.

ID of the example that was the source of the run inputs. Used for runs that were part of an experiment.

The API key to use for this specific run.

The API URL to use for this specific run.

The service JWT key for service-to-service auth.

The tenant ID for multi-tenant requests.

The Authorization header value.

The Cookie header value.

Kwargs are ignored.