Currently working on a project where users capture an image and upon hitting the 'Analyze' button, the image is sent to GPT-4 via an API. it then analyzes the image and returns the analysis results in JSON format.
The images are stored on one of my webserver once the 'Analyze' button is hit. From our webserver, the images are then sent to GPT-4 for analysis.
However, we've noticed that it takes a significant amount of time to receive the analysis results from GPT-4. Additionally, we sometimes encounter a runtime error stating "The operation select list item cannot accept the arguments:, 'not found'], [1]". This error is reported every 5 seconds.
To address these issues, we are exploring alternatives to speed up the response time and eliminate the error message. It could be use of Base64 encoding for the images.
Please help us in this case to improve the efficiency and user experience of our project. Any help would be greatly appreciated. Thank you!
you are assuming that "choices" is a list always...but in some cases, the responseContent has not "choice" so, in the before block you get "not found" which is not a list ...you need to protect all that code, to execute it only when success response and if it contains that tags...and also change this, because "choices" must be a list:
Hi Ramon, as I mentioned earlier instead of using my webserver to store all images then send to gpt api to analyze, what could be some alternative solution? like using base 64'
I tried my best to reduce the number of token, compressed images using php script
Like I've said above, If the problem is the time response from GTP-4 then try to reduce that time....reducing the maximum items, or applying other recommendations...in you aia you take a photo and then sent it to openai...I don't know what are you referring with your webserver and with store all the images....
when it comes to the webserver, after user capture an image, i am storing all of those images in one of my webserver, from there i have created an api endpoint which send the image url joning with one of my domain name to the chatgpt
Imagine you have captured an image and want to add additional information in a text box before initiating the analysis button. How can you utilize the text entered in the textbox as a prompt for the image analysis as well ?
Would you mind helping me out to achieve this Ramon? It will be huge helpful
Imagine you have captured an image and want to add additional information in a text box before initiating the analysis button. How can you utilize the text entered in the textbox as a prompt for the image analysis as well ?
Sorry, but I don't knor the api of gpt enough to be able to help you with this topic. I don't know if you can add that text like Context or similar in the request.