Skip to content

An AI-powered search engine with a generative UI

Fix: Add experimental_throttle to useChat to prevent infinite update loops

Yoshiki Miuraa5def31158e7
diff --git a/components/chat.tsx b/components/chat.tsx
index d56ecf28..92a27989 100644
--- a/components/chat.tsx
+++ b/components/chat.tsx
@@ -42,7 +42,8 @@ export function Chat({
onError: error => {
toast.error(`Error in chat: ${error.message}`)
},
- sendExtraMessageFields: false // Disable extra message fields
+ sendExtraMessageFields: false, // Disable extra message fields,
+ experimental_throttle: 100
})
useEffect(() => {