-
Notifications
You must be signed in to change notification settings - Fork 235
Open
Labels
enhancementNew feature or requestNew feature or request
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.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request