-
Notifications
You must be signed in to change notification settings - Fork 256
Presentation generator/mission 2 #204
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
base: Develop
Are you sure you want to change the base?
Presentation generator/mission 2 #204
Conversation
…age-generator endpoints
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before approving thi PR Please do the following: Remove the saved images. No need to commit them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No Need commit the Image
I have removed those old generated image files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you manage to implement?
Thank you for working on the presentation generator update (mission-2). I've reviewed the current state of your PR branch and have some feedback: Current Status Positive Aspects Implementation Files: Add the core implementation files (core.py, tools.py) to both the outline_generator and slide_generator directories |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't to commit this file
Description
This project implements an AI-powered image generation system for presentation slides by leveraging Black Forest Labs's FLUX.1-schnell model through Together.ai and Gemini 1.5 pro to generate comprehensive prompts for Image Generation.
Key Features:
Motivation: Enhance presentation generation by automatically creating relevant, high-quality images for slides, improving visual engagement while maintaining contextual relevance.
Type of Change
Please select the type(s) of change that apply and delete those that do not.
Proposed Solution
Implementation Steps:
1. Initial Processing (
executor
function)/submit-tool
endpoint using tool ID"image-generator"
.image_executor
call ingenerate_slides
method.2. Prompt Generation (
ImagePromptGenerator
class)generate_image_prompt
method to create prompts for each slide.compile
method.3. Image Generation Chain Creation
create_image_generation_chain
to set up parallel processing.4. Image Generation (
ImageGenerator
class)"black-forest-labs/FLUX.1-schnell"
5. Storage and Response Handling
The entire process is orchestrated by
image_generation_handler
, ensuring smooth execution with error handling.How to Test
Run the test suite in:
marvel-ai-backend\app\tools\presentation_generator_updated\image_generator\tests\
Key Test Cases:
The test suite uses mock clients for Together.ai and Google Cloud Storage.
Environment variables for testing are configured in
conftest.py
.Expected Outcomes:
Unit Tests
Added Unit Tests (
marvel-ai-backend\app\tools\presentation_generator_updated\image_generator\tests\
):test_tools.py
test_init
: Verifies correct ImageGenerator initialization and configuration.test_generate_single_image_success
: Tests successful image generation pipeline.test_generate_single_image_failure
: Validates error handling for failed generations.test_save_image_to_gcs
: Tests Google Cloud Storage integration.test_core.py
test_executor
: Validates main executor function with presentation content.test_executor_with_invalid_input
: Tests error handling for invalid inputs.test_parallel_processing
: Verifies concurrent image generation functionality.Note: All tests use mock objects for Together.ai client and Google Cloud Storage to ensure reliable testing without external dependencies.
Documentation Updates
Indicate whether documentation needs to be updated due to this PR.
A new setup guide needs to be added to the documentation. Here are the specific updates needed:
Image Generator Setup Guide
1. Prerequisites and API Keys
Users need to obtain:
2. Environment Configuration
Create or update
.env
file with:3. Google Cloud Platform Setup
4. Project Files Structure
Ensure prompt templates exist at:
5. Dependencies Installation
6. Setup Verification Checklist
7. Common Issues and Solutions
Links to documentation:
Checklist
Additional Information
Files Added
New files created in
marvel-ai-backend/app/tools/presentation_generator_updated/
Files Changed
Modified Existing Files:
slide_generator/core.py
slide_generator/tools.py
utils/tools_config.json
services/schemas.py