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
Pythonlangsmith_expect_Matcher
Class●Since v0.1

_Matcher

A class for making assertions on expectation values.

Copy
_Matcher(
  self,
  client: Optional[ls_client.Client],
  key: str,
  value: Any,
  _executor: Optional[ls_utils.ContextThreadPoolExecutor] = None,
  run_id: Optional[str] = None
)

Constructors

constructor
__init__
NameType
clientOptional[ls_client.Client]
keystr
valueAny
_executorOptional[ls_utils.ContextThreadPoolExecutor]
run_idOptional[str]

Attributes

attribute
key: key
attribute
value: value

Methods

method
to_be_less_than

Assert that the expectation value is less than the given value.

method
to_be_greater_than

Assert that the expectation value is greater than the given value.

method
to_be_between

Assert that the expectation value is between the given min and max values.

method
to_be_approximately

Assert that the expectation value is approximately equal to the given value.

method
to_equal

Assert that the expectation value equals the given value.

method
to_be_none

Assert that the expectation value is None.

method
to_contain

Assert that the expectation value contains the given value.

method
against

Assert the expectation value against a custom function.

View source on GitHub