[fix] fix kobold
This commit is contained in:
@@ -424,15 +424,17 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
|
|||||||
case "kobold":{
|
case "kobold":{
|
||||||
const proompt = stringlizeChat(formated, currentChar?.name ?? '')
|
const proompt = stringlizeChat(formated, currentChar?.name ?? '')
|
||||||
const url = new URL(db.koboldURL)
|
const url = new URL(db.koboldURL)
|
||||||
url.pathname = 'api/v1/generate'
|
if(url.pathname.length < 3){
|
||||||
|
url.pathname = 'api/v1/generate'
|
||||||
|
}
|
||||||
|
|
||||||
const da = await globalFetch(url.toString(), {
|
const da = await globalFetch(url.toString(), {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: JSON.stringify({
|
body: {
|
||||||
"prompt": proompt,
|
"prompt": proompt,
|
||||||
"temperature": (db.temperature / 100),
|
"temperature": (db.temperature / 100),
|
||||||
"top_p": 0.9
|
"top_p": 0.9
|
||||||
}),
|
},
|
||||||
headers: {
|
headers: {
|
||||||
"content-type": "application/json",
|
"content-type": "application/json",
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user