Skip to content

Commit

Permalink
Rearrange headers
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheepsta300 committed Oct 8, 2024
1 parent ac350e3 commit 3fb48a5
Showing 1 changed file with 38 additions and 13 deletions.
51 changes: 38 additions & 13 deletions docs/docs/integrations/tools/azure_content_safety.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@
"## Overview"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Integration details"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -47,8 +54,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Integration details\n",
"\n",
"This section provides details about how the Azure AI Content Safety integration works, including setup."
]
},
Expand Down Expand Up @@ -166,13 +171,6 @@
")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Chaining"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -200,6 +198,29 @@
"## Invocation"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### [Invoke directly with args](/docs/concepts/#invoke-with-just-the-arguments)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Firstly, the tool can be used by directly passing input as an argument. However, this is discouraged as the tool is intended to be used in an executor chain."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"cs._run(input)"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -211,7 +232,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"By using `.invoke`, the model can be told what to do and assess if using the tools it was given would assist in it's response."
"By using `.invoke`, the model can be told what to do and assess if using the tools it was given would assist in it's response. This is the intended use."
]
},
{
Expand All @@ -230,14 +251,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### [Invoke directly with args](/docs/concepts/#invoke-with-just-the-arguments)"
"## Chaining"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Additionally, the tool can be used by directly passing input as an argument. However, this is discouraged as the tool is intended to be used in an executor chain."
"When creating an `AgentExecutor` as described earlier, an execution chain is formed. The sequence of events will be printed using the given prompt, and actions will occur in a chain-like manner."
]
},
{
Expand All @@ -246,7 +267,11 @@
"metadata": {},
"outputs": [],
"source": [
"cs._run(input)"
"agent = create_structured_chat_agent(model, tools, prompt)\n",
"\n",
"agent_executor = AgentExecutor(\n",
" agent=agent, tools=tools, verbose=True, handle_parsing_errors=True\n",
")"
]
},
{
Expand Down

0 comments on commit 3fb48a5

Please sign in to comment.