- DATE:
- AUTHOR:
- The LangChain Team
LangChain
🔧 Improved Pydantic 2 support with LangChain tool APIs
DATE:
AUTHOR:
The LangChain Team
LangChain APIs now allow using Pydantic v2 models for BaseTool
and StructuredTool
. This can enhance type safety, improve code readability, and simplify the integration of tools and chat models.
A number of chat models also support accepting Pydantic v2 models in bind_tools
and with_structured_output
(including Anthropic, OpenAI, Fireworks, and Mistral).
These updates require langchain-core>=0.2.23
For more details, read our docs here.