File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import RichEditorPlugin from '@adminforth/rich-editor';
4
4
import ChatGptPlugin from '@adminforth/chat-gpt' ;
5
5
import UploadPlugin from '@adminforth/upload' ;
6
6
import { randomUUID } from 'crypto' ;
7
+ import CompletionAdapterOpenAIChatGPT from "@adminforth/completion-adapter-open-ai-chat-gpt" ;
7
8
8
9
9
10
const blockDemoUsers = async ( { record, adminUser, resource } ) => {
@@ -149,6 +150,13 @@ export default {
149
150
new RichEditorPlugin ( {
150
151
htmlFieldName : 'description' ,
151
152
completion : {
153
+ adapter : new CompletionAdapterOpenAIChatGPT ( {
154
+ openAiApiKey : process . env . OPENAI_API_KEY as string ,
155
+ model : 'gpt-4o' , // default "gpt-4o-mini"
156
+ expert : {
157
+ temperature : 0.7 //Model temperature, default 0.7
158
+ }
159
+ } ) ,
152
160
provider : 'openai-chat-gpt' ,
153
161
params : {
154
162
apiKey : process . env . OPENAI_API_KEY as string ,
You can’t perform that action at this time.
0 commit comments