Skip to content

Examples and guides for using the OpenAI API

Update How_to_handle_rate_limits.ipynb (#554)

sun zhun950246dd0810
diff --git a/examples/How_to_handle_rate_limits.ipynb b/examples/How_to_handle_rate_limits.ipynb
index 5748b87d..0e70e57a 100644
--- a/examples/How_to_handle_rate_limits.ipynb
+++ b/examples/How_to_handle_rate_limits.ipynb
@@ -132,9 +132,9 @@
"\n",
"# request a bunch of completions in a loop\n",
"for _ in range(100):\n",
- " openai.Completion.create(\n",
- " model=\"code-cushman-001\",\n",
- " prompt=\"def magic_function():\\n\\t\",\n",
+ " openai.ChatCompletion.create(\n",
+ " model=\"gpt-3.5-turbo\",\n",
+ " messages=[{\"role\": \"user\", \"content\": \"Hello\"}],\n",
" max_tokens=10,\n",
" )\n"
]