From ddd24d3424c27a499a8521948a7930280ce80626 Mon Sep 17 00:00:00 2001 From: "changhuiping.chp" Date: Wed, 5 Jul 2023 11:03:37 +0800 Subject: [PATCH] fix: fix to static compile --- datacenter/hooks/useAgentChat.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datacenter/hooks/useAgentChat.ts b/datacenter/hooks/useAgentChat.ts index d9c734e20..f14f72b05 100644 --- a/datacenter/hooks/useAgentChat.ts +++ b/datacenter/hooks/useAgentChat.ts @@ -49,7 +49,7 @@ import { useDialogueContext } from '@/app/context/dialogue'; const ctrl = new AbortController(); let buffer = ''; - await fetchEventSource(`${process.env.API_BASE_URL + "/api" + queryAgentURL}`, { + await fetchEventSource(`${process.env.API_BASE_URL ? process.env.API_BASE_URL : ''}${"/api" + queryAgentURL}`, { method: 'POST', headers: { 'Content-Type': 'application/json',