From 4ccb9b684a9eec0f6f6a82b502a4c7a002cd936e Mon Sep 17 00:00:00 2001 From: Harrison Chase Date: Sun, 20 Nov 2022 22:20:50 -0800 Subject: [PATCH] cr --- .../demos/custom_routing_chains.ipynb | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/docs/examples/demos/custom_routing_chains.ipynb b/docs/examples/demos/custom_routing_chains.ipynb index a412ee90..b08637fe 100644 --- a/docs/examples/demos/custom_routing_chains.ipynb +++ b/docs/examples/demos/custom_routing_chains.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "b5db08e0", + "id": "0af33207", "metadata": {}, "source": [ "# Custom Routing Chains\n", @@ -12,7 +12,7 @@ }, { "cell_type": "markdown", - "id": "a922e870", + "id": "16773dc8", "metadata": {}, "source": [ "## Terminology\n", @@ -32,7 +32,7 @@ }, { "cell_type": "markdown", - "id": "a9f99ac7", + "id": "6eaca15e", "metadata": {}, "source": [ "## Router\n", @@ -88,7 +88,7 @@ }, { "cell_type": "markdown", - "id": "4f8835fc", + "id": "471389be", "metadata": {}, "source": [ "In order to understand why the router interface is what it is, let's take a look at how it is used in the RoutingChain class:\n", @@ -136,10 +136,24 @@ "```" ] }, + { + "cell_type": "markdown", + "id": "d9f6ca91", + "metadata": {}, + "source": [ + "Once we have the custom router written, it is pretty easy to construct the routing chain:\n", + "\n", + "```python\n", + "tools: List[ToolConfig] = ...\n", + "router = CustomRouter(....)\n", + "routing_chain = RoutingChain(tools=tools, router=router, verbose=True)\n", + "```" + ] + }, { "cell_type": "code", "execution_count": null, - "id": "d22d0f7a", + "id": "5d0c7662", "metadata": {}, "outputs": [], "source": []