From fe1d5ffb5bb053a20fad8d7b16be238d4becb396 Mon Sep 17 00:00:00 2001 From: = Date: Mon, 27 Nov 2023 21:29:07 -0800 Subject: [PATCH 1/2] Just added a type ThreadMessage in the 5th block of code. --- .../assistants_code_interpreter.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/06_assistants_code_interpreter/assistants_code_interpreter.ipynb b/06_assistants_code_interpreter/assistants_code_interpreter.ipynb index 171c00e0..b3c3d3ed 100644 --- a/06_assistants_code_interpreter/assistants_code_interpreter.ipynb +++ b/06_assistants_code_interpreter/assistants_code_interpreter.ipynb @@ -125,7 +125,7 @@ "source": [ "from openai.types.beta.threads.thread_message import ThreadMessage\n", "\n", - "message = client.beta.threads.messages.create(\n", + "message: ThreadMessage = client.beta.threads.messages.create(\n", " thread_id=thread.id,\n", " role=\"user\",\n", " content=\"I need to solve the equation `3x + 11 = 14`. Can you help me?\"\n", From 7a91ae5a674fb2b055d141d11720fd212f0fc8c7 Mon Sep 17 00:00:00 2001 From: = Date: Mon, 27 Nov 2023 21:37:56 -0800 Subject: [PATCH 2/2] Added type ThreadMessage in files 7 and 8 --- .../assistants_knowledge_retrieval.ipynb | 2 +- .../assistants_function_calling.ipynb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/07_assistants_knowledge_retrieval/assistants_knowledge_retrieval.ipynb b/07_assistants_knowledge_retrieval/assistants_knowledge_retrieval.ipynb index 9a17e7ad..0d577157 100644 --- a/07_assistants_knowledge_retrieval/assistants_knowledge_retrieval.ipynb +++ b/07_assistants_knowledge_retrieval/assistants_knowledge_retrieval.ipynb @@ -179,7 +179,7 @@ "source": [ "from openai.types.beta.threads.thread_message import ThreadMessage\n", "\n", - "message = client.beta.threads.messages.create(\n", + "message: ThreadMessage = client.beta.threads.messages.create(\n", " thread_id=thread.id,\n", " role=\"user\",\n", " content=\"When and which city Zia U. Khan was born?\"\n", diff --git a/08_assistants_function_calling/assistants_function_calling.ipynb b/08_assistants_function_calling/assistants_function_calling.ipynb index 69c84599..156bb05f 100644 --- a/08_assistants_function_calling/assistants_function_calling.ipynb +++ b/08_assistants_function_calling/assistants_function_calling.ipynb @@ -207,7 +207,7 @@ "from openai.types.beta.threads.thread_message import ThreadMessage\n", "\n", "# First Request\n", - "message = client.beta.threads.messages.create(\n", + "message: ThreadMessage = client.beta.threads.messages.create(\n", " thread_id=thread.id,\n", " role=\"user\",\n", " content=\"How is the weather in Los Angles?\"\n",