StructuredTool
A tool class in LangChain that accepts a Pydantic model as args_schema to define structured parameters, explicitly exposing parameter types, required status and descriptions to the model, thereby improving the accuracy of parameter construction.
Core Facts
LangChain's StructuredTool relies on Pydantic to define the input parameter structure of tools, using Pydantic BaseModel to describe the type and meaning of each parameter.
LangChain v0.3 uses the @tool decorator to convert ordinary Python functions into structured tool objects (StructuredTool).
All Facts (3)
LangChain's StructuredTool relies on Pydantic to define the input parameter structure of tools, using Pydantic BaseModel to describe the type and meaning of each parameter.
65%VerifiedLangChain v0.3 uses the @tool decorator to convert ordinary Python functions into structured tool objects (StructuredTool).
65%Unverified当LangChain工具定义为async时,StructuredTool会将函数放在coroutine属性而非func属性中
90%