- Issue created by @wouters_f
- πΊπΈUnited States sirkitree
I was unable to replicate this with a fresh drupal10 install using OSX, colima, ddev
```
ddev composer require 'drupal/ai_interpolator:^1.0@alpha'
ddev composer require 'drupal/openai:^1.0@beta'
ddev composer require 'drupal/ai_interpolator_openai:^1.0@alpha'
```
- modified Story content type
- added new field labeled 'Automated Summary'
- saved, saved settings on config pageNo errors presented.
Note that I had not configured the module yet...
As soon as I put in my OpenAI API key and went to configure the field, I got the following error:
```
Fatal error: Declaration of Drupal\ai_interpolator_openai\OpenAiBase::generate(string $prompt, Drupal\Core\Entity\ContentEntityInterface $entity, Drupal\Core\Field\FieldDefinitionInterface $fieldDefinition, array $interpolatorConfig) must be compatible with Drupal\ai_interpolator\Annotation\AiInterpolatorFieldRule::generate(Drupal\Core\Entity\ContentEntityInterface $entity, Drupal\Core\Field\FieldDefinitionInterface $fieldDefinition, array $interpolatorConfig) in /var/www/html/web/modules/contrib/ai_interpolator_openai/src/OpenAiBase.php on line 102
``` - π©πͺGermany marcus_johansson
Hi @wouters_f and thank you for reporting the issue.
If you use the command
composer require 'drupal/ai_interpolator_openai:^1.0@alpha'
without setting minimum-stability to dev it chooses an older Alpha version, where it did not have any requirements to a specific interpolator version. Because its still in Alpha, some API changes are still happening. Alpha2 is probably chosen because it had no dependencies.I will be releasing beta releases as soon as some additional tests are written. Before that the module is in experimental mode and is still adding features, so it should not be used in production.
If you still want to use it, see this link and set it to "dev" and it should get the latest Alpha versions:
https://getcomposer.org/doc/04-schema.md#minimum-stability - πΊπΈUnited States sirkitree
Can confirm that pulling the dev version worked. I used
ddev composer require 'drupal/ai_interpolator_openai:^1.0@dev'
rather than modify the composer.json. - Status changed to Closed: won't fix
10 months ago 12:56pm 6 March 2024 - π©πͺGermany marcus_johansson
I will close this since it was dependency issues in Alpha.