Open
Description
Feature Description
OpenAI /chat/completion
API returns some "usage" information.
While this library makes some of that available in Usage.kt, the prompt_tokens_details
and completion_tokens_details
fields are missing.
Also see OpenAI doc for field details.
It would be great to make those details available.
Problem it Solves
Particular the prompt_tokens_details
contains information about cached_tokens
, which informs if OpenAI's caching is working as expected to avoid unexpected costs.
Proposed Solution
Add the missing fields to Usage.kt and read them from OpenAI's response.