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_Matcherto_be_approximately
Method●Since v0.1

to_be_approximately

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

Copy
to_be_approximately(
  self,
  value: float,
  precision: int = 2
) -> None

Parameters

NameTypeDescription
value*float

The value to compare against.

precisionint
Default:2

The number of decimal places to round to for comparison.

View source on GitHub