forked from Archives/langchain
improve docs (#1351)
This commit is contained in:
parent
92ab27e4b8
commit
02ec72df87
@ -41,6 +41,14 @@
|
|||||||
")"
|
")"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"id": "c16161de",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"This example was created by [John Wiseman](https://twitter.com/lemonodor/status/1628270074074398720?s=20)."
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 3,
|
"execution_count": 3,
|
||||||
@ -91,6 +99,14 @@
|
|||||||
"agent_executor.run(\"What is the 10th fibonacci number?\")"
|
"agent_executor.run(\"What is the 10th fibonacci number?\")"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"id": "7caa30de",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"This example was created by [Samee Ur Rehman](https://twitter.com/sameeurehman/status/1630130518133207046?s=20)."
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 4,
|
"execution_count": 4,
|
||||||
@ -202,7 +218,7 @@
|
|||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.10.9"
|
"version": "3.9.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nbformat": 4,
|
"nbformat": 4,
|
||||||
|
@ -1,6 +1,15 @@
|
|||||||
How-To Guides
|
How-To Guides
|
||||||
=============
|
=============
|
||||||
|
|
||||||
|
There are three types of examples in this section:
|
||||||
|
|
||||||
|
1. Agent Overview: how-to-guides for generic agent functionality
|
||||||
|
2. Agent Toolkits: how-to-guides for specific agent toolkits (agents optimized for interacting with a certain resource)
|
||||||
|
3. Agent Types: how-to-guides for working with the different agent types
|
||||||
|
|
||||||
|
Agent Overview
|
||||||
|
---------------
|
||||||
|
|
||||||
The first category of how-to guides here cover specific parts of working with agents.
|
The first category of how-to guides here cover specific parts of working with agents.
|
||||||
|
|
||||||
`Load From Hub <./examples/load_from_hub.html>`_: This notebook covers how to load agents from `LangChainHub <https://github.com/hwchase17/langchain-hub>`_.
|
`Load From Hub <./examples/load_from_hub.html>`_: This notebook covers how to load agents from `LangChainHub <https://github.com/hwchase17/langchain-hub>`_.
|
||||||
@ -21,7 +30,44 @@ The first category of how-to guides here cover specific parts of working with ag
|
|||||||
|
|
||||||
`Asynchronous <./examples/async_agent.html>`_: Covering asynchronous functionality.
|
`Asynchronous <./examples/async_agent.html>`_: Covering asynchronous functionality.
|
||||||
|
|
||||||
The next set of examples are all end-to-end example of different agent types.
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
:glob:
|
||||||
|
:hidden:
|
||||||
|
|
||||||
|
./examples/*
|
||||||
|
|
||||||
|
|
||||||
|
Agent Toolkits
|
||||||
|
---------------
|
||||||
|
|
||||||
|
The next set of examples covers agents with toolkits.
|
||||||
|
As opposed to the examples above, these examples are not intended to show off an agent `type`,
|
||||||
|
but rather to show off an agent applied to particular use case.
|
||||||
|
|
||||||
|
`SQLDatabase Agent <./agent_toolkits/sql_database.html>`_: This notebook covers how to interact with an arbitrary SQL database using an agent.
|
||||||
|
|
||||||
|
`JSON Agent <./agent_toolkits/json.html>`_: This notebook covers how to interact with a JSON dictionary using an agent.
|
||||||
|
|
||||||
|
`OpenAPI Agent <./agent_toolkits/openapi.html>`_: This notebook covers how to interact with an arbitrary OpenAPI endpoint using an agent.
|
||||||
|
|
||||||
|
`VectorStore Agent <./agent_toolkits/vectorstore.html>`_: This notebook covers how to interact with VectorStores using an agent.
|
||||||
|
|
||||||
|
`Python Agent <./agent_toolkits/python.html>`_: This notebook covers how to produce and execute python code using an agent.
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
:glob:
|
||||||
|
:hidden:
|
||||||
|
|
||||||
|
./agent_toolkits/*
|
||||||
|
|
||||||
|
|
||||||
|
Agent Types
|
||||||
|
---------------
|
||||||
|
|
||||||
|
The final set of examples are all end-to-end example of different agent types.
|
||||||
In all examples there is an Agent with a particular set of tools.
|
In all examples there is an Agent with a particular set of tools.
|
||||||
|
|
||||||
- Tools: A tool can be anything that takes in a string and returns a string. This means that you can use both the primitives AND the chains found in `this <../chains.html>`_ documentation. LangChain also provides a list of easily loadable tools. For detailed information on those, please see `this documentation <./tools.html>`_
|
- Tools: A tool can be anything that takes in a string and returns a string. This means that you can use both the primitives AND the chains found in `this <../chains.html>`_ documentation. LangChain also provides a list of easily loadable tools. For detailed information on those, please see `this documentation <./tools.html>`_
|
||||||
@ -50,30 +96,14 @@ In all examples there is an Agent with a particular set of tools.
|
|||||||
- `Example Notebook <./implementations/react.html>`_
|
- `Example Notebook <./implementations/react.html>`_
|
||||||
|
|
||||||
|
|
||||||
The final set of examples covers agents with toolkits.
|
|
||||||
As opposed to the examples above, these examples are not intended to show off an agent `type`,
|
|
||||||
but rather to show off an agent applied to particular use case.
|
|
||||||
|
|
||||||
`SQLDatabase Agent <./agent_toolkits/sql_database.html>`_: This notebook covers how to interact with an arbitrary SQL database using an agent.
|
|
||||||
|
|
||||||
`JSON Agent <./agent_toolkits/json.html>`_: This notebook covers how to interact with a JSON dictionary using an agent.
|
|
||||||
|
|
||||||
`OpenAPI Agent <./agent_toolkits/openapi.html>`_: This notebook covers how to interact with an arbitrary OpenAPI endpoint using an agent.
|
|
||||||
|
|
||||||
`VectorStore Agent <./agent_toolkits/vectorstore.html>`_: This notebook covers how to interact with VectorStores using an agent.
|
|
||||||
|
|
||||||
`Python Agent <./agent_toolkits/python.html>`_: This notebook covers how to produce and execute python code using an agent.
|
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
:glob:
|
:glob:
|
||||||
:hidden:
|
:hidden:
|
||||||
|
|
||||||
./examples/*
|
./implementations/*
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
:maxdepth: 1
|
|
||||||
:glob:
|
|
||||||
:hidden:
|
|
||||||
|
|
||||||
./implementations/*
|
|
@ -8,3 +8,8 @@ For more detailed information on agents, and different types of agents in LangCh
|
|||||||
Tools are functions that agents can use to interact with the world.
|
Tools are functions that agents can use to interact with the world.
|
||||||
These tools can be generic utilities (e.g. search), other chains, or even other agents.
|
These tools can be generic utilities (e.g. search), other chains, or even other agents.
|
||||||
For more detailed information on tools, and different types of tools in LangChain, see [this documentation](tools.md).
|
For more detailed information on tools, and different types of tools in LangChain, see [this documentation](tools.md).
|
||||||
|
|
||||||
|
## ToolKits
|
||||||
|
Toolkits are groups of tools that are best used together.
|
||||||
|
They allow you to logically group and initialize a set of tools that share a particular resource (such as a database connection or json object).
|
||||||
|
They can be used to construct an agent for a specific use-case.
|
||||||
|
Loading…
Reference in New Issue
Block a user