How satishjey/ai-text-generation-studio works
AI Text Generation Studio is a local Streamlit chat application backed by Gemini. A user submits a message through the chat screen; the app validates it, keeps the conversation in session state, and asks the generator to stream a reply using the thread’s history. The generator handles capacity retries and model fallback, then returns reply text and metadata for display. Configuration supplies the model choices, limits, thinking levels, and API key. The README documents these behaviors; generator internals are only partially excerpted, so unshown implementation details are not expanded.
Main entry points: app.py Streamlit chat · generator.py Streaming and recovery · chat.py Message checks and history · config.py Models and configuration
Components 7
Chat interface
- Streamlit chat
app.py
Conversation
- Session thread
app.py - Message checks and history
src/chat.py
Generation and settings
- Models and configuration
src/config.py - Streaming and recovery
src/generator.py
Other components
- Chat user
- Gemini Interactions API
Connections 14
- Chat user → Streamlit chat: submits message
app.py - Streamlit chat → Message checks and history: validates message
app.py - Streamlit chat → Session thread: updates thread
app.py - Streamlit chat → Session thread: clears thread
app.py - Session thread → Streamlit chat: renders messages
app.py - Streamlit chat → Streaming and recovery: requests stream
app.py - Streaming and recovery → Message checks and history: builds API history
README.md - Message checks and history → Models and configuration: uses message limit
src/chat.py - Streamlit chat → Models and configuration: loads settings
app.py - Streaming and recovery → Models and configuration: uses generation settings
src/generator.py - Streaming and recovery → Gemini Interactions API: streams generation
src/generator.py - Gemini Interactions API → Streaming and recovery: returns reply and usage
src/generator.py - Streaming and recovery → Streamlit chat: yields reply events
app.py - Streaming and recovery → Gemini Interactions API: retries and falls back
README.md