Skip to content

The agent engineering platform.

docs: updated args_schema to be required when using callback handlers in custom tools. (#25887)

k.muto5bb810c5c694
diff --git a/docs/docs/how_to/custom_tools.ipynb b/docs/docs/how_to/custom_tools.ipynb
index 5511096cad..11668c3191 100644
--- a/docs/docs/how_to/custom_tools.ipynb
+++ b/docs/docs/how_to/custom_tools.ipynb
@@ -9,12 +9,12 @@
"\n",
"When constructing an agent, you will need to provide it with a list of `Tool`s that it can use. Besides the actual function that is called, the Tool consists of several components:\n",
"\n",
- "| Attribute | Type | Description |\n",
- "|-----------------|---------------------------|------------------------------------------------------------------------------------------------------------------|\n",
- "| name | str | Must be unique within a set of tools provided to an LLM or agent. |\n",
- "| description | str | Describes what the tool does. Used as context by the LLM or agent. |\n",
- "| args_schema | Pydantic BaseModel | Optional but recommended, can be used to provide more information (e.g., few-shot examples) or validation for expected parameters |\n",
- "| return_direct | boolean | Only relevant for agents. When True, after invoking the given tool, the agent will stop and return the result direcly to the user. |\n",
+ "| Attribute | Type | Description |\n",
+ "|---------------|---------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n",
+ "| name | str | Must be unique within a set of tools provided to an LLM or agent. |\n",
+ "| description | str | Describes what the tool does. Used as context by the LLM or agent. |\n",
+ "| args_schema | langchain.pydantic_v1.BaseModel | Optional but recommended, and required if using callback handlers. It can be used to provide more information (e.g., few-shot examples) or validation for expected parameters. |\n",
+ "| return_direct | boolean | Only relevant for agents. When True, after invoking the given tool, the agent will stop and return the result direcly to the user. |\n",
"\n",
"LangChain supports the creation of tools from:\n",
"\n",