Skip to content

Commit a3592da

Browse files
committed
fix: baseUrl
1 parent d2338d7 commit a3592da

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

packages/common/js/completion.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,11 @@ const generateBaseReference = () => {
197197
const fetchAiInlineCompletion = (codeBeforeCursor, codeAfterCursor) => {
198198
const { completeModel, apiKey, baseUrl } = useRobot().robotSettingState?.selectedModel || {}
199199
if (!completeModel || !apiKey || !baseUrl) {
200-
throw new Error(`"model" & "apiKey" & "baseUrl" cannot be empty`)
200+
return
201201
}
202202
const referenceContext = generateBaseReference()
203203
return getMetaApi(META_SERVICE.Http).post(
204-
`${baseUrl}/chat/completions`,
204+
'/app-center/api/chat/completions',
205205
{
206206
model: completeModel,
207207
messages: [
@@ -212,6 +212,7 @@ const fetchAiInlineCompletion = (codeBeforeCursor, codeAfterCursor) => {
212212
.replace('$codeAfterCursor$', codeAfterCursor)
213213
}
214214
],
215+
baseUrl,
215216
stream: false
216217
},
217218
{

0 commit comments

Comments
 (0)