openai-openapi icon indicating copy to clipboard operation
openai-openapi copied to clipboard

Add 'cached_tokens' to API spec

Open kirk-marple opened this issue 1 year ago • 0 comments

With the recent release of prompt caching, there are new properties for 'cached_tokens'.

"usage": {
  "prompt_tokens": 2006,
  "completion_tokens": 300,
  "total_tokens": 2306,
  "prompt_tokens_details": {
    "cached_tokens": 1920
  },
  "completion_tokens_details": {
    "reasoning_tokens": 0
  }
}

Would be good to get this added to this spec, so clients like the dotnet SDK can expose them.

kirk-marple avatar Oct 03 '24 19:10 kirk-marple