Skip to content

Commit

Permalink
when the custom model url or key is empty, use the global value (#647)
Browse files Browse the repository at this point in the history
  • Loading branch information
josStorer committed Aug 8, 2024
1 parent 5faa395 commit 5106773
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/background/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,10 @@ async function executeApi(session, port, config) {
port,
session.question,
session,
session.apiMode.customUrl.trim() || 'http://localhost:8000/v1/chat/completions',
session.apiMode.apiKey,
session.apiMode.customUrl.trim() ||
config.customModelApiUrl.trim() ||
'http://localhost:8000/v1/chat/completions',
session.apiMode.apiKey.trim() || config.customApiKey,
session.apiMode.customName,
)
} else if (isUsingChatgptWebModel(session)) {
Expand Down

0 comments on commit 5106773

Please sign in to comment.