You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
andcompletion_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 aboutcached_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.
The text was updated successfully, but these errors were encountered: