I used the chatgpt API to retrieve 10 images from the Tencent COS object storage. I tried 5 times, but one of them failed. I looked at the error message on my end and found that the reason for the failure was that only 7 out of 10 images were retrieved. When I checked the reason, I found that Tencent’s COS record only received 7 requests and did not receive all 10 requests. Is it possible that the chatgpt side has restrictions on calling batch retrieval of images?
Welcome to the community, @sherlockn21 …
Can you share the code/prompt you’re trying? And what model, etc.
More details can help us help you! ![]()
Internally, it is not allowed. The general architecture of the internal code/precompt is that I provide the URLs of 10 images stored in Tencent’s cos object to Chattpt, and Chattpt downloads them for AI analysis
From my logs on Tencent COS, it appears that only 7 requests have come. Normally, if the download fails, the logs on the COS side should also report errors. I suspect that these three requests have not been sent from the chatgpt side at all (although the network side is normal)
Okay, so you’re using consumer ChatGPT? Or the API?
Without more details, it’s hard to say. Have you reached out to support?
I am using an API and have not yet contacted support. I would like to check with the developer community if there is a similar situation as min
Are you just sending the URLs in the system prompt? A user message?
Is it always 7 out of 10? Using tools at all?
I just tested it and looked at the logs. I found the same 10 URLs, but sometimes there are 2 URLs without corresponding requests, which is not a stable 3 URLs. Moreover, after testing several times, there was only 1 failed case
I suspect that chatgpt is targeted towards batch requests, and in the case of multiple launches, the AI model may miss out. Is it because the machines deployed by the AI model cannot handle it?
From your description, it appears the model is not consistently loading all images from object storage because it does not always invoke the relevant tool or function.
I recommend reviewing both the function description and the system prompt to more clearly communicate the function’s purpose and the conditions under which the model should call it.
https://platform.openai.com/docs/guides/function-calling#best-practices-for-defining-functions
I think what you said makes sense, but based on the situation where this problem occurs, I usually try 5 times, but one attempt fails. The other four attempts are successful, which means that my code and prompt are not abnormal. Moreover, according to the request log of cos, the failed attempt will result in missing requests. I will provide the API parameters I am using later
Hi,
If you’re using ChatGPT.com, then this is not unexpected, given that the model is generating tokens from the provided context within the user message for the retrieval tool.
It would be another thing if the lookups for image_url’s provided within the API calls were not showing up on your server.
You can instruct in your message on ChatGPT to fetch all the images, or make it more structured so it’s easier for the model to include the URLs in the retrieval tool call. This should improve the performance.