How ai-ml-eidiko/eidiko_chatbot works
EIDIKO is a local chatbot for finding documents and metadata in a user’s Google account, with optional, explicitly confirmed email, calendar, and Sheets writes. The main flow runs from chat UI through Flask query routing, safety checks/redaction, Google search, and LLM-assisted summaries back to result cards. The graph also shows attachment downloads and the separate confirm-before-write path. The README documents product capabilities not fully visible in the excerpts; their links are cited to the README rather than implying uninspected implementation details.
Main entry points: app.py Flask API · app.js Chat UI · google_client.py Gmail search · claude_client.py Query and summary LLM
Components 20
Chat interface
- Chat UI
app.js - Chat page
index.html - Result cards
app.js
Request handling
- Flask API
app.py - Query routing
app.py - Write confirmation
app.py - Attachment download
app.py
Google and language services
- Google OAuth
google_client.py - Gmail search
google_client.py - Drive search
google_client.py - Calendar search and writes
google_client.py - Sheets search and writes
google_client.py - Email sending
google_client.py - Query and summary LLM
claude_client.py
Privacy controls
- Text redaction
redact.py - Secret-query blocking
redact.py
Other components
- User
- Google APIs
- Groq API
- Browser downloads
Connections 29
- User → Chat UI: asks or confirms
README.md - Chat page → Chat UI: hosts
app.js - Chat UI → Flask API: sends chat requests
app.js - Flask API → Query routing: routes requests
README.md - Query routing → Secret-query blocking: checks query
README.md - Query routing → Write confirmation: proposes writes
app.py - Write confirmation → Chat UI: returns confirmation prompt
app.py - Chat UI → Flask API: submits confirmation
app.js - Write confirmation → Email sending: executes confirmed action
README.md - Write confirmation → Calendar search and writes: executes confirmed action
app.py - Write confirmation → Sheets search and writes: executes confirmed action
README.md - Query routing → Google OAuth: uses credentials
app.py - Flask API → Gmail search: searches account
README.md - Flask API → Drive search: searches account
README.md - Flask API → Calendar search and writes: searches events
README.md - Flask API → Sheets search and writes: searches sheets
app.py - Flask API → Text redaction: scrubs retrieved text
app.py - Flask API → Query and summary LLM: extracts or summarizes
app.py - Query and summary LLM → Groq API: requests completions
claude_client.py - Gmail search → Google APIs: reads metadata
README.md - Drive search → Google APIs: reads metadata
README.md - Calendar search and writes → Google APIs: reads or writes events
README.md - Sheets search and writes → Google APIs: reads or writes cells
README.md - Email sending → Google APIs: sends email
README.md - Flask API → Attachment download: routes download
README.md - Attachment download → Gmail search: fetches attachment bytes
app.py - Attachment download → Browser downloads: streams file
README.md - Flask API → Result cards: returns search results
app.py - Result cards → User: shows links and metadata
README.md