Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing chatRequestOptions to the reload function provided by useChat does not work #1480

Open
ErikDale opened this issue May 2, 2024 · 0 comments
Labels

Comments

@ErikDale
Copy link

ErikDale commented May 2, 2024

Description

  1. Use the reload function in a client component
  2. See if the data is accessible in the useChat api route (it is not)

Code example

//In the client component where reload is called: 

reload({
    data: {
         imageUrl: <image_url>,
    },
});

//In the /api/chat route:

const { messages, chatProfile, id, data } = await req.json(); // Here data is undefined.

Additional context

No response

@lgrammel lgrammel added the ai/ui label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants