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_example
Method●Since v0.0

update_example

Copy
update_example(
  self,
  example_id: ID_TYPE,
  *,
  inputs: Optional[dict[str
View source on GitHub
,
Any
]
]
=
None
,
outputs
:
Optional
[
Mapping
[
str
,
Any
]
]
=
None
,
metadata
:
Optional
[
dict
]
=
None
,
split
:
Optional
[
str
|
list
[
str
]
]
=
None
,
dataset_id
:
Optional
[
ID_TYPE
]
=
None
,
attachments_operations
:
Optional
[
ls_schemas
.
AttachmentsOperations
]
=
None
,
attachments
:
Optional
[
ls_schemas
.
Attachments
]
=
None
)
->
dict
[
str
,
Any
]

Parameters

NameTypeDescription
example_id*Union[UUID, str]

The ID of the example to update.

inputsOptional[Dict[str, Any]]
Default:None
outputsOptional[Mapping[str, Any]]
Default:None
metadataOptional[Dict]
Default:None
splitOptional[str | List[str]]
Default:None
dataset_idOptional[Union[UUID, str]]
Default:None
attachments_operationsOptional[AttachmentsOperations]
Default:None
attachmentsOptional[Attachments]
Default:None

Update a specific example.

The input values to update.

The output values to update.

The metadata to update.

The dataset split to update, such as 'train', 'test', or 'validation'.

The ID of the dataset to update.

The attachments operations to perform.

The attachments to add to the example.