@@ -321,29 +321,29 @@ export default {
321321 // debounceTime: 250,
322322 // }
323323 // }),
324- // new RichEditorPlugin({
325- // htmlFieldName: "description",
326- // completion: {
327- // adapter: new CompletionAdapterOpenAIChatGPT({
328- // openAiApiKey: process.env.OPENAI_API_KEY as string,
329- // }),
330- // expert: {
331- // debounceTime: 250,
332- // },
333- // },
334- // // requires to have table 'description_images' with upload plugin installed on attachment field
324+ new RichEditorPlugin ( {
325+ htmlFieldName : "description" ,
326+ completion : {
327+ adapter : new CompletionAdapterOpenAIChatGPT ( {
328+ openAiApiKey : process . env . OPENAI_API_KEY as string ,
329+ } ) ,
330+ expert : {
331+ debounceTime : 250 ,
332+ } ,
333+ } ,
334+ // requires to have table 'description_images' with upload plugin installed on attachment field
335335
336- // ...(process.env.AWS_ACCESS_KEY_ID
337- // ? {
338- // attachments: {
339- // attachmentResource: "description_images",
340- // attachmentFieldName: "image_path",
341- // attachmentRecordIdFieldName: "record_id",
342- // attachmentResourceIdFieldName: "resource_id",
343- // },
344- // }
345- // : {}),
346- // }),
336+ ...( process . env . AWS_ACCESS_KEY_ID
337+ ? {
338+ attachments : {
339+ attachmentResource : "description_images" ,
340+ attachmentFieldName : "image_path" ,
341+ attachmentRecordIdFieldName : "record_id" ,
342+ attachmentResourceIdFieldName : "resource_id" ,
343+ } ,
344+ }
345+ : { } ) ,
346+ } ) ,
347347 ] ,
348348
349349 options : {
0 commit comments