Open
Description
Privileged issue
- I am a LangChain maintainer, or was asked directly by a LangChain maintainer to create an issue here.
Issue Content
When Pydantic models are cast to BaseTool and are missing a docstring, we use the docstring for BaseModel itself:
from langchain_core.tools import tool
from pydantic import BaseModel
@tool
class MyTool(BaseModel):
foo: str
MyTool.description
'!!! abstract "Usage Documentation"\n Models\n\nA base class for creating Pydantic models.\n\nAttributes:\n class_vars: The names of the class variables defined on the model.\n private_attributes: Metadata about...'
We should use an empty string in this case.