How elder-plinius/i-llm works
1. What this repository is
- I-LLM is an interactive AI “movie maker” workflow built around Streamlit.
- The core use case is generating a movie concept, style guide, outline, screenplay, and voice/dialogue assets from user prompts.
2. Primary runtime entrypoint
- app.py is the documented main application entrypoint (streamlit run app.py).
- The extra variants (appv2.py, appv3.py, appv4.py, appdalle.py, movie_maker_app.py) suggest iterative UI/prototype versions rather than separate services.
3. Presentation layer
- The Streamlit app is the user-facing boundary.
- It likely gathers creative inputs from the user, displays generated text/assets, and coordinates the multi-step creation flow.
- screen.md likely documents or captures the UI/output flow.
4. Orchestration / workflow layer
- agents.py is the main sign that the app uses a higher-level orchestration layer rather than calling models directly from the UI.
- This layer likely sequences tasks such as concept generation, style development, outline writing, script drafting, and dialogue/voice preparation.
- prompts.py appears to hold the prompt templates that define those generation steps.
5. Text-generation model adapters
- openai_chat.py is the OpenAI text/chat integration.
- gemini_chat.py is the Google Gemini text-generation integration.
- These appear to be thin service boundaries that isolate vendor-specific API calls from the rest of the application.
6. Multimodal / image-related functionality
- openai_vision.py suggests image understanding or vision-based input handling.
- dalle.py and appdalle.py indicate image generation capability, probably for concept art or visual accompaniment.
- This creates a separate model boundary for image generation/analysis alongside text generation.
7. Voice and audio synthesis
- speech.py is the audio/voice layer.
- elevenlabs_client.py, elevenlabs_library.py, and 11labslibrary.py indicate ElevenLabs integration for voice synthesis or voice matching.
- The README explicitly calls out voice matching and dialogue generation, so audio is a distinct subsystem, not just an afterthought.
8. Shared utilities and support code
- utils.py likely contains common helpers used across the app, model wrappers, and generation flows.
- requirements.txt defines the Python dependency boundary for the whole system.
- .env.example shows the app depends on runtime secrets, especially OPENAI_API_KEY and ELEVENLABS_API_KEY.
9. External services and dependencies
- OpenAI is used for chat/text generation and possibly vision/image-related tasks.
- Google Gemini is an alternate or complementary text-generation backend.
- ElevenLabs is the external speech synthesis provider.
- DALL-E is implied for image generation.
- These services are the main external architecture boundaries the app integrates with.
10. Deployment/runtime shape
- Procfile suggests the project is prepared for a process-based deployment platform such as Heroku or similar.
- setup.sh likely automates local or cloud environment setup.
- The repository is therefore a Python application with a Streamlit frontend and vendor API integrations, not a traditional multi-service backend.
11. How data flows through the system
- User input enters via Streamlit.
- The app routes that input through prompt templates and orchestration logic.
- Model adapter modules call external AI APIs.
- Generated text, images, or audio are returned to the UI for display or playback.
- The architecture is centered on “UI → orchestrator → provider adapters → external AI services → UI.”
12. Architecture diagram boundary summary
- Draw one clear application boundary around the Python/Streamlit app.
- Inside it, show separate subsystems for UI, orchestration/prompts, text models, image/vision, and speech.
- Outside it, show OpenAI, Gemini, ElevenLabs, and image-generation services as external providers.
Main entry points: agents.py Agents · app.py Main app · openai_chat.py OpenAI chat · gemini_chat.py Gemini chat
Components 18
Application
Streamlit UI and orchestration code inside the Python app
- Main app · Primary Streamlit application entrypoint
app.py - App variants · Alternative UI/prototype entrypoints
- Agents · Coordinates the multi-step movie generation flow
agents.py - Prompts · Reusable prompt templates for generation stages
prompts.py - Utils · Common helper functions used across the app
utils.py - OpenAI chat · Chat/text generation integration for OpenAI models
openai_chat.py - Gemini chat · Chat/text generation integration for Gemini models
gemini_chat.py - OpenAI vision · Image understanding and multimodal input integration
openai_vision.py - DALL-E · Image generation integration for concept art or visuals
dalle.py - Speech · Voice and dialogue synthesis workflow
speech.py - 11Labs client · Primary ElevenLabs service integration
elevenlabs_client.py - 11Labs lib · ElevenLabs-related helper library
elevenlabs_library.py - 11Labs alt · Legacy or alternate ElevenLabs helper module
11labslibrary.py - Screen notes · Documentation or capture of the UI flow
screen.md
Providers
Third-party AI services used by the app
- OpenAI · External provider for chat and vision capabilities
- Gemini · External provider for text generation
- ElevenLabs · External provider for speech synthesis
- DALL-E API · External image generation service
Connections 18
- Main app → Agents: starts flow · Main UI delegates creative workflow steps to the orchestrator
- Main app → Utils: uses · UI shares common helpers
- Main app → Screen notes: documents · Screen notes capture the presentation flow
- App variants → Main app: iterates · Prototype UI versions evolve from the main app
- Agents → Prompts: loads · Orchestrator uses prompt templates for each generation stage
- Agents → OpenAI chat: calls · Routes text generation tasks to OpenAI adapter
- Agents → Gemini chat: calls · Routes text generation tasks to Gemini adapter
- Agents → OpenAI vision: calls · Uses vision adapter when image understanding is needed
- Agents → DALL-E: calls · Triggers image generation for visuals or concept art
- Agents → Speech: calls · Hands off voice and dialogue generation
- OpenAI chat → OpenAI: API · OpenAI text/chat service boundary
- OpenAI vision → OpenAI: API · OpenAI multimodal vision service boundary
- Gemini chat → Gemini: API · Gemini text generation service boundary
- DALL-E → DALL-E API: API · Image generation service boundary
- Speech → 11Labs client: uses · Speech pipeline delegates to ElevenLabs client
- 11Labs client → ElevenLabs: API · ElevenLabs speech synthesis service boundary
- 11Labs lib → ElevenLabs: API · Helper library also wraps ElevenLabs service
- 11Labs alt → ElevenLabs: API · Alternate legacy helper also wraps ElevenLabs service