[feat] custom proxy requst model

This commit is contained in:
kwaroran
2023-09-23 16:24:57 +09:00
parent 4a34dc3e23
commit dc65a386f2
3 changed files with 13 additions and 2 deletions

View File

@@ -168,7 +168,11 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
const oaiFunctionCall = oaiFunctions ? (arg.useEmotion ? {"name": "set_emotion"} : "auto") : undefined
const requestModel = (aiModel === 'reverse_proxy' || aiModel === 'openrouter') ? db.proxyRequestModel : aiModel
let requestModel = (aiModel === 'reverse_proxy' || aiModel === 'openrouter') ? db.proxyRequestModel : aiModel
if(aiModel === 'reverse_proxy' && db.proxyRequestModel === 'custom'){
requestModel = db.customProxyRequestModel
}
const body = ({
model: aiModel === 'openrouter' ? db.openrouterRequestModel :
requestModel === 'gpt35' ? 'gpt-3.5-turbo'

View File

@@ -316,6 +316,7 @@ export function setDatabase(data:Database){
data.NAIsettings.mirostat_tau ??= 0
data.NAIsettings.mirostat_lr ??= 1
data.autofillRequestUrl ??= true
data.customProxyRequestModel ??= ''
changeLanguage(data.language)
DataBase.set(data)
}