8000 GitHub - dmtmov/tokensCounter
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

dmtmov/tokensCounter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tokens counter API-service

Basic service counts amount of tokens for provided text. Optional param: DEFAULT_MODEL with default value set to gpt-3.5-turbo. All the supported models are described here: https://github.com/openai/openai-cookbook/blob/main/examples/How_to_count_tokens_with_tiktoken.ipynb

Use

docker build --platform linux/amd64 -t tokens_counter .
docker run --platform linux/amd64 -p 8000:8000 -e DEFAULT_MODEL=davinci tokens_counter

API docs: http://0.0.0.0:8000/docs

Contribute

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn src.main:app --reload

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0