Serializable base class.
This class is used to serialize objects to JSON.
It relies on the following methods and properties:
is_lc_serializable: Is this class serializable?
By design, even if a class inherits from Serializable, it is not serializable
by default. This is to prevent accidental serialization of objects that should
not be serialized.
get_lc_namespace: Get the namespace of the LangChain object.
During deserialization, this namespace is used to identify the correct class to instantiate.
Please see the Reviver class in langchain_core.load.load for more details.
During deserialization an additional mapping is handle classes that have moved or been renamed across package versions.
lc_secrets: A map of constructor argument names to secret ids.
lc_attributes: List of additional attribute names that should be included
as part of the serialized representation.
Base abstract message class.
Messages are the inputs and outputs of a chat model.
Examples include HumanMessage,
AIMessage, and
SystemMessage.
Schema definitions for representing agent actions, observations, and return values.
The schema definitions are provided for backwards compatibility.
New agents should be built using the
langchain library, which provides a
simpler and more flexible way to define agents.
See docs on building agents.
Agents use language models to choose a sequence of actions to take.
A basic agent works in the following manner:
The schemas for the agents themselves are defined in langchain.agents.agent.