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

Keep track of token usage #5

Open
felixarntz opened this issue Sep 22, 2024 · 1 comment
Open

Keep track of token usage #5

felixarntz opened this issue Sep 22, 2024 · 1 comment
Labels
feature New feature request

Comments

@felixarntz
Copy link
Owner

The AI services infrastructure should keep track of token usage, for both user prompts and model responses. The numbers should be persistently stored (e.g. in user meta or options), so that plugins can use them for reporting or limiting usage of certain features.

Ideally, the token usage would be distributed in distinct buckets per feature - maybe every feature could provide a unique slug to use for this dimension.

@felixarntz felixarntz added the feature New feature request label Sep 22, 2024
felixarntz added a commit that referenced this issue Oct 5, 2024
@felixarntz
Copy link
Owner Author

Potentially helpful library: https://github.com/yethee/tiktoken-php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request
Projects
None yet
Development

No branches or pull requests

1 participant