ai-chatbot
ai-chatbot copied to clipboard
schedule to get the vote api
You can fix this by putting something like the following inside the chat.tsx component:
const { data: votes } = useSWR<Array<Vote>>(
initialMessages.length > 0 ? `${ApiPath.Vote}?chatId=${id}` : null,
makeRequest,
{
fallbackData: [],
}
);
There is already a PR to fix this here: https://github.com/vercel/ai-chatbot/pull/850
@gaspire Thanks for reporting! This has been fixed by #869