Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add image receive mode #452

Merged
merged 3 commits into from
Nov 18, 2023
Merged

add image receive mode #452

merged 3 commits into from
Nov 18, 2023

Conversation

gilcu3
Copy link
Contributor

@gilcu3 gilcu3 commented Nov 7, 2023

This PR adds support for selecting how the bot send images generated with DALL·E though an env variable IMAGE_RECEIVE_MODE. Currently, the bot sends images as photos, which are compressed by telegram. By allowing sending images as documents, we receive the full resolution image in png format. I left the photo as the default option for backward compatibility, although I think document is always better :).

One possible addition, once DALL·E 3 is merged, is to respond with the revised_prompt (from the json response) as a caption for the photo. It seems DALL·E 2 responses do not include this.

@n3d1117
Copy link
Owner

n3d1117 commented Nov 18, 2023

Thanks @gilcu3, I like this (just fixed a little name mismatch for the env variable, there was a IMAGE_RECEIVE_MODE instead of IMAGE_FORMAT).

I'm going to merge this, feel free to open a new PR if you find the time to work on the captions for DALL·E!

@n3d1117 n3d1117 merged commit 2eb3b4a into n3d1117:main Nov 18, 2023
@gilcu3 gilcu3 deleted the image-improvements branch November 18, 2023 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants