Skip to content

Examples and guides for using the OpenAI API

Remove chatml references (#1255)

David Schnurrffa9ad20ebcd
diff --git a/examples/How_to_count_tokens_with_tiktoken.ipynb b/examples/How_to_count_tokens_with_tiktoken.ipynb
index 42eecc9d..362b2670 100644
--- a/examples/How_to_count_tokens_with_tiktoken.ipynb
+++ b/examples/How_to_count_tokens_with_tiktoken.ipynb
@@ -465,7 +465,7 @@
" return num_tokens_from_messages(messages, model=\"gpt-4-0613\")\n",
" else:\n",
" raise NotImplementedError(\n",
- " f\"\"\"num_tokens_from_messages() is not implemented for model {model}. See https://github.com/openai/openai-python/blob/main/chatml.md for information on how messages are converted to tokens.\"\"\"\n",
+ " f\"\"\"num_tokens_from_messages() is not implemented for model {model}.\"\"\"\n",
" )\n",
" num_tokens = 0\n",
" for message in messages:\n",
diff --git a/examples/How_to_format_inputs_to_ChatGPT_models.ipynb b/examples/How_to_format_inputs_to_ChatGPT_models.ipynb
index 847d45b4..d08fb9cc 100644
--- a/examples/How_to_format_inputs_to_ChatGPT_models.ipynb
+++ b/examples/How_to_format_inputs_to_ChatGPT_models.ipynb
@@ -543,7 +543,7 @@
" return num_tokens_from_messages(messages, model=\"gpt-4-0613\")\n",
" else:\n",
" raise NotImplementedError(\n",
- " f\"\"\"num_tokens_from_messages() is not implemented for model {model}. See https://github.com/openai/openai-python/blob/main/chatml.md for information on how messages are converted to tokens.\"\"\"\n",
+ " f\"\"\"num_tokens_from_messages() is not implemented for model {model}.\"\"\"\n",
" )\n",
" num_tokens = 0\n",
" for message in messages:\n",