gcc3 / simple-ai-chat

AI chat application.
https://simple-ai.io
Other
1 stars 7 forks source link

Input length limitation check #443

Closed lhypds closed 3 months ago

lhypds commented 10 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

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)

lhypds commented 3 months ago

Fixed