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_openapi_client_modelsbuild
Function●Since v0.8

build

Copy
build(
  base_model_cls: Callable[P, _BaseModelT],
  *args: P.args =
View source on GitHub
(
)
,
**
kwargs
:
P
.
kwargs
=
{
}
)
->
_BaseModelT

Construct a BaseModel class without validation.

This is useful for cases where you need to instantiate a BaseModel from an API response as this provides type-safe params which isn't supported by helpers like construct_type().

build(MyModel, my_field_a="foo", my_field_b=123)