Skip to content

Commit 02a2542

Browse files
committed
Fix webui crash after streaming
1 parent 1bc664a commit 02a2542

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/server/webui/src/utils/app.context.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ export const AppContextProvider = ({
255255
if (chunk.error) {
256256
throw new Error(chunk.error?.message || 'Unknown error');
257257
}
258-
const addedContent = chunk.choices[0].delta.content;
258+
const addedContent = chunk.choices[0]?.delta.content;
259259
const lastContent = pendingMsg.content || '';
260260
if (addedContent) {
261261
pendingMsg = {

0 commit comments

Comments
 (0)