diff --git a/index.mjs b/index.mjs index 34e88e7..275b4c0 100644 --- a/index.mjs +++ b/index.mjs @@ -12,7 +12,12 @@ app.use(express.json({ limit: "500mb" })); let client; if (process.env.ENABLE_ROUTER) { - client = new Router(); + const router = new Router(); + client = { + call: (data) => { + return router.route(data); + }, + }; } else { const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY,