Hello!
Very interesting Drupal module brewing here! Running the latest DEV version of this module (02/16/2023, dev-1.0.x ac739fc) on Ubuntu 22.04 LTS and PHP Version 8.2.3 (initially tried 8.1.16 too), on top of the latest Drupal version 10.0.3. With just a few select OpenAI modules are enabled, on top of an otherwise very light weight D10 development environment, I'm seeing various errors in the logs. After setting the OpenAI config page up with my API Key and Org ID, the OpenAI CKEditor integration works great, but...
Visiting /admin/config/system/article-generation results in:
Uncaught PHP Exception Error: "Class "Drupal\\openai_api\\Controller\\OpenAIApiController" not found" at /data/web/modules/contrib/openai/modules/openai_api/src/Form/ArticleGenerationConfigForm.php line 111,
Visiting /admin/config/system/image-generation results in:
Uncaught PHP Exception Symfony\\Component\\Routing\\Exception\\RouteNotFoundException: "Route "openai_api.api_settings" does not exist." at /data/web/core/lib/Drupal/Core/Routing/RouteProvider.php line 206
While researching this I came across this commit which seemingly changed the naming conventions of the config object, which seems suspiciously related to the above errors. Searching through the current OpenAI 1.x-DEV code base there seems to be references to the OLD naming conventions:
https://git.drupalcode.org/project/openai/-/commit/26271e3980451d6dca1dc...
I've tried updating everything via composer, drush cr, full service restarts, playing with modifying the config object names in the OpenAI module code, and numerous other things along the way I could think of to fix this to no avail. Any thoughts or suggestions for how to resolve these problems would be very much appreciated!
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | Screenshot from 2023-02-16 12-04-04.png | 131.1 KB | kevinquillen |
| #5 | Screenshot from 2023-02-16 12-03-08.png | 185.63 KB | kevinquillen |
| #5 | Screenshot from 2023-02-16 11-58-31.png | 119.02 KB | kevinquillen |
Issue fork openai-3342260
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
kevinquillen commentedThanks! Yes, a lot of things are changing rapidly while under development. The "Generator" module does need some work. We began swapping out the homemade client with the third party OpenAI PHP client for development speed and restructuring the modules. I have no doubt there could be some errors with that one module. I can take a look in the next few days and circle back.
Comment #4
kevinquillen commentedComment #5
kevinquillen commentedOkay, I think the content generation has been fixed enough to be usable and demo. I did not touch the image generation, and the Drush command needs a little more tweaking, but it is now functional again. You will need to clear cache and restart your webserver (if using memory cache) because I changed some class names and routes. "Content generation" is now a menu link under the "OpenAI" section of the admin.
Comment #7
kevinquillen commentedClosing immediate issue, will need to open new tickets on new bugs.
Comment #8
d0t101101 commented@kevinquillen - thank you very much! Pulled the latest alpha2 and tested - working well over here now (minus the Media/Image generator, as you mentioned, this wasn't 'touched' just yet). Just for reference, filling in the Generators Media 'Image description' results in the following error ATM: