NIUBOYI»Home › › › Chatgpt帮助文档 › 中文 | English
微信扫一扫 分享朋友圈

已有 1042 人浏览分享

[api设置]    Explanation of OpenAI API token input and output

api设置 2024-6-6 15:49:131042 0
What Are Prompt Tokens?
Prompt tokens refer to the number of tokens you input into the model, that is, the number of tokens contained in your prompt.

What Are Completion Tokens?
Completion tokens are the number of any tokens generated by the model in response to your input. For standard requests, this is the number of tokens in the completion part.

Most models we provide have limits on the number of tokens they can receive (prompt tokens) and the number of tokens they can output (completion tokens or samples tokens).

The Difference Between Input and Output Tokens
Input tokens (prompt tokens): refer to the number of tokens you provide to the model. It includes all the content you input in the request, such as questions, instructions, context, etc.
Output tokens (completion tokens): refer to the number of tokens generated by the model in its response. This includes the answers, explanations, suggestions, etc. generated by the model.
This also includes any tokens generated when using a higher best_of or n value. For example, if best_of = 3 is used to generate 3 candidate completions, then the number of sampled tokens will be at most 3 * max_tokens.
  • WeChat Official Account

  • Scan to Visit Mobile Site

QQ|NIUBOYI ( 京ICP备17025393号 )|网站地图

GMT+8, 2026-10-31 07:16 , Processed in 0.245433 second(s), 37 queries .

POWERED BY NIUBOYIAI! 主理人:NIUBOYIAI  点亮哥

Copyright © 2001-2020, NIUBOYI AI.