- Issue created by @mindaugasd
- 🇺🇸United States SocialNicheGuru
This is just an example of a different module interacting with ECA: https://www.drupal.org/project/prompt →
There might be lessons learned.
- 🇹ðŸ‡Thailand AlfTheCat
I checked out the prompt module and it seems very interesting, but it doesn't exactly cover the potential scope of this feature request. I love the idea of prompt being an API to several AI's, but we need a true ECA implementation so that we can send prompts from within an ECA process so that we can pass on tokens and also process the returned data from OpenAi (and/or other services).
If we can have an ECA action where we can provide a string that supports tokens, and allows the reply from AI to be stored in entity tokens and fields, all in the familiar eca way, then this would be mind-blowingly powerful, not just for common content workflow automation but also enhancing business process automation with AI capability (like ERP-type setups).
Just a few examples:
On comment-presave: "Is [comment_body] likely to be a spam message? Answer just true or false."
(Then can evaluate the answer and if needed, unpublish the content and flag it for admin review, etc).Autotagging
Auto-translation
Auto-SEO
Create a help/ chatbot using drupal comments and some auto-refresh method
Commerce fraud detection
Commerce product recommenders
Automated test for common content workflows, etc
Analyze the output of a Drupal view with AI and trigger subsequent evaluations and actions
and so on, and so on...
Maybe an ECA maintainer would like to have a look at this? I don't think between the geniuses over here and over there it will be too difficult to integrate the OpenAI API.
- 🇩🇪Germany jurgenhaas Gottmadingen
This is mind blowing, just the short list of potential use cases gives us great impression of what can be achieved when we implement ECA with OpenAI and/or Prompt and/or others.
You may want to also have a look into HTTP Client Manager → which is able to send http requests and store their results in to tokens as well. It has been integrated with ECA, so that may give you an idea on how actions could be implemented here.
If there is any help needed, let me know, I'm happy to give feedback and review prototypes and code.
- 🇮🇳India Manoj Raj.R Chennai
This looks good for the community to learn something.
I am happy to learn and review the code accordingly.
- 🇹ðŸ‡Thailand AlfTheCat
That's awesome, I'll be of more real use in a few months, but in the meantime I'll certainly check out the HTTP client manager module and run further tests with the prompt module. I can contribute documentation and test patches as well.
Just a matter of time now for the first Terminator to show up trying to stop this thread from going any further...
- 🇱🇹Lithuania mindaugasd
There are also awesome news on Augmentor module front:
[...] Our work has been going well and there should be a release of Augmentor soon with the Actions included. ECA does allow for many actions to be defined and chained together. For example our testing has involved building Models which:[...]
#3351657-4: Discussion - ECA actions, Chaining Augmentors →
- 🇹ðŸ‡Thailand AlfTheCat
Subscribed to the Augmentor discussion, thanks!
- First commit to issue fork.
-
kevinquillen →
committed 33d4e254 on 1.0.x
Issue #3350297: Creating chatGPT ECA action
-
kevinquillen →
committed 33d4e254 on 1.0.x
- 🇺🇸United States kevinquillen
I've added a few ECA actions for OpenAI:
- Chat
- Completion
- Speech to Text
- Text to SpeechThis should be enough to grant the flexibility in people developing their own workflows, with more actions to be added in a bit.
Here is an example one I made - when saving an article, if the summary field is empty, ask ChatGPT to generate a summary from the text and put it in the field:
Each action takes the response from OpenAI and sets the response back into the token (see screenshot) to use in later steps.
- Status changed to Fixed
12 months ago 8:45pm 19 November 2023 Automatically closed - issue fixed for 2 weeks with no activity.