Skip to content

Commit 5106773

Browse files
committed
when the custom model url or key is empty, use the global value (#647)
1 parent 5faa395 commit 5106773

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/background/index.mjs

+4-2
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,10 @@ async function executeApi(session, port, config) {
9292
port,
9393
session.question,
9494
session,
95-
session.apiMode.customUrl.trim() || 'http://localhost:8000/v1/chat/completions',
96-
session.apiMode.apiKey,
95+
session.apiMode.customUrl.trim() ||
96+
config.customModelApiUrl.trim() ||
97+
'http://localhost:8000/v1/chat/completions',
98+
session.apiMode.apiKey.trim() || config.customApiKey,
9799
session.apiMode.customName,
98100
)
99101
} else if (isUsingChatgptWebModel(session)) {

0 commit comments

Comments
 (0)