Skip to content

Commit

Permalink
Fixing openai-gpt notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
HowieG committed Aug 16, 2024
1 parent 7a41ada commit 5540f61
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/openai-gpt.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
]
},
{
Expand Down Expand Up @@ -283,7 +283,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.4"
"version": "3.12.3"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 5540f61

Please sign in to comment.