├── .github └── workflows │ ├── publish_to_pypi.yml │ └── run_tests.yml ├── .gitignore ├── LICENSE ├── README.md ├── requirements.txt ├── setup.py ├── tests ├── .env.example ├── node_example.ts ├── python_example.py └── test_tokmon.py └── tokmon ├── __init__.py ├── beam.py ├── cli.py ├── costcalculator.py ├── openai-pricing.json ├── tokmon.py └── utils.py /.github/workflows/publish_to_pypi.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yagil/tokmon/HEAD/.github/workflows/publish_to_pypi.yml -------------------------------------------------------------------------------- /.github/workflows/run_tests.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yagil/tokmon/HEAD/.github/workflows/run_tests.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yagil/tokmon/HEAD/.gitignore -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yagil/tokmon/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yagil/tokmon/HEAD/README.md -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | mitmproxy==9.0.1 2 | tiktoken==0.3.3 -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yagil/tokmon/HEAD/setup.py -------------------------------------------------------------------------------- /tests/.env.example: -------------------------------------------------------------------------------- 1 | OPENAI_API_KEY="enter your key here" -------------------------------------------------------------------------------- /tests/node_example.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yagil/tokmon/HEAD/tests/node_example.ts -------------------------------------------------------------------------------- /tests/python_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yagil/tokmon/HEAD/tests/python_example.py -------------------------------------------------------------------------------- /tests/test_tokmon.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yagil/tokmon/HEAD/tests/test_tokmon.py -------------------------------------------------------------------------------- /tokmon/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tokmon/beam.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yagil/tokmon/HEAD/tokmon/beam.py -------------------------------------------------------------------------------- /tokmon/cli.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yagil/tokmon/HEAD/tokmon/cli.py -------------------------------------------------------------------------------- /tokmon/costcalculator.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yagil/tokmon/HEAD/tokmon/costcalculator.py -------------------------------------------------------------------------------- /tokmon/openai-pricing.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yagil/tokmon/HEAD/tokmon/openai-pricing.json -------------------------------------------------------------------------------- /tokmon/tokmon.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yagil/tokmon/HEAD/tokmon/tokmon.py -------------------------------------------------------------------------------- /tokmon/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yagil/tokmon/HEAD/tokmon/utils.py --------------------------------------------------------------------------------