[fix] oai keys not applying
This commit is contained in:
@@ -198,7 +198,7 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
|
|||||||
body: JSON.stringify(body),
|
body: JSON.stringify(body),
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Authorization": "Bearer " + aiModel === 'reverse_proxy' ? db.proxyKey : db.openAIKey,
|
"Authorization": "Bearer " + (aiModel === 'reverse_proxy' ? db.proxyKey : db.openAIKey),
|
||||||
"Content-Type": "application/json"
|
"Content-Type": "application/json"
|
||||||
},
|
},
|
||||||
signal: abortSignal
|
signal: abortSignal
|
||||||
@@ -259,7 +259,7 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
|
|||||||
const res = await globalFetch(replacerURL, {
|
const res = await globalFetch(replacerURL, {
|
||||||
body: body,
|
body: body,
|
||||||
headers: {
|
headers: {
|
||||||
"Authorization": "Bearer " + db.openAIKey
|
"Authorization": "Bearer " + (aiModel === 'reverse_proxy' ? db.proxyKey : db.openAIKey),
|
||||||
},
|
},
|
||||||
abortSignal
|
abortSignal
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user