diff --git a/commands/system/new-chat.js b/commands/system/new-chat.js index 8a909bb..814ee6f 100644 --- a/commands/system/new-chat.js +++ b/commands/system/new-chat.js @@ -19,9 +19,21 @@ module.exports = { name: "create-session", description: "create a new session chat", private: true, + options: [{ + "name": "init-prompt", + "description": "A prompt you want to init the chat with, a default is used if not provided.", + "required": false, + "type": 3 // 6 is type USER +}], run: async (client, interaction) => { const file = './cache/' + interaction.user.id + if (!interaction.options._hoistedOptions[0]){ + console.log("-- No init-prompt provided, using default --") + } else [ + initPrompt = interaction.options._hoistedOptions[0].value + ] + var req = unirest('POST', apiUrl + '?model=' + model + '&temperature=' + temperature + '&top_k=' + topK + '&top_p=' + topP + '&max_length=' + maxLength + '&context_window=' + contextWindow + '&repeat_last_n=' + repeatLastN + '&repeat_penalty=' + repeatPenalty + '&init_prompt=' + initPrompt + '&n_threads=' + nThreads) .headers({ 'accept': 'application/json'