[fix] proxy key not working in web

This commit is contained in:
kwaroran
2023-07-08 11:19:23 +09:00
parent f464e29483
commit f42d0bd642

View File

@@ -186,7 +186,7 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
body: JSON.stringify(body), body: JSON.stringify(body),
headers: { headers: {
"risu-header": encodeURIComponent(JSON.stringify({ "risu-header": encodeURIComponent(JSON.stringify({
"Authorization": "Bearer " + db.openAIKey, "Authorization": "Bearer " + ((aiModel === 'reverse_proxy') ? db.proxyKey : db.openAIKey),
"Content-Type": "application/json" "Content-Type": "application/json"
})), })),
"risu-url": encodeURIComponent(replacerURL), "risu-url": encodeURIComponent(replacerURL),