docs: agents & callbacks fixes (#10066)

Various improvements to the Agents & Callbacks sections of the
documentation including formatting, spelling, and grammar fixes to
improve readability.
This commit is contained in:
seamusp
2023-09-01 13:28:55 -07:00
committed by GitHub
parent 58d7d86e51
commit afd96b2460
33 changed files with 116 additions and 119 deletions

View File

@@ -10,10 +10,10 @@
"\n",
"When constructing your own agent, you will need to provide it with a list of Tools that it can use. Besides the actual function that is called, the Tool consists of several components:\n",
"\n",
"- name (str), is required and must be unique within a set of tools provided to an agent\n",
"- description (str), is optional but recommended, as it is used by an agent to determine tool use\n",
"- return_direct (bool), defaults to False\n",
"- args_schema (Pydantic BaseModel), is optional but recommended, can be used to provide more information (e.g., few-shot examples) or validation for expected parameters.\n",
"- `name` (str), is required and must be unique within a set of tools provided to an agent\n",
"- `description` (str), is optional but recommended, as it is used by an agent to determine tool use\n",
"- `return_direct` (bool), defaults to False\n",
"- `args_schema` (Pydantic BaseModel), is optional but recommended, can be used to provide more information (e.g., few-shot examples) or validation for expected parameters.\n",
"\n",
"\n",
"There are two main ways to define a tool, we will cover both in the example below."
@@ -116,7 +116,7 @@
"id": "e9b560f7",
"metadata": {},
"source": [
"You can also define a custom `args_schema`` to provide more information about inputs."
"You can also define a custom `args_schema` to provide more information about inputs."
]
},
{
@@ -442,7 +442,7 @@
"id": "de34a6a3",
"metadata": {},
"source": [
"You can also provide `args_schema` to provide more information about the argument"
"You can also provide `args_schema` to provide more information about the argument."
]
},
{
@@ -533,7 +533,7 @@
"source": [
"## Subclassing the BaseTool\n",
"\n",
"The BaseTool automatically infers the schema from the _run method's signature."
"The BaseTool automatically infers the schema from the `_run` method's signature."
]
},
{
@@ -840,7 +840,7 @@
"metadata": {},
"source": [
"## Using tools to return directly\n",
"Often, it can be desirable to have a tool output returned directly to the user, if its called. You can do this easily with LangChain by setting the return_direct flag for a tool to be True."
"Often, it can be desirable to have a tool output returned directly to the user, if its called. You can do this easily with LangChain by setting the `return_direct` flag for a tool to be True."
]
},
{