diff --git a/examples/openai-gpt.ipynb b/examples/openai-gpt.ipynb index 09cf5ac3..eafb40e1 100644 --- a/examples/openai-gpt.ipynb +++ b/examples/openai-gpt.ipynb @@ -131,10 +131,10 @@ "outputs": [], "source": [ "message = [{\"role\": \"user\", \"content\": \"Write a 12 word poem about secret agents.\"}]\n", - "res = openai.chat.completions.create(\n", + "response = openai.chat.completions.create(\n", " model=\"gpt-3.5-turbo\", messages=message, temperature=0.5, stream=False\n", ")\n", - "print(res.choices[0].message[\"content\"])" + "print(response.choices[0].message.content)" ] }, { @@ -283,7 +283,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.4" + "version": "3.12.3" } }, "nbformat": 4,