diff --git a/discord/commands/config/config.ts b/discord/commands/config/config.ts index e48cf0a..1da8bd3 100644 --- a/discord/commands/config/config.ts +++ b/discord/commands/config/config.ts @@ -7,6 +7,7 @@ import 'dotenv/config'; const config = { llmSettings: { max_new_tokens: 128, + min_new_tokens: 1, temperature: 0.9, repetition_penalty: 1.5, msg_context: 8 @@ -22,6 +23,7 @@ async function configCommand(interaction: ChatInputCommandInteraction) } config.llmSettings.max_new_tokens = interaction.options.getInteger('max_new_tokens') ?? config.llmSettings.max_new_tokens; + config.llmSettings.min_new_tokens = interaction.options.getInteger('min_new_tokens') ?? config.llmSettings.min_new_tokens; config.llmSettings.msg_context = interaction.options.getInteger('msg_context') ?? config.llmSettings.msg_context; config.llmSettings.temperature = interaction.options.getNumber('temperature') ?? config.llmSettings.temperature; config.llmSettings.repetition_penalty = interaction.options.getNumber('repetition_penalty') ?? config.llmSettings.repetition_penalty; @@ -29,6 +31,7 @@ async function configCommand(interaction: ChatInputCommandInteraction) await interaction.reply(` \`\`\` max_new_tokens = ${config.llmSettings.max_new_tokens} +min_new_tokens = ${config.llmSettings.min_new_tokens} msg_context = ${config.llmSettings.msg_context} temperature = ${config.llmSettings.temperature} repetition_penalty = ${config.llmSettings.repetition_penalty} @@ -50,6 +53,9 @@ export = { .addIntegerOption( opt => opt.setName('max_new_tokens').setDescription('Max. new tokens (default: 128)') ) + .addIntegerOption( + opt => opt.setName('min_new_tokens').setDescription('Min. new tokens (default: 1)') + ) .addIntegerOption( opt => opt.setName('msg_context').setDescription('Num. messages in context (default: 8)') )