From 34a4422af0ecef91149af777291e166bf35bd320 Mon Sep 17 00:00:00 2001 From: kwaroran Date: Thu, 4 Jan 2024 03:49:21 +0900 Subject: [PATCH] [feat] add horde default key --- src/ts/process/request.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ts/process/request.ts b/src/ts/process/request.ts index dfed1ca5..11ce39fd 100644 --- a/src/ts/process/request.ts +++ b/src/ts/process/request.ts @@ -1563,12 +1563,17 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model' delete argument.models } + let apiKey = '0000000000' + if(db.hordeConfig.apiKey.length > 2){ + apiKey = db.hordeConfig.apiKey + } + const da = await fetch("https://stablehorde.net/api/v2/generate/text/async", { body: JSON.stringify(argument), method: "POST", headers: { "content-type": "application/json", - "apikey": db.hordeConfig.apiKey + "apikey": apiKey }, signal: abortSignal })