disables kobold endpoint when queueing is enabled

This commit is contained in:
nai-degen 2023-05-09 19:17:00 -05:00
parent e03f3d48dd
commit 8ff43aef1a
1 changed files with 6 additions and 0 deletions

View File

@ -34,6 +34,12 @@ const rewriteRequest = (
req: Request, req: Request,
res: Response 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"; req.api = "kobold";
const rewriterPipeline = [ const rewriterPipeline = [
addKey, addKey,