refactor: use generateId() for id creation (#736)
This commit is contained in:
parent
085f4a8ac4
commit
2d47ffbd77
8 changed files with 20 additions and 75 deletions
|
|
@ -7,7 +7,7 @@ import useSWR, { useSWRConfig } from 'swr';
|
|||
|
||||
import { ChatHeader } from '@/components/chat-header';
|
||||
import type { Vote } from '@/lib/db/schema';
|
||||
import { fetcher } from '@/lib/utils';
|
||||
import { fetcher, generateUUID } from '@/lib/utils';
|
||||
|
||||
import { Block } from './block';
|
||||
import { MultimodalInput } from './multimodal-input';
|
||||
|
|
@ -45,6 +45,8 @@ export function Chat({
|
|||
body: { id, modelId: selectedModelId },
|
||||
initialMessages,
|
||||
experimental_throttle: 100,
|
||||
sendExtraMessageFields: true,
|
||||
generateId: generateUUID,
|
||||
onFinish: () => {
|
||||
mutate('/api/history');
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue