add user request limit to config, rename previous limit to read limit
This commit is contained in:
parent
0931fe103d
commit
e6d6764e34
4 changed files with 11 additions and 6 deletions
|
@ -107,7 +107,7 @@ export default function toOpenAIMessages(
|
|||
const content = formatMessage(message);
|
||||
// FIXME: tokens are not being counted properly (it's lower than it is) but it's enough for me for now.
|
||||
tokenCount += countTokens(content);
|
||||
if (tokenCount > config.limits.tokens) break;
|
||||
if (tokenCount > config.readLimits.tokens) break;
|
||||
rvalue.push({
|
||||
role: message.author.id === message.client.user.id ? "assistant" : "user",
|
||||
content: content,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue