[feat] add autofill option
This commit is contained in:
@@ -53,6 +53,9 @@
|
||||
<div class="flex items-center mt-4">
|
||||
<Check bind:check={$DataBase.usePlainFetch} name="Force Plain Fetch"/>
|
||||
</div>
|
||||
<div class="flex items-center mt-4">
|
||||
<Check bind:check={$DataBase.autofillRequestUrl} name="Autofill Request URL"/>
|
||||
</div>
|
||||
<button
|
||||
on:click={async () => {
|
||||
alertMd(getRequestLog())
|
||||
|
||||
@@ -201,7 +201,7 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
|
||||
replacerURL = replacerURL.replace("risu::", '')
|
||||
}
|
||||
|
||||
if(aiModel === 'reverse_proxy'){
|
||||
if(aiModel === 'reverse_proxy' && db.autofillRequestUrl){
|
||||
if(replacerURL.endsWith('v1')){
|
||||
replacerURL += '/chat/completions'
|
||||
}
|
||||
|
||||
@@ -315,6 +315,7 @@ export function setDatabase(data:Database){
|
||||
data.NAIsettings.cfg_scale ??= 1
|
||||
data.NAIsettings.mirostat_tau ??= 0
|
||||
data.NAIsettings.mirostat_lr ??= 1
|
||||
data.autofillRequestUrl ??= true
|
||||
changeLanguage(data.language)
|
||||
DataBase.set(data)
|
||||
}
|
||||
@@ -484,6 +485,8 @@ export interface Database{
|
||||
freeApi:boolean
|
||||
}
|
||||
localStopStrings?:string[]
|
||||
autofillRequestUrl:boolean
|
||||
customProxyRequestModel:string
|
||||
}
|
||||
|
||||
export interface customscript{
|
||||
|
||||
Reference in New Issue
Block a user