How mdipietro09/generativeai works
This repository is a collection of Python GenAI/LLM examples, not one integrated application. Its main user-facing workflows are a voice chatbot, a multimodal agent team that prepares a social post, and a RAG chat app. Separate notebook projects explore agent patterns and frameworks. The graph follows the sampled runtime code for the three apps; notebook topics are inferred from filenames, and their internal wiring is not shown.
Main entry points: agents.py Crew orchestration · chatbot.py Chatbot loop · rag_app.py RAG responder · data Image inputs
Components 34
Voice chatbot
- Chatbot loop
Chatbot/chatbot.py - Speech recognition
Chatbot/chatbot.py - Command handling
Chatbot/chatbot.py - Ollama response
Chatbot/chatbot.py - Speech synthesis
Chatbot/chatbot.py
Agent workflow
- Image inputs
Agents_WebSearching/data - Image descriptions
Agents_WebSearching/agents.py - Crew orchestration
Agents_WebSearching/agents.py - Photographer task
Agents_WebSearching/agents.py - Social caption task
Agents_WebSearching/agents.py - Manager task
Agents_WebSearching/agents.py - Web search tools
Agents_WebSearching/agents.py - Post proposal
Agents_WebSearching/agents.py
RAG chat
- Chat interface
RAG/rag_app.py - RAG responder
RAG/rag_app.py - Context retrieval
RAG/rag_app.py - Streamed answer
RAG/rag_app.py - NVIDIA PDF
RAG/data/doc_nvidia.pdf
Learning examples
- Coding agents
Agents_Coding - Web-search agents
Agents_WebSearching/notebook.ipynb - Agent fundamentals
Agents_ZeroToHero/notebook_I_basics.ipynb - Dataframes
Agents_ZeroToHero/notebook_II_dataframes.ipynb - Agent memory
Agents_ZeroToHero/notebook_III_memory.ipynb
Other components
- User
- Microphone
- Speech services
- Audio output
- Post requester
- Vision model
- DuckDuckGo
- Human approver
- Questioner
- Document collection
- Ollama chat model
Connections 29
- User → Microphone: speaks into
- Microphone → Speech recognition: audio input
- Chatbot loop → Speech recognition: captures speech
- Speech recognition → Chatbot loop: transcribes
- Chatbot loop → Command handling: checks text
- Chatbot loop → Ollama response: generates reply
- Ollama response → Speech services: uses Ollama
- Chatbot loop → Speech synthesis: speaks reply
- Speech synthesis → Speech services: uses gTTS
- Speech synthesis → Audio output: plays audio
- Post requester → Crew orchestration: requests post
- Image inputs → Image descriptions: provides images
- Image descriptions → Vision model: describes images
- Image descriptions → Crew orchestration: supplies descriptions
- Crew orchestration → Photographer task: dispatches task
- Crew orchestration → Social caption task: dispatches task
- Crew orchestration → Manager task: dispatches task
- Photographer task → Web search tools: searches trends
- Social caption task → Web search tools: searches trends
- Web search tools → DuckDuckGo: queries
- Manager task → Human approver: requests approval
- Crew orchestration → Post proposal: returns result
- Questioner → Chat interface: asks question
- Chat interface → RAG responder: calls responder
- RAG responder → Context retrieval: retrieves context
- Context retrieval → Document collection: queries documents
- RAG responder → Ollama chat model: streams completion
- RAG responder → Chat interface: yields chunks
- Chat interface → Streamed answer: shows answer