Skip to content

Docker container to expose the OpenAI tokenizer as a REST service

License

Notifications You must be signed in to change notification settings

howdymic/tiktoken-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tiktoken-server

Docker container to expose the OpenAI BPE tokenizer as a REST service. Uses the tiktoken project https://github.com/openai/tiktoken

Building

docker build -t tiktoken-server .

Running

docker run -it -p5000:5000 tiktoken-server

Calling using curl

$ curl -d '{"prompt" : "hello world", "model" : "text-davinci-003"}' -H "Content-Type: application/json"  http://localhost:5000/tokenize

About

Docker container to expose the OpenAI tokenizer as a REST service

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published