diff --git a/default.env b/default.env index 8858fb8..106f26b 100644 --- a/default.env +++ b/default.env @@ -43,3 +43,6 @@ USE_MMAP=1 # Only use MLOCK if you know what it does! USE_MLOCK=0 + +# The higher the number the more hard core. +REPEAT_PENALTY=1 \ No newline at end of file diff --git a/llamabot.js b/llamabot.js index 22200a5..893d7cb 100644 --- a/llamabot.js +++ b/llamabot.js @@ -316,7 +316,9 @@ async function generateResponse(conversation, message) { }, body: JSON.stringify({ messages: messagesCopy, - max_tokens: Number(process.env.MAX_TOKENS) // add the max_tokens parameter here + max_tokens: Number(process.env.MAX_TOKENS), // add the max_tokens parameter here + repeat_penalty: Number(process.env.REPEAT_PENALTY) + }), signal: controller.signal });