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
  • RemoteGraph
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDKRemoteGraph
Language
Theme
PythonlangsmithclientClientlist_examples
Methodā—Since v0.0

list_examples

Retrieve the example rows of the specified dataset.

Copy
list_examples(
  self,
  dataset_id: Optional[ID_TYPE] = None,
  dataset_name: Optional[str] = None,
  example_ids: Optional[Sequence[ID_TYPE]] = None,
  as_of: Optional[Union[datetime.datetime, str]] = None,
  splits: Optional[Sequence[str]] = None,
  inline_s3_urls: bool = True,
  *,
  offset: int = 0,
  limit: Optional[int] = None,
  metadata: Optional[dict] = None,
  filter: Optional[str] = None,
  include_attachments: bool = False,
  **kwargs: Any = {}
) -> Iterator[ls_schemas.Example]

Parameters

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

The ID of the dataset to filter by.

dataset_nameOptional[str]
Default:None

The name of the dataset to filter by.

example_idsOptional[Sequence[Union[UUID, str]]
Default:None

The IDs of the examples to filter by.

as_ofOptional[Union[datetime.datetime, str]]
Default:None

The dataset version tag OR timestamp to retrieve the examples as of. Response examples will only be those that were present at the time of the tagged (or timestamped) version.

splitsOptional[Sequence[str]]
Default:None

A list of dataset splits, which are divisions of your dataset such as 'train', 'test', or 'validation'. Returns examples only from the specified splits.

inline_s3_urlsbool, default=True
Default:True

Whether to inline S3 URLs.

offsetint, default=0
Default:0

The offset to start from. Defaults to 0.

limitOptional[int]
Default:None

The maximum number of examples to return.

metadataOptional[dict]
Default:None

A dictionary of metadata to filter by.

filterOptional[str]
Default:None

A structured filter string to apply to the examples.

include_attachmentsbool, default=False
Default:False

Whether to include the attachments in the response.

**kwargsAny
Default:{}

Additional keyword arguments are ignored.

View source on GitHub