Legacy configuration
The configuration on this page describes the necessary steps for the AI Accelerator module version 1.2.0 and earlier.
For configuration from 1.3.0, see Configuration.
The module configuration can be done via yaml decoration either by specifying the API key directly in yaml or by providing a path to the API key in passwords app.
/my-light-module/decorations/openai-automations/config.yamlapiKey: $OPENAI_API_KEY
apiKey: /path/to/apikey
For more, see Passwords app.
Properties
| Parameter | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|
|
required From version Defines the field types that are going to be filled out during component, variant or page generation. Default is textField, richTextField and damLinkField.
|
||||||||
|
optional From version Defines the available templates for page generation in general. Availability rules through the site definition are working independently of this configuration.
|
||||||||
|
optional From version Defines the available component templates for page generation and component generation.
|
||||||||
|
optional From version Defines the available hyper prompt reference templates. They’re used to identify which dialog should be opened.
|
Azure OpenAI endpoints
From version 1.0.7
To configure Azure OpenAI endpoints you’ll have to add the following decorations
baseUrl: https://<your-openai-deployment>.openai.azure.com/openai/deployments/<your-openai-deployment>
components:
authorization:
class: info.magnolia.ai.automations.rest.RestAzureClientAuthorizationFilter
restCalls:
completions:
queryParameters:
api-version: 2024-02-15-preview # See https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#completions for supported versions
chatCompletions:
queryParameters:
api-version: 2024-02-15-preview # See https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#chat-completions for supported versions
imageGeneration:
queryParameters:
api-version: 2024-02-15-preview # See https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#image-generation for supported versions
Developer samples
Check out some samples here.