- Issue created by @jbuttler
- 🇬🇧United Kingdom MrDaleSmith
Can you retest this as the AI Explorer has just had a major refactor merged.
I just tried to upgrade to beta 3 and it broke my site, so I can't test this at this time. I made a bug report about the upgrade error I received.
I upgraded to the dev version based on maintainer recommendation after beta 3 did not work. I am still experiencing the same issue using the latest dev version. A similar error is produced:
----------------------
An error occurred
The following error occurred while processing your request:The specified file 'temporary://fileHP6ttq' could not be copied because the destination directory 's3://2024-12/text-to-speech.mp3' is not properly configured. This may be caused by a problem with file or directory permissions.
Of the following exception type:
Drupal\Core\File\Exception\DirectoryNotReadyException
I just successfully updated to beta-4 but I am still experiencing this issue.
- 🇩🇪Germany marcus_johansson
This will be solved with this comment: https://www.drupal.org/project/ai/issues/3490970#comment-15889122 🐛 Generating Multiple Text-to-Speech Fails in AI Explorer Active .
The current explorer assumes that public file system exists, which is not always true.
- 🇬🇧United Kingdom MrDaleSmith
This issue is resolved by https://www.drupal.org/project/ai/issues/3490970 🐛 Generating Multiple Text-to-Speech Fails in AI Explorer Active but there are some improvements we can make to the process, so I'll do those as part of this issue.
- 🇩🇪Germany marcus_johansson
Sorry, should not set to fix - this is merged into dev, but could you test it @jbuttler so it works for you?
Well this is interesting! This crashes my site. This may be related to a different issue I recently discovered and made a bug report about ( https://www.drupal.org/project/ai/issues/3492998 🐛 "Queue worker starting to fill out field Cron Job" Breaks Site Active ).
This seems to cause a memory leak when I try to generate the file in the explorer. I am experiencing a similar memory leak when trying to create a tts file using the automator scheduled cron. I also get the same memory leak occasionally when trying to generate text with the automator, using Open AI. When this has occurred, I have switched to Fireworks for the provider and everything works.
With the new dev patch, I do not get any files back when trying to create them no matter if I am using the 'Save as Media'. feature or not.
Error on screen:
Error message
Oops, something went wrong. Check your browser's developer console for more details.There is no record of this in the site logs. AI logs also show nothing.
Linux shows memory racing for a minute or so then clears out once it hits the timeout. I attached a screenshot of the process running in linux if this helps.
I have an update. I am experiencing this issue in many areas related to using Open AI. When I use an AI Assistant with Open AI, I get the same type of memory issue, eventually resulting in a timeout. This is solved by using a different provider like Groq or Fireworks.
Audio files only use Open AI. I am thinking this may be a more general Open AI api issue effecting multiple things rather than just related to the audio files.- 🇬🇧United Kingdom MrDaleSmith
My testing was exclusively using OpenAI so I suspect the underlying changes here aren't the issue but that we have a general vulnerability to OpenAI timing out (particular if a cron job is used as you note in https://www.drupal.org/project/ai/issues/3492998 🐛 "Queue worker starting to fill out field Cron Job" Breaks Site Active ). I think we should probably postpone closing this issue but unless other isers report the same issue from the dev branch I do n't think we need to go to the trouble of undoing the merge.
I am not sure its a timeout. Open AI seems to never get the request, and I am not currently being billed for the attempts that fail. It seems like some general communication issue. And the memory starts filling up as soon as I send the request, not after a timeout. This behaves the same for audio as it does for AI assistants, and now the automator on node creation when using open AI. I have removed Open AI from most of my functions which allows things to work. I just upgraded past Beta 1 a few days ago and did not experience this, not sure if that is related.
I can easily reproduce the memory issue but I am not seeing anything in logs about this. Let me know if I can provide any more info or do some testing on my side to help find the cause.
Testing Update:
I have uninstalled several AI sub-modules I was using and that seems to have stabilized the system. The modules I uninstalled were external moderation, seo analyzer, AI search, image alt text, rest facets.
After removing these, the system seems to be OK (needs more overall testing). The memory leak issue seems to be related to one of the uninstalled modules, and probably not related to this issue. I am not sure which module, or why. I will test re-installing these modules later to see if I can find the problem. I suspect it to be external moderation calling OpenAI. But I also recently installed AI search and image alt text so I cant rule those out.
I reinstalled the dev version of AI. I was able to successfully save audio to the media library using the AI explorer. This is the first time I have been able to do this.
Each time I enter a new prompt, I get the correct audio back, and the new audio is saved to the media library. Previously I only received duplicates of old submissions.It seems like this issue has been resolved with the dev version I tested "dev-1.0.x 42f0fea". In the end the only changes I made on my side were uninstalling the modules above, then testing the dev version.
- 🇩🇪Germany marcus_johansson
Its for sure external moderation, we should add some validation and description there. OpenAI uses the moderation endpoint by default.
The external moderation is just for adding one providers moderation endpoint over another provider, so if you add OpenAI over OpenAI it might cause circular dependency.
But this is a good bug catch and should be fixed - I created an issue for it here: https://www.drupal.org/project/ai/issues/3493419 🐛 Do not allow for the same providers moderation to be used in external moderation Active