From 8ff43aef1a6b750901d074c2dc5716995e555d1b Mon Sep 17 00:00:00 2001 From: nai-degen <44111-khanon@users.noreply.gitgud.io> Date: Tue, 9 May 2023 19:17:00 -0500 Subject: [PATCH] disables kobold endpoint when queueing is enabled --- src/proxy/kobold.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/proxy/kobold.ts b/src/proxy/kobold.ts index 732b924..e278e2f 100644 --- a/src/proxy/kobold.ts +++ b/src/proxy/kobold.ts @@ -34,6 +34,12 @@ const rewriteRequest = ( req: Request, res: Response ) => { + if (config.queueMode !== "none") { + const msg = `Queueing is enabled on this proxy instance and is incompatible with the KoboldAI endpoint. Use the OpenAI endpoint instead.`; + proxyReq.destroy(new Error(msg)); + return; + } + req.api = "kobold"; const rewriterPipeline = [ addKey,