From 8013aba072f1c54ba46618fe9b5d5b2908bfe2a2 Mon Sep 17 00:00:00 2001 From: thucpn <thucsh2@gmail.com> Date: Thu, 20 Mar 2025 16:36:07 +0700 Subject: [PATCH] config relative /api/chat --- packages/server/next/app/env.ts | 2 +- packages/server/next/public/config.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/server/next/app/env.ts b/packages/server/next/app/env.ts index d097278f3..c68769b19 100644 --- a/packages/server/next/app/env.ts +++ b/packages/server/next/app/env.ts @@ -8,5 +8,5 @@ */ export const getEnv = (name: string) => { if (typeof window === "undefined") return undefined; - return (window as any).LLAMAINDEX[name]; + return (window as any).LLAMAINDEX?.[name]; }; diff --git a/packages/server/next/public/config.js b/packages/server/next/public/config.js index 5ca494cc4..eeb0f9b02 100644 --- a/packages/server/next/public/config.js +++ b/packages/server/next/public/config.js @@ -1,5 +1,5 @@ // Override the window.LLAMAINDEX object to customize frontend window.LLAMAINDEX = { - CHAT_API: "http://localhost:3000/api/chat", + CHAT_API: "/api/chat", }; -- GitLab