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_modelsBaseModel
Classā—Since v0.8

BaseModel

Copy
BaseModel()

Bases

pydantic.BaseModel

Attributes

Methods

Classes

Inherited fromBaseModel

Attributes

Amodel_fields_set: set[str]Amodel_config: ConfigDictAmodel_construct: construct

Methods

Mto_dict
—
View source on GitHub

Recursively generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Mto_json
—

Generates a JSON string representing this model as it would be received from or sent to the API (but with indentation).

Mconstruct
Mmodel_dump
—

Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump

Mmodel_dump_json
—

Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump_json

Classes

CConfig
attribute
model_fields_set: set[str]
attribute
model_config: ConfigDict
attribute
model_construct: construct
method
to_dict
method
to_json
method
construct
method
model_dump
method
model_dump_json
class
Config

Recursively generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

By default, fields that were not set by the API will not be included, and keys will match the API response, not the property names from the model.

For example, if the API responds with "fooBar": true but we've defined a foo_bar: bool property, the output will use the "fooBar" key (unless use_api_names=False is passed).

Generates a JSON string representing this model as it would be received from or sent to the API (but with indentation).

By default, fields that were not set by the API will not be included, and keys will match the API response, not the property names from the model.

For example, if the API responds with "fooBar": true but we've defined a foo_bar: bool property, the output will use the "fooBar" key (unless use_api_names=False is passed).

Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic's to_json method.