openai-chat-tokens
openai-chat-tokens copied to clipboard
💬 Estimate the number of tokens an OpenAI chat completion will use
Results
3
openai-chat-tokens issues
Sort by
recently updated
recently updated
newest added
Hi! While using this package, I needed to import some private types. There were also some imports that were very tricky to use, so I moved the package to ESModules...
```js import OpenAI from "openai"; const openai = new OpenAI(); async function main() { const response = await openai.chat.completions.create({ model: "gpt-4o", messages: [ { role: "user", content: [ { type:...