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

feat: Add image generation capability to Telegram messaging (PR491 Resubmission) #1505

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

odilitime
Copy link
Collaborator

Resubmission of #491

Relates to:

N/A

Risks

Low. Image generation could be affected

Background

What does this PR do?

  • Completes image generation functionality for Together provider
  • Adds image generation functionality to Telegram

What kind of change is this?

Bug fixes (non-breaking change which fixes an issue)
Improvements (misc. changes to existing features)
Features (non-breaking change which adds functionality)

Testing

Where should a reviewer start?

Just follow testing steps below.

Detailed testing steps

  1. (optionally) Add "imageModelProvider": "llama_cloud" to a character file
  2. (optionally) Add a Together API key if using llama_cloud provider. Otherwise ensure there's an API key for the chosen `modelProvider"
  3. Ask the agent on Telegram to generate an image.
  4. Verify that an image is returned as requested.

@shakkernerd shakkernerd changed the base branch from main to develop December 28, 2024 00:45
@tcm390
Copy link
Collaborator

tcm390 commented Dec 28, 2024

I tested it, and these are the issues I found so far:

  1. The image prompt seems incorrect, causing the bot to fail to generate the desired image. Here’s a screenshot of the prompt for reference:
Screenshot 2024-12-27 at 8 54 24 PM
  1. The image description is too long because it uses the full prompt as the caption. This exceeds the character limit for Telegram image captions, sometimes resulting in an caption too long error. And the caption of the image seems not correct
Screenshot 2024-12-27 at 9 01 29 PM

@tcm390
Copy link
Collaborator

tcm390 commented Dec 28, 2024

Additionally, I couldn’t find the code handling image generation for Telegram. Perhaps we could enhance this PR: #1220 by including functionality to quote the user’s message for image replies. However, it seems this PR primarily focuses on improving the image generation plugin prompt. It might be a good idea to adjust the title to better reflect the scope of the changes.

monilpat
monilpat previously approved these changes Dec 28, 2024
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.

4 participants