ai-chatbot icon indicating copy to clipboard operation
ai-chatbot copied to clipboard

schedule to get the vote api

Open gaspire opened this issue 9 months ago • 1 comments

Image

gaspire avatar Mar 08 '25 01:03 gaspire

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

tobiasbueschel avatar Mar 08 '25 06:03 tobiasbueschel

@gaspire Thanks for reporting! This has been fixed by #869

jeremyphilemon avatar May 01 '25 01:05 jeremyphilemon