From f2b64f2334931df3d209e237a88ad3ccfd17b4bf Mon Sep 17 00:00:00 2001 From: kwaroran Date: Mon, 29 May 2023 17:41:59 +0900 Subject: [PATCH] [fix] fix kobold --- src/ts/process/request.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ts/process/request.ts b/src/ts/process/request.ts index 50eece79..2a2897d9 100644 --- a/src/ts/process/request.ts +++ b/src/ts/process/request.ts @@ -424,15 +424,17 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model' case "kobold":{ const proompt = stringlizeChat(formated, currentChar?.name ?? '') 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(), { method: "POST", - body: JSON.stringify({ + body: { "prompt": proompt, "temperature": (db.temperature / 100), "top_p": 0.9 - }), + }, headers: { "content-type": "application/json", }