A token counter for counting tokens of LLM inputs and outputs
Project description
This function is responsible for counting the number of tokens in the text provided through an API call. It analyzes both the input text sent to the LLM and the output text generated by the LLM, counting the tokens in each to provide the necessary data for cost calculation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file token_counter-0.1.5.tar.gz.
File metadata
- Download URL: token_counter-0.1.5.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f39e0cc638edda7ed766279035798844cfa8cc83ff01aff8b1369d2720ec58e6
|
|
| MD5 |
2ffcf82c7e5563054cbf987120ea790d
|
|
| BLAKE2b-256 |
d200d6ed57568a5229786e541a71ca66d85903fa27a83df803bd7df2b7547442
|
File details
Details for the file token_counter-0.1.5-py3-none-any.whl.
File metadata
- Download URL: token_counter-0.1.5-py3-none-any.whl
- Upload date:
- Size: 2.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4113cc317ac33ee2d0fbed230486b77ed552e7c4710908ef1f150e19972c4d56
|
|
| MD5 |
24248a537d27deba97059a608e159b0f
|
|
| BLAKE2b-256 |
f1e47c673c8733173befc01ec8f85bba99a8fc93dff5ed9a4fc079f916732fba
|