瀏覽代碼

server : fix webui (#15462)

* Fix webui crash after streaming

* build webui
stduhpf 5 月之前
父節點
當前提交
1b0db8f6e0
共有 2 個文件被更改,包括 1 次插入1 次删除
  1. 二進制
      tools/server/public/index.html.gz
  2. 1 1
      tools/server/webui/src/utils/app.context.tsx

二進制
tools/server/public/index.html.gz


+ 1 - 1
tools/server/webui/src/utils/app.context.tsx

@@ -255,7 +255,7 @@ export const AppContextProvider = ({
         if (chunk.error) {
           throw new Error(chunk.error?.message || 'Unknown error');
         }
-        const addedContent = chunk.choices[0].delta.content;
+        const addedContent = chunk.choices[0]?.delta.content;
         const lastContent = pendingMsg.content || '';
         if (addedContent) {
           pendingMsg = {