How rvbyy/sensai works
SensAI is a local Ollama assistant with two visible interaction paths: the main persisted chat framework and a smaller Alibi chatbot. In the framework path, the main entry point manages profiles and conversation context, streams chat through the API client, and supports long-term memory retrieval. ORM models represent messages, generation settings, tools, responses, profiles, and memory. The README documents only the product’s local-assistant purpose; several framework capabilities are evident in sampled source, but the web interface and some model behavior were not inspected.
Main entry points: chat.py Chat generation · main.py Framework entry · basic_chat_bot.py Basic chatbot · context.py Short-term context
Components 19
User interaction
- Framework entry
src/main.py - Web app setup
src/webapp/init_app.py
Chat framework
- Chat generation
src/galerelm/models/chat.py - HTTP API client
src/rapideAPI/client.py - Generation options
src/galerelm/models/options.py - Tool definitions
src/galerelm/models/tools.py - Chat response data
src/galerelm/models/response.py - Generation utilities
src/galerelm/models/generate.py
Conversation data
- User profile
src/galerelm/models/profile.py - Short-term context
src/galerelm/models/context.py - Long-term memory
src/galerelm/models/deep_context.py - Messages and tools
src/galerelm/models/message.py - SQLite database
src/galerelm.db
Alibi chatbot
- Basic chatbot
src/model/basic_chat_bot.py - Intent classifier
src/model/intent_classifier.py - Prompt template
src/model/prompt_template.py - Ollama client
src/model/ollama_client.py
Other components
- User
- Ollama service
Connections 20
- User → Framework entry: interacts with
src/main.py - Framework entry → User profile: loads or creates
src/main.py - Framework entry → Short-term context: manages
src/main.py - Framework entry → SQLite database: initializes
src/main.py - Framework entry → Chat generation: builds and streams
src/main.py - Chat generation → HTTP API client: streams requests
src/galerelm/models/chat.py - HTTP API client → Ollama service: sends HTTP requests
src/rapideAPI/client.py - Short-term context → Long-term memory: archives overflow
src/galerelm/models/context.py - Long-term memory → HTTP API client: requests embeddings
src/galerelm/models/deep_context.py - Short-term context → Messages and tools: holds messages
src/galerelm/models/context.py - Chat generation → Messages and tools: formats conversation
src/galerelm/models/chat.py - Chat generation → Generation options: formats settings
src/galerelm/models/chat.py - Chat generation → Tool definitions: formats tools
src/galerelm/models/chat.py - Chat generation → Chat response data: builds response
src/galerelm/models/chat.py - User → Basic chatbot: sends prompt
src/model/basic_chat_bot.py - Web app setup → Basic chatbot: uses chatbot
src/webapp/init_app.py - Basic chatbot → Intent classifier: classifies request
src/model/basic_chat_bot.py - Basic chatbot → Prompt template: generates prompt
src/model/basic_chat_bot.py - Basic chatbot → Ollama client: requests completion
src/model/basic_chat_bot.py - Ollama client → Ollama service: posts chat request
src/model/ollama_client.py