PipedreamHQ / pipedream

Connect APIs, remarkably fast. Free for developers.
https://pipedream.com
Other
8.74k stars 5.26k forks source link

[BUG] OpenAI - Dall-E action exports image as base64 causing error workflow payload exceeded #12943

Closed vunguyenhung closed 1 month ago

vunguyenhung commented 1 month ago

Describe the bug Currently, when setting the Response Format is Base64 JSON, if the image is too large, the user will likely to hit Pipedream error: payload limit exceeded

Expected behavior

Additional context Reported by a user here: https://pipedream-users.slack.com/archives/CPTJYRY5A/p1721479010442189?thread_ts=1721435661.306959&channel=CPTJYRY5A&message_ts=1721479010.442189

malexanderlim commented 1 month ago

@vunguyenhung , would it be better to let the user decide whether to return the image as Base64 JSON or Image in tmp directory (recommended for large images)? I'm not as clear on how often this fails.

vunguyenhung commented 1 month ago

@vunguyenhung , would it be better to let the user decide whether to return the image as Base64 JSON or Image in tmp directory (recommended for large images)?

Hi @malexanderlim, the reason I suggest to remove Base64 JSON option is because the usecase for Base64 JSON data is limitted, and most of the time users would write the data to tmp dir. I know this because most of our actions that related to images accepts data from tmp dir instead of Base64 data (.i.e uploading to s3, dropbox, etc).

Also Pipedream Buider UI does not work well with base64 data (it will slow or even hang). In general, Pipedream Builder UI will slow or hang when there's large strings exported from actions. So I tend to avoid Base64 data string as much as possible, so users will have better experience.

In any case, I agree that we can add one more option to write data to tmp dir

vunguyenhung commented 1 month ago

Hi everyone, all test cases are passed! Ready for release!

Test report https://vunguyenhung.notion.site/BUG-OpenAI-Dall-E-action-exports-image-as-base64-causing-error-workflow-payload-exceeded-765b9bc2b7004d06bc4534dbb729aa01