-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add token limit for GPT models and update prompt token limit calculation
This commit adds a function to calculate the maximum token limit for a given GPT model. It also updates the `AllowedInputTokens` and `AllowedSubsequentInputTokens` functions to use the token limit instead of hardcoding the value to 4096. Additionally, the `CreateMessagesWithSplit` function is updated to use the new `AllowedInputTokens` function signature. Finally, a new test function is added to test the `tokenLimitOfModel` function.
- Loading branch information
Showing
3 changed files
with
42 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters