fix: fix to static compile

This commit is contained in:
changhuiping.chp 2023-07-05 11:03:37 +08:00
parent 05a78d4144
commit 6ee35fd128

View File

@ -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',