Creating chatGPT ECA action for Augmentor

Created on 25 March 2023, over 1 year ago
Updated 11 May 2023, about 1 year ago

Problem/Motivation

1. Making functional and flexible chat functionality.
2. Making another step within bigger picture and enabling other use-cases: 📌 [META] Drupal could be great for building AI tools (like ChatGPT) Active

Steps to reproduce

Proposed resolution

To implement flexible chatbot functionality, default node, comment, media and contrib eca modules can be used.

"ECA: Event - Condition - Action" ( https://www.drupal.org/project/eca ) is new very high quality module.

By using default Drupal modules, these tasks are solved by default:

  • Data storage:
    • Saving conversations as node.
    • Saving messages as comment.
  • Data input:
    • Using default flexible comment form for user input.
    • Using comment fields to upload and display images, audio and documents (ChatGPT is going to accept multimedia input).
  • Data output:
    • Using default comments listing for conversation messages.
    • Using comment's body field and text format for multimedia data output.
  • Permissions:
    • Using one of drupal's contrib modules, to configure conversation access based on site usecase. For example:
      • users have their own conversations
      • users having multi-user conversations
      • chatbot writing comments sometimes (example - Drupal.org bot)
  • Listing:
    • Conversations can be listed anywhere as nodes.

Remaining tasks

  • Make ECA prototype
  • ...

User interface changes

API changes

Data model changes

I copied this from Creating chatGPT ECA action Active

Feature request
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

🇺🇸United States SocialNicheGuru

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @SocialNicheGuru
  • 🇯🇵Japan eleonel Itoshima 🇯🇵

    Yup, we have this in our roadmap and I will be working on it very soon :)

  • Assigned to naveenvalecha
  • 🇮🇳India naveenvalecha New Delhi

    Assigning that to myself will allow me to explore the ECA API and gain an in-depth understanding of the existing Augmentor integration.

  • 🇱🇹Lithuania mindaugasd

    It would be nice addition, if it would allow to combine different augmentors.

    For example:

    • Speaking with chat in other language than English: (input) -> azureTranslation -> openaiChat -> azureTranslation -> azureTextToSpeech -> saveAudio -> (output)
    • Translating input before making an image: (input) -> azureTranslation -> openaiImage -> saveImages -> (output)

    This is because openAI often does not work properly in languages other than English.
    I already did these combinations with a custom system months ago, so I might be able to help.

    APIs will probably be able to do this native in some time (in a year for example).
    But there is further potential:

    • This may allow to make more complex workflows and may allow to program decision flow (using ECA) to make various AI decisions based on output from various Augmentors.
  • 🇱🇹Lithuania mindaugasd

    This is just for background of what could be possible if developed further.
    But creating a single ECA action for now is great as well.

  • Issue was unassigned.
  • 🇦🇺Australia murrayw

    We are currently scoping out what Actions might look like and how they can be implemented in a flexible way so that ECA and others can be handled. The aim will be to be able to use all types of Augmentors in the Action so this is not limited to ChatGPT, GPT4 etc.

    The ability to chain Augmentors is a powerrful concept. The orchestration of this could be done in ECA or Rules, however, I would need to look into those systems to see how they can be chained together.

    I will keep this issue open for now for discussion and any futher ideas which there may be out there.

    We will create a new Feature ticket for Actions once our ideas have settled down a bit.

  • 🇱🇹Lithuania mindaugasd

    Single ECA action is a powerful feature in itself.
    Scoping out decreases likelihood this will be done because of too big scope.
    Created a separate issue for that 🌱 Discussion - ECA actions, Chaining Augmentors Closed: works as designed

  • 🇹🇭Thailand AlfTheCat

    I agree that just an ECA action to send a token supporting prompt to an AI and storing the response would instantly provide a megaton of possibilities and instantly provide better functionality than currently provided by many of the budding AI/GPT modules in circulation.

  • Status changed to Closed: works as designed about 1 year ago
  • 🇦🇺Australia murrayw

    The Augmentor AI module has now been updated to handle Actions. The module defines a new custom Action for each entity type. This is suitable for integration direct into sections of Drupal which deal with Actions. The module also implements a bunch of "minimal" Actions which are suitable for use in ECA. the minimal actions have a simpler Form such that it converts across well into the ECA Action template which is created.

    So bottom line, If you wish to automate nodes in ECA use the Content item - minimal Augmentor. This will work well in ECA.

    Now that we have Actions, we have a way to automate them with ECA. And extended on from that, the ECA VBO module will expose an action event for Views VBO. So with this module you can bulk process nodes with an Augmentor via complex automations through ECA.

    On the ChatGPT side of the equation we have the ChatGPT Augmentor Module
    https://www.drupal.org/project/augmentor_chatgpt

    It does what is days on the box - bring Chat GPT cunctionality to the Augmentor ecosystem.

    Finally, picking up on ALfTheCat's comment above - yes, that is now possible.

    As this was a "discussion" ticket leading upt o the Actions implementation, I am going to close it out. Please download the latest version of Augmentor AI to give it a try. Thanks for everyone's contribuition here.

Production build 0.69.0 2024