[feat] fix horde support

This commit is contained in:
kwaroran
2024-01-03 19:36:47 +09:00
parent 99743f581a
commit 23ef56cb33
3 changed files with 41 additions and 35 deletions

View File

@@ -1540,25 +1540,12 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
"prompt": proompt,
"params": {
"n": 1,
"frmtadsnsp": false,
"frmtrmblln": false,
"frmtrmspch": false,
"frmttriminc": false,
"max_context_length": db.maxContext + 100,
"max_length": db.maxResponse,
"rep_pen": 3,
"rep_pen_range": 0,
"rep_pen_slope": 10,
"singleline": false,
"temperature": db.temperature / 100,
"tfs": 1,
"top_a": 1,
"top_k": 100,
"top_p": 1,
"typical": 1,
"sampler_order": [
0
]
"top_k": db.top_k,
"top_p": db.top_p,
},
"trusted_workers": false,
"workerslow_workers": true,
@@ -1567,6 +1554,10 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
"models": [realModel, realModel.trim(), ' ' + realModel, realModel + ' ']
}
if(realModel === 'auto'){
delete argument.models
}
const da = await fetch("https://stablehorde.net/api/v2/generate/text/async", {
body: JSON.stringify(argument),
method: "POST",