#Is cached input included in input?

1 messages · Page 1 of 1 (latest)

compact orchid
magic cairnBOT
#

Hi @compact orchid. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Yes, cached input is included in the input token count. According to the OpenAI API documentation, the field input_tokens represents "the aggregated number of text input tokens used, including cached tokens" (emphasis added). The input_cached_tokens field specifically breaks out the number of those tokens that were cached from previous requests, but the total input_tokens value already includes them. This applies to the usage data you see in the developer console at https://platform.openai.com/usage Completions usage object.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@compact orchid Kapa.ai is still learning and improving, please let me know how I did by reacting below.

compact orchid
#

@magic cairn In the developer console I mean

magic cairnBOT
#

Let me check the knowledge base for you again. One moment! :books:

#

Yes, in the OpenAI developer console (https://platform.openai.com/usage), the "input" token count includes cached input tokens. The documentation states that the input_tokens field is "the aggregated number of text input tokens used, including cached tokens" Completions usage object. This means the total input tokens you see in the console already account for any cached input.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: