rubenselander/openai-function-tokens
Predict the exact openai token usage of functions
This tool helps AI application developers accurately predict how many OpenAI tokens their chat completions will consume, especially when using function calling. You provide your planned chat messages and function definitions, and it returns a precise token count. This allows developers to better manage API costs and optimize their prompts before deployment.
No commits in the last 6 months.
Use this if you are building applications with OpenAI's API and need to know the exact token cost of your chat completions, particularly when integrating function calling.
Not ideal if you are not developing with OpenAI's API or if you only need a rough estimate of token usage without considering functions.
Stars
19
Forks
1
Language
Python
License
—
Category
Last pushed
Sep 20, 2023
Commits (30d)
0
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/llm-tools/rubenselander/openai-function-tokens"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Higher-rated alternatives
ndycode/oc-chatgpt-multi-auth
OpenCode plugin for using ChatGPT Plus/Pro in GPT-5 and Codex workflows with OAuth login,...
oceanlvr/ChatGPT-ProBot
🤖️ A ChatGPT based GitHub robot. dialogue/CR/etc..
dataforseo/open-ai-actions
OpenAPI specs for integrating DataForSEO APIs with ChatGPT Actions
rizerphe/openai-functions
Generate ChatGPT function call schemas based on function docstrings.
FullStackWithLawrence/openai-hello-world
A Python "Hello World" application that also demonstrates the OpenAI API and usage of Docker.