mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-28 09:28:48 +00:00
docs: add tool use diagrams (#16207)
This commit is contained in:
parent
7d444724d7
commit
27ad65cc68
@ -13,7 +13,9 @@
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "1925a807-fa01-44bc-8a03-d9907311c7f9",
|
||||
"metadata": {},
|
||||
"metadata": {
|
||||
"jp-MarkdownHeadingCollapsed": true
|
||||
},
|
||||
"source": [
|
||||
"## Agents\n",
|
||||
"\n",
|
||||
@ -21,7 +23,9 @@
|
||||
"\n",
|
||||
"LangChain comes with a number of built-in agents that are optimized for different use cases. Read about all the [agent types here](/docs/modules/agents/agent_types/).\n",
|
||||
"\n",
|
||||
"As an example, let's try out the OpenAI tools agent, which makes use of the new OpenAI tool-calling API (this is only available in the latest OpenAI models, and differs from function-calling in that the model can return multiple function invocations at once):"
|
||||
"As an example, let's try out the OpenAI tools agent, which makes use of the new OpenAI tool-calling API (this is only available in the latest OpenAI models, and differs from function-calling in that the model can return multiple function invocations at once).\n",
|
||||
"\n",
|
||||
""
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -23,7 +23,15 @@
|
||||
"- A large collection of built-in [Tools](/docs/integrations/tools).\n",
|
||||
"- Provides a lot of flexibility in how you call these tools.\n",
|
||||
"\n",
|
||||
"There are two main ways to use tools: [chains](/docs/modules/chains) and [agents](/docs/modules/agents/). Chains lets you create a pre-defined sequence of tool usage(s). Agents let the model use tools in a loop, so that it can decide how many times to use tools.\n",
|
||||
"There are two main ways to use tools: [chains](/docs/modules/chains) and [agents](/docs/modules/agents/). \n",
|
||||
"\n",
|
||||
"Chains lets you create a pre-defined sequence of tool usage(s). \n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"Agents let the model use tools in a loop, so that it can decide how many times to use tools.\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"To get started with both approaches, head to the [Quickstart](/docs/use_cases/tool_use/quickstart) page."
|
||||
]
|
||||
|
@ -143,6 +143,8 @@
|
||||
"\n",
|
||||
"If we know that we only need to use a tool a fixed number of times, we can create a chain for doing so. Let's create a simple chain that just multiplies user-specified numbers.\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"### Function calling\n",
|
||||
"One of the most reliable ways to use tools with LLMs is with function calling APIs (also sometimes called tool calling or parallel function calling). This only works with models that explicitly support function calling, like OpenAI models.\n",
|
||||
"\n",
|
||||
@ -332,7 +334,9 @@
|
||||
"\n",
|
||||
"LangChain comes with a number of built-in agents that are optimized for different use cases. Read about all the [agent types here](/docs/modules/agents/agent_types/).\n",
|
||||
"\n",
|
||||
"As an example, let's try out the OpenAI tools agent, which makes use of the new OpenAI tool-calling API (this is only available in the latest OpenAI models, and differs from function-calling in that the model can return multiple function invocations at once):"
|
||||
"As an example, let's try out the OpenAI tools agent, which makes use of the new OpenAI tool-calling API (this is only available in the latest OpenAI models, and differs from function-calling in that the model can return multiple function invocations at once)\n",
|
||||
"\n",
|
||||
""
|
||||
]
|
||||
},
|
||||
{
|
||||
|
104
docs/static/img/tool_agent.svg
vendored
Normal file
104
docs/static/img/tool_agent.svg
vendored
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 100 KiB |
306
docs/static/img/tool_chain.svg
vendored
Normal file
306
docs/static/img/tool_chain.svg
vendored
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 304 KiB |
Loading…
Reference in New Issue
Block a user