From 280f6ef03e457c98210ea51c91a87e1ae1b675ef Mon Sep 17 00:00:00 2001 From: Ted Sanders Date: Tue, 13 Jun 2023 09:55:53 -0700 Subject: [PATCH 1/2] fixes function name --- examples/How_to_call_functions_with_chat_models.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/How_to_call_functions_with_chat_models.ipynb b/examples/How_to_call_functions_with_chat_models.ipynb index 072df587..4c5d6dba 100644 --- a/examples/How_to_call_functions_with_chat_models.ipynb +++ b/examples/How_to_call_functions_with_chat_models.ipynb @@ -757,7 +757,7 @@ "\n", "Now let's construct a scenario in which we provide a model with more than one function to call. We'll create an agent that uses data from arXiv to answer questions about academic subjects. It has two new functions at its disposal:\n", "- **get_articles**: A function that gets arXiv articles on a subject and summarizes them for the user with links.\n", - "- **reader_tool**: This function takes one of the previously searched articles, reads it in its entirety and summarizes the core argument, evidence and conclusions.\n", + "- **read_article_and_summarize**: This function takes one of the previously searched articles, reads it in its entirety and summarizes the core argument, evidence and conclusions.\n", "\n", "This will get you comfortable with a multi-tool workflow that can choose from multiple services, and where some of the data from the first function is persisted to be used by the second." ] From 9ccb2a994f61de4fc64af647014b3c59d67ea9d3 Mon Sep 17 00:00:00 2001 From: Ted Sanders Date: Tue, 13 Jun 2023 09:56:56 -0700 Subject: [PATCH 2/2] tool -> function in a few places --- examples/How_to_call_functions_with_chat_models.ipynb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/How_to_call_functions_with_chat_models.ipynb b/examples/How_to_call_functions_with_chat_models.ipynb index 4c5d6dba..f84fb29d 100644 --- a/examples/How_to_call_functions_with_chat_models.ipynb +++ b/examples/How_to_call_functions_with_chat_models.ipynb @@ -273,7 +273,7 @@ } ], "source": [ - "# The model first prompts the user for the information it needs to use the weather tool\n", + "# The model first prompts the user for the information it needs to use the weather function\n", "chat_response = chat_completion_request(\n", " conversation.conversation_history, functions=functions\n", ")\n", @@ -436,7 +436,7 @@ "functions = [\n", " {\n", " \"name\": \"ask_database\",\n", - " \"description\": \"Use this tool to answer user questions about music. Output should be a fully formed SQL query.\",\n", + " \"description\": \"Use this function to answer user questions about music. Output should be a fully formed SQL query.\",\n", " \"parameters\": {\n", " \"type\": \"object\",\n", " \"properties\": {\n", @@ -753,13 +753,13 @@ "id": "c282b9e3", "metadata": {}, "source": [ - "## Using Multiple Tools at Once\n", + "## Using Multiple Functions\n", "\n", "Now let's construct a scenario in which we provide a model with more than one function to call. We'll create an agent that uses data from arXiv to answer questions about academic subjects. It has two new functions at its disposal:\n", "- **get_articles**: A function that gets arXiv articles on a subject and summarizes them for the user with links.\n", "- **read_article_and_summarize**: This function takes one of the previously searched articles, reads it in its entirety and summarizes the core argument, evidence and conclusions.\n", "\n", - "This will get you comfortable with a multi-tool workflow that can choose from multiple services, and where some of the data from the first function is persisted to be used by the second." + "This will get you comfortable with a multi-function workflow that can choose from multiple services, and where some of the data from the first function is persisted to be used by the second." ] }, {