- Issue created by @NicholasS
- πΊπΈUnited States NicholasS
I managed to sneak a debugger in the JS to see the response
- πΊπΈUnited States NicholasS
I see the the if response ok but it seems to not wrap the next insert logic
https://git.drupalcode.org/project/openai/-/blame/1.0.x/modules/openai_c...And where the insert of the error happens, but seems outside of the if ok check.
https://git.drupalcode.org/project/openai/-/blame/1.0.x/modules/openai_c... - First commit to issue fork.
- Merge request !77Issue #3404972: OpenAI CKEditor - On error, content should not be replaced β (Open) created by driverok
- Status changed to Needs review
10 months ago 1:19pm 17 February 2024 - π΅π±Poland driverok
Please review the MR77 with simple fix.
I've checked it should work.
Please notice the fix goes to the JS source, so in order to work you probably have to run npx webpack inside the openai_ckeditor submodule ( and before that yarn install)
- πΊπΈUnited States SocialNicheGuru
@drivreok I do not understand the instructions. Can you number them and list the actual commands to use?
- First commit to issue fork.
- πΊπΈUnited States NicholasS
I modified the Merge request so that when there are errors it does not fail silently, and modified the openaiapi.php to not return just empty strings.
Now you get something like this when it fails. (For others this is likely HTTPS firewall inspections on corporate networks)
- πΊπΈUnited States NicholasS
Side note: If anyone knows how to get Guzzle Streams to work with a corporate firewall that does HTTPS inspections would love to know how.
Error I get is "There was an issue obtaining a response from OpenAI. The error was: Connection refused for URI https://api.openai.com/v1/chat/completions"