diff --git a/bin/cli.js b/bin/cli.js index 3559373..6589a7e 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -29,8 +29,11 @@ async function main() { .option('-s, --store', 'Enables the local message cache', { default: true }) - .option('-t, --timeout', 'Timeout in milliseconds') + .option('-t, --timeout ', 'Timeout in milliseconds') .option('-k, --apiKey ', 'OpenAI API key') + .option('-m, --model ', 'Model (gpt-3.5-turbo, gpt-4)', { + default: 'gpt-3.5-turbo' + }) .option( '-n, --conversationName ', 'Unique name for the conversation' @@ -50,6 +53,7 @@ async function main() { options.continue && options.store ? config.get(conversationKey, {}) || {} : {} + const model = options.model let conversationId = undefined let parentMessageId = undefined @@ -68,6 +72,9 @@ async function main() { const api = new ChatGPTAPI({ apiKey, debug: options.debug, + completionParams: { + model + }, getMessageById: async (id) => { if (options.store) { return conversation[id]