4 ms·You can use https://github.com/openai/tiktoken https://github.com/openai/tiktokenby iamjackg 4y agoYou can use https://github.com/openai/tiktoken https://github.com/openai/tiktoken