After many attempts and explorations, I’ll share my thoughts and findings about sending files or images to a custom server action through a GPT.
It seems that GPT is not able to send files to a server:
-
Neither encoding them into a base64 format, as the resulting string is too long for it to write in the request; it only sends the first 100 characters approximately.
-
In the case of DALL·E 3 generated images, I can’t send the displayed image link because it says ‘I don’t have access to that link.’ Instead, it tries to send a non-functioning link or just the name of the file.
So, I don’t know if any of the OpenAI developers can clarify if their purpose is for the GPTs not to be able to send files through actions or if it’s just something they need to fix.
Thanks.
4 Likes
Facing the DALLE image-sending problem too. Any luck solving it yet?
The only solution is to ask the user to give the url of the displayed image. Nothing else can be done until the OpenAI devs change that i think.
Oh really? Maybe using code interpreter in some way could work this out? Making it access the image and store it elsewhere? I’m dying to crack this
Again, it looks like the storage code interpreter has access to is secured, and the signature to access certain archives is not accesible for ChatGPT. The more i was able to acieve is for code interpreter to write the base64 into a .txt file, but the base64 cannot be sent through a request because GPT is not able to write it.
Hi UnrealCatter - Were you able to figure out if there is a way to send the text file (or the contents of it) through a request?
Hey! Still isn’t, but i think this could be a protection messure from preventing the users abusing APIs with malicious files thorugh GPTs
It’s related to the size. I reduced the Dalle image down to 5x5 px just to check and the converted url-escaped base64 encoded string was passed via API to an external destination successfully.
This is driving me crazy, i think the answer is to switch to Co-Pilot and try developing the apps on there. I think that might be the way they are trying to push everyone to go.
Hey @jefftj86 - Mind elaborating? What do you mean?
Has anyone has any luck here in exporting image files out of your GPT to an external endpoint?
I was working through this issue today and found this post because I was also looking for a solution.
Base64 is too much text for the GPT to work with when you have a regular size image. The URL that is returned by the DALL-E Image Generation capability is not valid outside of the chat window.
I don’t know if this will help your use case, but I did get my GPT to pass a DALL-E generated image URL to an action. I did this by unchecking the DALL-E Image Generation Capability and wrapping a call to the api.openai.com image generation API in an Action.
Since it’s the API and not the Chat window, it will cost me for each image generated, but I believe it’s only about $0.02 per image. Not ideal but it let me get on with my day.