Closed viswavi closed 11 months ago
If you're using the chat API are you accounting for the chat messages? E.g. see the discussion in Section 6 of https://github.com/openai/openai-cookbook/blob/main/examples/How_to_count_tokens_with_tiktoken.ipynb
If you have further issues, please contact support@openai.com
We have a long prompt (shown at the bottom of this message). Tiktoken (with the encoding name
cl100k_base
) says this prompt has 2554 tokens, but OpenAI's API says that this prompt contains 2561 tokens. This mismatch is causing issues for our application.We are using Tiktoken like this:
To say there are 2554 tokens.
Prompt: