openai-chat-tokens

💬 Estimate the number of tokens an OpenAI chat completion will use

MIT License

Downloads
52.8K
Stars
85

Bot releases are visible (Hide)

openai-chat-tokens - v0.2.8 Latest Release

Published by hmarr about 1 year ago

What's Changed

Full Changelog: https://github.com/hmarr/openai-chat-tokens/compare/v0.2.7...v0.2.8

openai-chat-tokens - v0.2.7

Published by hmarr about 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/hmarr/openai-chat-tokens/compare/v0.2.6...v0.2.7

openai-chat-tokens - v0.2.6

Published by hmarr about 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/hmarr/openai-chat-tokens/compare/v0.2.5...v0.2.6

openai-chat-tokens - v0.2.5

Published by hmarr about 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/hmarr/openai-chat-tokens/compare/v0.2.4...v0.2.5

openai-chat-tokens - v0.2.4

Published by hmarr about 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/hmarr/openai-chat-tokens/compare/v0.2.3...v0.2.4

openai-chat-tokens - v0.2.3

Published by hmarr about 1 year ago

  • Pad first system message with newline, fixing off-by-one discrepancy
openai-chat-tokens - v0.2.2

Published by hmarr about 1 year ago

  • Adjust for the combination of a system message and functions (reduces token usage by 3)
  • Adjust for functions without descriptions (removes the description line altogether)
openai-chat-tokens - v0.2.1

Published by hmarr about 1 year ago

  • Include function_call property in estimate
openai-chat-tokens - v0.2.0

Published by hmarr over 1 year ago

  • Switch to pure JavaScript tokenizer (js-tiktoken)
  • Stop unnecessarily reloading the tiktoken encoding
openai-chat-tokens - v0.1.0

Published by hmarr over 1 year ago

Initial release