Open AndreSchm opened 2 weeks ago
I have been using FF to integrate OpenAI's API with my app. However, since the beginning of this week, I encountered an issue with the API integration that was previously working fine.
While there is no issue with text input and output, the API that accepts images via a URL (not as a file) returns an "invalid image" error message. To check if there was an issue with my code, I tested it with the version I released last week, which was working perfectly at the time. However, the same error message appears in that version as well.
This seems to be the same issue, and I believe it is a problem with the API tool.
Today I tried Inspecting the network activity in the run mode. A CORS error is issued when running the gemini action. When installing the APK the Gemini integration works fine.
I posted about this issue on OpenAI's forums as well. I'm not sure if it’s because of my post, but today, when I tested again, OpenAI started providing more detailed error messages. (For debugging purposes, I store the error messages returned by the OpenAI API in Firestore.)
[Previously]
[Currently]
However, when I check the image path in a web browser, the image loads correctly. I’m not sure if the period "." at the end of the image URL is mistakenly added by the Cloud Function in FlutterFlow or if OpenAI adds it for grammatical reasons in the error message. Either way, whether the period is present or not, the image displays correctly in a web browser.
I have already configured CORS settings in Firebase and have been using them without any issues. While my previous CORS settings didn’t include OpenAI’s API domain, my apps were functioning fine up until about two weeks ago. This could be because server-to-server communication generally doesn’t require CORS settings.
Nevertheless, to be thorough, I added https://api.openai.com to the CORS settings in Firebase today. I tested it again, but the same error still persists.
Now that the issue's symptoms have been clearly identified, could the FlutterFlow team please help determine the cause of this issue and provide a solution?
FF Team,
please respond to this issue.
Can we access your project?
Current Behavior
Using the Gemini Integration I tried to use the Text from Image feature by uploading an image to a container using "Upload media to Firebase" This image URL is used for the Text from Image Feature of the Gemini Integration: but the action output is not updated after the action:
Expected Behavior
Action output "geminiResponse" should have the response of the Gemini API.
Using the local upload for the container action and providing the uploaded image as gemini input as "Uploaded Image File" works fine and I get an value for "geminiResponse".
Steps to Reproduce
Reproducible from Blank
Bug Report Code (Required)
IT4kz8r6w5N2od9b1s/1bflVoDgUKUc3TLJEoetxc0gbfe/4PZkXPczBZRdWZ72zaH1mGEyZ/UcC+fzFv+HfJPEoaDGtG9lG+M0NWBPPbEOVeKayC6qKXnBRP9tUN0iP356nhRBQG/hvc3An6kOuOPOXTT6Cf9qOYwx5e6fDbOY=
Visual documentation
Environment
Additional Information
No response