From 0ba42de32fc017fb143d5a9d0040d4c4f8a1b83f Mon Sep 17 00:00:00 2001 From: Leask Wong Date: Tue, 2 Jan 2024 04:06:36 -0500 Subject: [PATCH] Frozen @ Tue Jan 2 04:06:36 EST 2024 --- index.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.mjs b/index.mjs index 12388f4..4136800 100644 --- a/index.mjs +++ b/index.mjs @@ -38,7 +38,7 @@ const init = async (options) => { // init ai engines if (options?.openaiApiKey || options?.chatGptApiKey) { const apiKey = { apiKey: options?.openaiApiKey || options?.chatGptApiKey }; - await alan.init({ provider: 'openai', ...apiKey, ...options }); + await alan.init({ ...apiKey, ...options, provider: 'openai' }); ai['ChatGPT'] = { engine: 'CHATGPT', priority: options?.chatGptPriority || 0, };