AIConfig
interface
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: {
openAI: {
requestHeaders: {
Authorization: 'Bearer API_KEY'
}
},
useTheme: false
}
} )
.then( ... )
.catch( ... );
Properties
-
aiAssistant : AIAssistantConfig | undefined
module:ai/aiconfig~AIConfig#aiAssistant
The configuration of the AI Assistant feature.
Read more in
AIAssistantConfig
. -
aws : AIAWSTextAdapterConfig | undefined
module:ai/aiconfig~AIConfig#aws
The configuration for the
AWSTextAdapter
.This is required only if you connect to Amazon Bedrock service.
Read more in
AIAWSTextAdapterConfig
. -
openAI : OpenAITextAdapterConfig | undefined
module:ai/aiconfig~AIConfig#openAI
The configuration for the
OpenAITextAdapter
.This is required only if you connect to OpenAI or Azure OpenAI service.
Read more in
OpenAITextAdapterConfig
. -
useTheme : boolean | undefined
module:ai/aiconfig~AIConfig#useTheme
Enables or disables the colored UI theme for AI features.
- Leaving this property unset will preserve the default theme on AI features UI elements.
- Setting this property to
false
will remove the default theme from AI features UI elements.
See the AI Assistant integration guide to learn how you can use CSS variables to change the default theme to a different color.
Defaults to
true