- Issue created by @abhisekmazumdar
- 🇩🇪Germany marcus_johansson
We have something similar here: https://github.com/FreelyGive/drupal-starforge. Where we add an extra page for installing the AI recipe and then removing then one you are not using, but I think your solution might be nicer.
You can see the custom form here: https://github.com/FreelyGive/drupal-starforge/blob/1.0.x/project_templa....
The problem with the above, is that its impossible to install the site together via provider from Drush this way, without some other added logic.
You could also check 📌 Create a BYO API Key module for demoing things Active to see if these can be solved using similar solutions.
- 🇮🇳India abhisekmazumdar India
Yes, the inspiration for adding an extra form in the installer came from the drupal-starforge repository. I have mostly copied the same form.
Regarding the BYO keys module, I too believe it would be beneficial to have, but at the same time, my intention is to resolve the issues with the existing AI provider modules. Therefore, the approach of using the package manager after the site can address that.
- 🇮🇳India abhisekmazumdar India
Here the demo for what I have been working on: https://www.loom.com/share/5df4b8feae5f43f2858edcf660a84454?sid=0f739b10...
The code is very rough right now and needs to be cleaned up a little. I'll share the modified drupal_cms_installer from Drupal CMS in a repo. In brief, here is what I've done:
- Added two install tasks after the site installation.
- The first task is to show a form for users to select their required AI provider and then require the module using Package manager.
- The second install task sets up the key and the selected AI provider config.Some limitations are:
We still need to write specific code for each module.
For example, the module ai_provider_google_vertex requires its key to be in the config file. Other AI provider modules accept the key in the config as well. Therefore, a custom solution will be needed to add a specific AI provider. Alternatively, maintainer of the AI provider module can follow a standard config structure.