- Issue created by @dunx
- 🇧🇪Belgium wouters_f Leuven
Great suggestion.:
I'll do a proposal, let me know what you think.AI Providers
In order to power your Dupal with AI, you'll need a AI provider module. Here are some of the frequently used provider modules:
- Anthropic
- ...
- Openai
I also propose to show an error or warning in the ai core module on installation if no providers are enabled or installed.
- 🇧🇪Belgium wouters_f Leuven
What do you think if We show a warning on /admin/config/ai/settings ?
Something like this?
- 🇧🇪Belgium wouters_f Leuven
I've committed this text:
You have no AI providers enabled. Please install and enable a provider module.
I'm proposing a merge request like this. - 🇧🇪Belgium BramDriesen Belgium 🇧🇪
Change looks straightforward enough! But should use
$this->t()
I think - 🇬🇧United Kingdom dunx
Text at #2 is perfect.
I think the other issue was discussed at https://www.drupal.org/project/ai/issues/3498757#comment-15939611 🐛 Installation/configuration resilience (ai_translate) Active , which you pointed to an existing ticket at https://www.drupal.org/project/ai/issues/3498887#comment-15944828 ✨ Add useful message on providers page when no provider enabled Active
I'll try to test that patch and the above patch today.
- 🇬🇧United Kingdom dunx
Steps to reproduce...
- Install latest D11 Umami plus drush
- Download admin_toolbar and key modules.
ddev composer require 'drupal/ai:^1.0.x-dev'
ddev drush en ai ai_translate key admin_toolbar admin_toolbar_tools -y
- Create an Article in English.
- Click translate tab.
I see an error message:
I click on the link in the error to /en/admin/config/ai/providers and the text there tells me to "Choose a provider from the AI module homepage, add it to your project, then install and configure it first."
I ignore the first instruction to "Choose a provider" and click on the link to "configure it first" instead, which goes to /en/admin/config/ai/providers
I see an Access Denied error.
Issue reproduced.
Let's install this fix...
ddev composer config repositories.ai vcs https://git.drupalcode.org/issue/ai-3499412.git
ddev composer require drupal/ai:3499412-no-provider-warning-dev
Back at /en/admin/config/ai/settings I now see a new Warning message: "You have no AI providers enabled. Please install and enable a provider module."
This is an improvement as it makes it clear you have an immediate issue you need to deal with.
I think clarity would be further enhanced by changing the second sentence shown on screen from:
Choose a provider from the AI module homepage, add it to your project, then install and configure it first.
to
Choose at least one AI provider module from those listed on the AI module homepage, add to your project, install and configure it. Then update the AI Settings on this page.
- 🇧🇪Belgium wouters_f Leuven
Changes the text on the AI module page and added in your copy here.
This should be sufficient like this. - First commit to issue fork.
- 🇩🇪Germany marcus_johansson
Fixed the comment from BramDriesen and I am merging this - thanks all.
Automatically closed - issue fixed for 2 weeks with no activity.