AIConfig
The configuration for all AI-related functionalities.
Provides configuration properties for both AI features and AI adapters (which connect to the external AI services),
ClassicEditor
.create( editorElement, {
ai: {
...
}
} )
.then( ... )
.catch( ... );
Properties
assistant : AIAssistantConfig | undefinedmodule:ai/aiconfig~AIConfig#assistantThe configuration of the AI Assistant feature.
Read more in
AIAssistantConfig.availableReplyActions : Array<'showChangeInText' | 'insertSuggestion' | 'applySuggestion'> | undefinedmodule:ai/aiconfig~AIConfig#availableReplyActionsDefines what actions are available for the user when interacting with AI responses in AI Chat and AI Quick Actions features.
Users can perform following three actions:
'applySuggestion'- applies the presented change directly into the editor content.'insertSuggestion'- applies the presented change as a suggestion, which can be later on accepted or rejected.'showChangeInText'- locates the changed part of document in the editor and opens a balloon with the preview.
By default, the editor configuration enables all available actions, in following order:
[ 'applySuggestion', 'insertSuggestion', 'showChangeInText' ]Copy codeThis setting impacts:
- The action dropdown located below an AI reply in the chat feed. The setting affects the main action for the button, as well as actions available in the dropdown and their order.
- The buttons located in the header of each change preview in the chat feed. Note, that the header is visible only if the AI Chat proposed multiple changes.
- The buttons located in the balloon which shows the change preview.
Through this configuration option, you can change how users use the AI replies. For example, if you want to force users to always insert AI-proposed changes as suggestions, omit
'applySuggestion'action.Please note other factors that impact the availability of these actions:
- Buttons related to
'applySuggestion'action are hidden if track changes feature is turned on. - Buttons related to
'insertSuggestion'action are hidden if track changes feature is not loaded in the editor.
Please note, that due to these factors, it is possible to accidentally configure the editor in a way, that no UI elements are presented to the user.
chat : AIChatConfig | undefinedmodule:ai/aiconfig~AIConfig#chatThe configuration of the AI Chat feature.
Read more in
AIChatConfig.container : AIContainerConfig | undefinedmodule:ai/aiconfig~AIConfig#containerThe configuration of the AI user interface provided by the
AITabsplugin.quickActions : AIQuickActionsConfig | undefinedmodule:ai/aiconfig~AIConfig#quickActionsThe configuration of the AI Quick Actions feature.
Read more in
AIQuickActionsConfig.reviewMode : AIReviewModeConfig | undefinedmodule:ai/aiconfig~AIConfig#reviewModeThe configuration of the AI Review Mode feature.
serviceUrl : string | undefinedmodule:ai/aiconfig~AIConfig#serviceUrlThe URL of the AI service endpoint.
This endpoint is used by AI features: AI Chat, AI Quick Actions, and AI Review Mode. It does not affect the AI Assistant feature, which uses its own adapter configuration.
NOTE: By default, the plugin uses the default AI service endpoint delivered by CKEditor Cloud Services.
Defaults to
'https://ai.cke-cs.com/v1'