Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extending AI Actions #2537

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Extending AI Actions #2537

wants to merge 1 commit into from

Conversation

mnocon
Copy link
Contributor

@mnocon mnocon commented Nov 11, 2024

Question Answer
JIRA Ticket JIRA: https://issues.ibexa.co/browse/IBX-9077
Versions 4.6 and 5.0
Edition Headless, Experience, Commerce

This PR builds upon the work done in #2473 - and adds the "how to extend" part of the doc, together with references.

I've included the generated PHP API Reference (this is stolen from #2447) - to avoid polluting this PR with too many files the generated reference is extracted to a separate PR (and all the preview links link there).

General preview: preview

New pages or sections:

Testing the use cases locally:

Setup

Run in a project:

git clone https://github.com/ibexa/documentation-developer -b IBX-8689-extending
cp -R documentation-developer/code_samples/ai_actions/ .
composer run post-install-cmd

Use case 1

  1. Configure OpenAI
  2. Publish an image without an alt text
  3. Run php bin/console app:add-alt-text

The image should have alt text generated automatically

Goal: teach readers how to use the AI PHP API

Use case 2

  1. Run llamafile on port 8080
  2. Create an Action Configuration using the LLaVATextToText Handler
  3. Use it in online editor to improve writing

Goal: teach readers how to create a custom Handler (including Action Handler Form options)

Use case 3

  1. Download sample audio files (file1, file2)
  2. Install Whisper and make it available as an executable called whisper
  3. Add a eztext field with transcript identifier to the File Content Type
  4. Create an Action Configuration using the Whisper Handler for the Transcribe Audio Action Type
  5. Start creating a new file and use the AI to generate a transcription

Goal: teach readers how to create a custom Action Type, including:

  • Action Type
  • Form for Action Type options
  • custom Handler
  • integration with the REST API
  • integration with the back office

TODO:

Checklist

  • Text renders correctly
  • Text has been checked with vale
  • Description metadata is up to date
  • Code samples are working
  • PHP code samples have been fixed with PHP CS fixer
  • Added link to this PR in relevant JIRA ticket or code PR

@mnocon mnocon changed the base branch from master to IBX-8689 November 11, 2024 23:10
@mnocon mnocon marked this pull request as ready for review November 12, 2024 08:33
Base automatically changed from IBX-8689 to master November 18, 2024 12:41
```

``` yaml
[[= include_file('code_samples/ai_actions/config/services.yaml', 33, 37) =]]

This comment was marked as outdated.

```

``` yaml
[[= include_file('code_samples/ai_actions/config/services.yaml', 38, 45) =]]

This comment was marked as resolved.

@mnocon mnocon force-pushed the IBX-8689-extending branch 4 times, most recently from 5967dee to 2982a8e Compare December 9, 2024 09:57
@ibexa ibexa deleted a comment from github-actions bot Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants