Developer YAML-API

Generate text buttons for any text fields

As a developer, you can use NEOSidekick to add a “Generate with Sidekick” button to any text field and configure it with your own prompt—just like the pre-built editors.

The NEOSidekick YAML API

First, choose whether you want a text field or a text area and configure the corresponding editor:

  • NEOSidekick.AiAssistant/Inspector/Editors/MagicTextAreaEditor
  • NEOSidekick.AiAssistant/Inspector/Editors/MagicTextFieldEditor


With the custom_prompt module, you can write your own prompts. SidekickClientEval extends ClientEval, allowing you to use the variables documentTitle and documentContent in addition to the node properties.

Here is an example of an OpenGraph description.

'Neos.Neos:Document':
properties:
openGraphDescription:
ui:
inspector:
editor: 'NEOSidekick.AiAssistant/Inspector/Editors/MagicTextAreaEditor'
editorOptions:
module: 'custom_prompt'
arguments:
customPrompt: >
SidekickClientEval: `
Generate a single, high-impact Open Graph description (max 160 characters) for the given page.
The description must summarize the core value proposition, include the primary keyword, and use a compelling hook to maximize click-through rates.

<page title="${documentTitle}">
${documentContent}
</page>
`

 

Optionally, you can change the writing style as an argument writingStyle:

  • academically_complex
  • concise_descriptions
  • extreme_motivation
  • literary_masterpiece
  • marketing_genius
  • storytelling_genius
  • tech_advocate
  • visionary_marketing

You can find further inspiration at Inline Text Generation page when creating the content element.

Let your creativity run wild! Design and configure your own buttons, we are excited to see what use cases you find.

Please give us feedback!

Is the naming consistent and clear? Do you understand the use cases? What would you like to develop with it?

Or on Slack #neos-general and mention @rolandschuetz