This is an alpha release of langchain-core 1.0.
Detailed documentation forthcoming.
langchain-core 1.0 features standard, typed message content. This includes standard
types for reasoning, citations, server-side tool calls, and other modern LLM features.
There are no breaking changes associated with existing message content. The standard
content can be lazily-parsed off of existing v0 messages using the content_blocks
property:
from langchain_core.messages import AIMessage
AIMessage("Hello, world").content_blocks
Breaking change in 1.0:
The return type signature for chat model invocation has been fixed from BaseMessage
to AIMessage
. Custom chat models implementing bind_tools
should update their
return signature to avoid type checker errors:
Before:
Runnable[LanguageModelInput, BaseMessage]:
After:
Runnable[LanguageModelInput, AIMessage]: