AI Core
The NeosAICore module is an optional module that provides functionalities around the use of AI.
Adding module NeosAICore to your cluster
To be able to use AI functionalities, you need to add module NeosAICore to the referenced modules of your cluster.
See this article.
Adding permissions to access AI functionalities
Once the module has been added to you cluster, you need to give permission to users to access it; otherwise users will receive a permission error when trying to use AI functionalities.
This is done by enabling function AI functionalities on your user roles.
See this article for more information about user permissions.
AI agents
The NeosAICore module uses and provides AI agents that perform the tasks necessary for the operation of the various functionalities of the module.
They can be reused in your code or customized if needed.
Customizing AI agents
Agents can be customized in Neos Studio.
For example, you can change the AI model or the prompt used by an agent.
See this article for more information about overriding elements from a referenced module.
Rich text editor with AI writing assistant
Tag: <neos-ai-rich-text-editor>
The NeosAiRichTextEditor is a UI component that enriches the standard RichTextEditor with AI functionalities.
Use the AI button to open the AI writing assistant.
Adding the component in a template
The NeosAiRichTextEditor component can be added in a UI template using the following code:
<neos-ai-rich-text-editor value="@Fields.MyText" />
Attributes
Same as the unbound and common attributes of the rich text editor except:
| Attribute | Type | Required | Default value | Description |
|---|---|---|---|---|
| ai-writing-assistant-advanced-assistant-input-rows | integer |
false |
3 |
Number of rows in the input of the advanced assistant of the AI writing assistant |
| ai-writing-assistant-modal-position | center, left, right |
false |
right |
Position of the modal of the AI writing. |
| custom-actions | System.Collections.Generic.IEnumerable<GroupeIsa.Neos.Designer.UIAbstractions.RichTextEditorCustomAction> |
false |
[] |
List of the buttons to include in the toolbar of the rich text editor in addition to the AI button. |
| is-ai-writing-assistant-open | bool |
false |
false |
Indicates whether the AI writing assistant is open. |
| content-css | string, string[] |
false |
One or an array of CSS file URL to apply to the content rendered in the rich text editor. | |
| content-style | string |
false |
A string that contains CSS to apply to the content rendered in the rich text editor. | |
| editor-options | object |
false |
Options passed to the init function of the TinyMCE editor. |
Warning
If you customize the toolbar attribute, you need to include customActions in the value you use otherwise the AI button will not be visible.
AI writing assistant
Tag: <neos-ai-writing-assistant>
The NeosAiWritingAssistant is a UI component that displays a modal screen where the user can ask an AI to makes changes to the text.
Changes can be previewed from the modal screen before accepting or rejecting them.
Features
Here are the features available in the NeosAiWritingAssistant modal screen.
Assistant
The assistant expects the user to provide a prompt that describes what changes should be made to the text.
This can be correcting, summarizing, rephrasing, translating, adding a link or image (as long as the link is provided), creating a table, bolding, etc.
Translator
The assistant expects the user to provide the language into which the text should be translated.
This can be any language, even a language not managed by the cluster.
Quick actions
Quick actions are tasks that can be performed without any input from the user such as correcting the text, rephrasing it to improve its style or summarizing it.
Adding the component in a template
The NeosAiWritingAssistant component can be added in a UI template using the following code:
<neos-ai-writing-assistant value="@Fields.MyText" is-open="@Fields.IsOpen" />
Attributes
| Attribute | Type | Required | Default value | Description |
|---|---|---|---|---|
| advanced-assistant-input-rows | integer |
false |
3 |
Number of rows in the input of the advanced assistant |
| is-open | bool |
true |
Indicates whether the AI writing assistant modal is open. | |
| position | center, left, right |
false |
right |
Position of the modal of the AI writing.assistant. |
| text-format | string |
true |
plain |
Format of the text to be edited by the AI writing assistant. Examples: HTML, markdown, plain, ... |
| value | string |
true |
Text to be edited by the AI writing assistant. | |
| html-preview-content-css | string, string[] |
false |
One or an array of CSS file URL to apply to the content rendered in the preview of the writing assistant. This only applies when the text-format attribute is HTML. |
|
| html-preview-content-style | string |
false |
A string that contains CSS to apply to the content rendered in the preview of the writing assistant. This only applies when the text-format attribute is HTML. |
|
| html-preview-editor-options | object |
false |
Options passed to the init function of the TinyMCE editor. |