ai
ai copied to clipboard
Add support to let application layer construct messages sent to the server
Description
Now in useChat, triggerRequest will send all the history messages to the server side. It's better to add an option to let the application layer construct the messages, for example only send the last user message.
Hey! You can use prepareRequestBody to achieve this. Check out this recipe to learn more.