Presentation generator/mission 2#204
Conversation
…age-generator endpoints
buriihenry
left a comment
There was a problem hiding this comment.
Before approving thi PR Please do the following: Remove the saved images. No need to commit them
There was a problem hiding this comment.
No Need commit the Image
|
I have removed those old generated image files. |
buriihenry
left a comment
There was a problem hiding this comment.
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.
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 (
executorfunction)/submit-toolendpoint using tool ID"image-generator".image_executorcall ingenerate_slidesmethod.2. Prompt Generation (
ImagePromptGeneratorclass)generate_image_promptmethod to create prompts for each slide.compilemethod.3. Image Generation Chain Creation
create_image_generation_chainto set up parallel processing.4. Image Generation (
ImageGeneratorclass)"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
.envfile 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.pyslide_generator/tools.pyutils/tools_config.jsonservices/schemas.py