feat: only send user message as part of request (#957)
This commit is contained in:
parent
9279135355
commit
f18af236a0
8 changed files with 90 additions and 54 deletions
|
|
@ -46,11 +46,15 @@ export function Chat({
|
|||
reload,
|
||||
} = useChat({
|
||||
id,
|
||||
body: { id, selectedChatModel: selectedChatModel },
|
||||
initialMessages,
|
||||
experimental_throttle: 100,
|
||||
sendExtraMessageFields: true,
|
||||
generateId: generateUUID,
|
||||
experimental_prepareRequestBody: (body) => ({
|
||||
id,
|
||||
message: body.messages.at(-1),
|
||||
selectedChatModel,
|
||||
}),
|
||||
onFinish: () => {
|
||||
mutate(unstable_serialize(getChatHistoryPaginationKey));
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue