Skip to content

Commit d608a07

Browse files
Merge pull request #271064 from mrbullwinkle/mrb_04_03_2024_chatml
[Azure OpenAI] link fix
2 parents ab30309 + a25eb0e commit d608a07

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

articles/ai-services/openai/includes/chat-completion.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ def num_tokens_from_messages(messages, model="gpt-3.5-turbo-0613"):
502502
return num_tokens_from_messages(messages, model="gpt-4-0613")
503503
else:
504504
raise NotImplementedError(
505-
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."""
505+
f"""num_tokens_from_messages() is not implemented for model {model}."""
506506
)
507507
num_tokens = 0
508508
for message in messages:

articles/ai-services/openai/includes/chat-markup-language.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ print(response['choices'][0]['text'])
4040
> [!NOTE]
4141
> The following parameters aren't available with the gpt-35-turbo model: `logprobs`, `best_of`, and `echo`. If you set any of these parameters, you'll get an error.
4242
43-
The `<|im_end|>` token indicates the end of a message. We recommend including `<|im_end|>` token as a stop sequence to ensure that the model stops generating text when it reaches the end of the message. You can read more about the special tokens in the [Chat Markup Language (ChatML)](#chatml) section.
43+
The `<|im_end|>` token indicates the end of a message. We recommend including `<|im_end|>` token as a stop sequence to ensure that the model stops generating text when it reaches the end of the message.
4444

4545
Consider setting `max_tokens` to a slightly higher value than normal such as 300 or 500. This ensures that the model doesn't stop generating text before it reaches the end of the message.
4646

0 commit comments

Comments
 (0)