ujamii/neos-cobot

There is no license information available for the latest version (v0.4.0) of this package.

Installs: 11

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 1

Forks: 0

Open Issues: 0

Type:neos-package

v0.4.0 2025-02-25 09:27 UTC

This package is auto-updated.

Last update: 2025-02-25 09:38:26 UTC


README

neos cobot

This package integrates the Cobot for NEOS CMS. It offers text and image generation with the OpenAI API and the Flux API.

Installation

To install the package, you can use composer. Run the following command in your terminal:

composer require ujamii/neos-cobot

After the installation, you need to run the following command to update your database schema:

./flow doctrine:update

Configuration

You need to add the API key for the Cobot API to your Settings.yaml. You get the API key from your Cobot account settings.

# Configuration/Settings.yaml
Ujamii:
  Cobot:
    services:
      # The API key for the Cobot API
      # You can get it from your Cobot account settings
      apiKey: <your-api-key>

Usage

Text Generation

To enable Cobot Text Generation functionality within your node, add the following configuration to your YAML file. This will display the Cobot inline editing options directly in the RichTextToolbar, allowing for AI-powered content generation within text fields.

Neos.NodeTypes:Text:
    properties:
      text:
        ui:
          inline:
            formatting:
              cobot: true

Image Generation

The Cobot Image Generation feature is enabled by default, displaying the ImageGeneration button in all image editors. If you prefer to disable this feature, you can add the following configuration to your YAML file and set enabled to false.

Ujamii:
  Cobot:
    ImageEditorExtension:
      enabled: true

Alternative Text Generation

If you create alt texts in the backend, these are saved in an extra entity. To use these alt texts and bring them to the frontend, you must implement an eel helper for this. Here is an example of how you can do this:

<Neos.Neos:ImageTag asset={asset} attributes.alt={ImageExtension.getAltText(asset)} />

The method ImageExtension.getAltText is an eel helper that accepts an ImageInterface and returns the alt text.

Disable the alt text generation
If you not want to use the alt text generation, you can disable it in the settings:

Neos:
  Neos:
    modules:
      management:
          submodules:
              altTextModule:
                enabled: false