File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
packages/ai/src/react/ai-chat/utils Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @udecode/plate-ai " : patch
3
+ ---
4
+
5
+ ` submitAIChat ` : add ` ChatRequestOptions ` options
Original file line number Diff line number Diff line change
1
+ import type { ChatRequestOptions } from 'ai' ;
2
+
1
3
import { type PlateEditor , getEditorPlugin } from '@udecode/plate-common/react' ;
2
4
import { isSelecting } from '@udecode/plate-selection' ;
3
5
@@ -10,10 +12,12 @@ export const submitAIChat = (
10
12
editor : PlateEditor ,
11
13
{
12
14
mode,
15
+ options,
13
16
prompt,
14
17
system,
15
18
} : {
16
19
mode ?: 'chat' | 'insert' ;
20
+ options ?: ChatRequestOptions ;
17
21
prompt ?: EditorPrompt ;
18
22
system ?: EditorPrompt ;
19
23
} = { }
@@ -60,6 +64,7 @@ export const submitAIChat = (
60
64
promptTemplate : systemTemplate ,
61
65
} ) ,
62
66
} ,
67
+ ...options ,
63
68
}
64
69
) ;
65
70
} ;
You can’t perform that action at this time.
0 commit comments