-
Notifications
You must be signed in to change notification settings - Fork 194
Open
Description
When I try to call the setMessages function from useChat for reseting the conversation nothing happens.
const { sendMessage, status, stop, error, setMessages } = useChat({
id: chat_id,
transport: new DefaultChatTransport({
fetch: customFetch,
}),
onError: (err) => {
console.error("Error in AI sidebar", err);
setGlobalError(err);
},
});
const handleNewChat = useCallback(() => {
if (status === "streaming" || status === "submitted") {
stop();
}
setInput("");
setMessages([]);
}, [status, stop, setInput, contextStore]);Do you have any idea?
Metadata
Metadata
Assignees
Labels
No labels