How theonlyabdulhamid/chatbot works
AI Support Assistant is a Python chat application with both an interactive CLI and a FastAPI chat endpoint. Users submit messages through either entry point; each delegates to the shared client, which sends them to Gemini, returns a reply, and persists conversation history in JSON. On startup, the client loads credentials and restores prior history for the chat session. The README describes the CLI workflow; the sampled app.py additionally exposes an HTTP API. The shared client is one file, so its distinct responsibilities share a source path.
Main entry points: api_client.py Chat client · main.py Interactive CLI · app.py Chat API · chat_history.json JSON history
Components 8
User entry points
- Interactive CLI
main.py - Chat API
app.py
Conversation handling
- Chat client
api_client.py
External services and state
- Credential setup
api_client.py - Gemini service
- JSON history
chat_history.json
Other components
- CLI user
- HTTP client
Connections 8
- CLI user → Interactive CLI: enters messages
main.py - Interactive CLI → Chat client: sends messages
main.py - HTTP client → Chat API: posts messages
app.py - Chat API → Chat client: sends messages
app.py - Chat client → Credential setup: loads credentials
api_client.py - Chat client → JSON history: loads and saves
api_client.py - Chat client → Gemini service: sends chat requests
api_client.py - Gemini service → Chat client: returns responses
api_client.py