Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for palm api usage stats #5

Open
2 of 5 tasks
victordibia opened this issue Sep 14, 2023 · 0 comments
Open
2 of 5 tasks

Support for palm api usage stats #5

victordibia opened this issue Sep 14, 2023 · 0 comments

Comments

@victordibia
Copy link
Owner

victordibia commented Sep 14, 2023

What

In many cases it is useful to keep track of the token usage for each query and associated costs. Different model provider apis handle this differently (some provide this information as part of a generate query response) and the task is to return accurate usage states in a unified format for all model providers

Work Items

  • OpenAI/AzureOpenAI
  • HuggingFace
  • PALM
    • Extend response from palm api to include usage information.
    • Standardize on usage format for all apis

Palm api response provides the following fields.

"metadata": {
    "tokenMetadata": {
      "input_token_count": {
        "total_tokens": integer,
        "total_billable_characters": integer
      },
      "output_token_count": {
        "total_tokens": integer,
        "total_billable_characters": integer
      }
    }
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant