So actually someone posted a better approach here:
stevenic
6
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| How to tokenize a request with functions? | 7 | 6269 | December 15, 2023 | |
| Input tokens and function definitions | 5 | 1505 | June 14, 2023 | |
| How do you get tokens count gpt3.5-0613 ‘functions’ param? | 2 | 1045 | August 28, 2023 | |
| Function execution result: how to produce less tokens? | 5 | 1517 | July 13, 2023 | |
| Struggling to get correct token count | 3 | 2117 | December 29, 2025 |