ai icon indicating copy to clipboard operation
ai copied to clipboard

Add support to let application layer construct messages sent to the server

Open fwang2002 opened this issue 8 months ago • 1 comments

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.

fwang2002 avatar Apr 19 '25 02:04 fwang2002

Hey! You can use prepareRequestBody to achieve this. Check out this recipe to learn more.

nicoalbanese avatar Apr 19 '25 07:04 nicoalbanese