Closed lhypds closed 3 months ago
For different models, there are different token limitations.
For token user input should be less than half of the max token. Refer tokenUtils.js
tokenUtils.js
For nextjs it seems there are some features already in the tiktoken package, require to check. Refer: https://www.npmjs.com/package/@dqbd/tiktoken
If user input too long, don't allow user to input more text. (currently no need warnings, just stop user input)
Fixed
For different models, there are different token limitations.
For token user input should be less than half of the max token. Refer
tokenUtils.js
For nextjs it seems there are some features already in the tiktoken package, require to check. Refer: https://www.npmjs.com/package/@dqbd/tiktoken
If user input too long, don't allow user to input more text. (currently no need warnings, just stop user input)