i forgot too commit
All checks were successful
Enterprise AI Code Review / ai-review (pull_request) Successful in 38s
All checks were successful
Enterprise AI Code Review / ai-review (pull_request) Successful in 38s
This commit is contained in:
70
README.md
70
README.md
@@ -14,11 +14,13 @@ Bartender is the default personality - a wise, steady presence who listens witho
|
||||
|
||||
## Features
|
||||
|
||||
- **Multi-Platform Support**: Discord, Web browser, and CLI terminal access
|
||||
- **Multi-Provider AI**: Supports OpenAI, OpenRouter, Anthropic (Claude), and Google Gemini
|
||||
- **Persistent Memory**: PostgreSQL database for user and conversation storage
|
||||
- **Attachment-Aware**: Understands attachment theory and can reflect patterns when helpful
|
||||
- **Grief-Informed**: Handles relationship grief with care and presence
|
||||
- **Web Search**: Access current information via SearXNG integration
|
||||
- **Intimacy Levels**: Platform-appropriate behavior (LOW/MEDIUM/HIGH)
|
||||
- **Easy Deployment**: Docker support with PostgreSQL included
|
||||
|
||||
### Living AI Features
|
||||
@@ -48,21 +50,35 @@ cp .env.example .env
|
||||
|
||||
Edit `.env` with your settings.
|
||||
|
||||
### 3. Run with Docker
|
||||
### 3. Choose your platform
|
||||
|
||||
#### Discord Bot
|
||||
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Or run locally:
|
||||
|
||||
```bash
|
||||
# Or locally:
|
||||
python -m venv .venv
|
||||
source .venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
python -m loyal_companion
|
||||
```
|
||||
|
||||
#### Web Platform
|
||||
|
||||
```bash
|
||||
python3 run_web.py
|
||||
# Visit http://localhost:8080
|
||||
```
|
||||
|
||||
#### CLI Client
|
||||
|
||||
```bash
|
||||
./lc talk
|
||||
# Or: python3 lc talk
|
||||
```
|
||||
|
||||
**See:** [Multi-Platform Documentation](docs/multi-platform-expansion.md) for detailed setup
|
||||
|
||||
## Configuration
|
||||
|
||||
All configuration is done via environment variables in `.env`.
|
||||
@@ -146,6 +162,18 @@ When commands are disabled (default), the bot handles these naturally through co
|
||||
- **Good Friend** (61-80): Real trust, honest even when hard
|
||||
- **Close Friend** (81-100): Deep bond, reflects patterns with love
|
||||
|
||||
## Multi-Platform Architecture
|
||||
|
||||
Loyal Companion supports three platforms, each with appropriate intimacy levels:
|
||||
|
||||
- **🎮 Discord** - The social bar (LOW/MEDIUM intimacy)
|
||||
- **🌐 Web** - The quiet back room (HIGH intimacy)
|
||||
- **💻 CLI** - The empty table at closing (HIGH intimacy)
|
||||
|
||||
**Same bartender. Different stools. No one is trapped.**
|
||||
|
||||
See [MULTI_PLATFORM_COMPLETE.md](MULTI_PLATFORM_COMPLETE.md) for the complete architecture.
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
@@ -153,19 +181,35 @@ src/loyal_companion/
|
||||
├── bot.py # Main bot class
|
||||
├── config.py # Configuration
|
||||
├── cogs/
|
||||
│ ├── ai_chat.py # Mention handler
|
||||
│ ├── memory.py # Memory commands
|
||||
│ └── status.py # Health/status commands
|
||||
│ └── ai_chat.py # Discord adapter (uses Conversation Gateway)
|
||||
├── web/
|
||||
│ ├── app.py # FastAPI application
|
||||
│ ├── routes/ # Web API endpoints
|
||||
│ └── static/ # Web UI
|
||||
├── models/
|
||||
│ ├── user.py # User, UserFact
|
||||
│ ├── platform.py # Platform enums & ConversationRequest/Response
|
||||
│ ├── platform_identity.py # Cross-platform account linking
|
||||
│ ├── user.py # User, UserFact, UserPreference
|
||||
│ ├── conversation.py # Conversation, Message
|
||||
│ └── living_ai.py # BotState, UserRelationship, etc.
|
||||
│ └── living_ai.py # BotState, UserRelationship, Mood, etc.
|
||||
└── services/
|
||||
├── conversation_gateway.py # Platform-agnostic processor
|
||||
├── platform_identity_service.py # Account linking
|
||||
├── ai_service.py # AI provider factory
|
||||
├── mood_service.py # Mood system
|
||||
├── relationship_service.py # Relationship tracking
|
||||
├── fact_extraction_service.py # Autonomous learning
|
||||
└── ...
|
||||
└── fact_extraction_service.py # Autonomous learning
|
||||
|
||||
cli/
|
||||
├── main.py # Typer CLI application
|
||||
├── client.py # HTTP client for Web API
|
||||
├── session.py # Local session management
|
||||
└── formatters.py # Terminal formatting
|
||||
|
||||
tests/
|
||||
├── test_safety_constraints.py # A+C safety guardrails
|
||||
├── test_intimacy_boundaries.py # Intimacy level enforcement
|
||||
└── test_load_performance.py # Load and performance tests
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
Reference in New Issue
Block a user