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

Update a specific example.

Copy
update_example( self, example_id: ID_TYPE, *, inputs: Optional[dict[str, 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

The input values to update.

outputsOptional[Mapping[str, Any]]
Default:None

The output values to update.

metadataOptional[Dict]
Default:None

The metadata to update.

splitOptional[str | List[str]]
Default:None

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

dataset_idOptional[Union[UUID, str]]
Default:None

The ID of the dataset to update.

attachments_operationsOptional[AttachmentsOperations]
Default:None

The attachments operations to perform.

attachmentsOptional[Attachments]
Default:None

The attachments to add to the example.

View source on GitHub