Skip to content

Commit 1077647

Browse files
authored
Merge pull request #33 from CommandAI/issue/config_models
issue not displaying models
2 parents ab7210d + 73f7510 commit 1077647

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ async function promptChatGPTAPIKey(defaultApiKey) {
180180
return chatgptConfig;
181181
}
182182

183-
async function promptChatGPTModels(defaultModel) {
184-
const models = await fetchChatGPTModels();
183+
async function promptChatGPTModels(defaultModel, defaultApiKey) {
184+
const models = await fetchChatGPTModels(defaultApiKey);
185185
if (models.length === 0) {
186186
console.error(
187187
"No models found for the provided API key. Please try again.",
@@ -207,7 +207,7 @@ async function promptChatGPTConfig(defaultApiKey, defaultModel) {
207207

208208
if (!chatgptConfig) return null;
209209

210-
const chatgptModel = await promptChatGPTModels(defaultModel);
210+
const chatgptModel = await promptChatGPTModels(defaultModel, defaultApiKey);
211211

212212
if (!chatgptModel) return null;
213213

0 commit comments

Comments
 (0)