Skip to content

Commit 2a0e9d1

Browse files
authored
Cast event as ChatAppResponse (#1130)
1 parent d3762a4 commit 2a0e9d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/frontend/src/pages/chat/Chat.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ const Chat = () => {
9090
for await (const event of readNDJSONStream(responseBody)) {
9191
if (event["choices"] && event["choices"][0]["context"] && event["choices"][0]["context"]["data_points"]) {
9292
event["choices"][0]["message"] = event["choices"][0]["delta"];
93-
askResponse = event;
93+
askResponse = event as ChatAppResponse;
9494
} else if (event["choices"] && event["choices"][0]["delta"]["content"]) {
9595
setIsLoading(false);
9696
await updateState(event["choices"][0]["delta"]["content"]);

0 commit comments

Comments
 (0)