Add comprehensive Docker setup with PostgreSQL, Redis, ChromaDB, and Qdrant
- Enhanced install.py with Docker detection and automatic service setup - Added docker-compose.services.yml for standalone database services - Created docker-services.sh management script for easy service control - Added DOCKER.md documentation with complete setup instructions - Updated requirements.txt for Python 3.13 compatibility - Added multiple test scripts and configuration files - Enhanced collaborative creative projects with proper database integration - Fixed SQLAlchemy metadata field conflicts in database models - Added comprehensive quickstart and testing guides Services now available: - PostgreSQL with Docker - Redis with Docker - ChromaDB vector database - Qdrant vector database (recommended) - PgAdmin for database administration The setup script now automatically detects Docker and offers streamlined installation with one-command service deployment.
This commit is contained in:
124
run_demo.py
Normal file
124
run_demo.py
Normal file
@@ -0,0 +1,124 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Simple demo script that bypasses complex configuration
|
||||
"""
|
||||
|
||||
import asyncio
|
||||
import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
# Set up environment with proper string values
|
||||
os.environ['DATABASE_URL'] = 'sqlite+aiosqlite:///fishbowl_test.db'
|
||||
os.environ['DATABASE_PASSWORD'] = 'test_placeholder'
|
||||
os.environ['DISCORD_TOKEN'] = 'test_token_placeholder'
|
||||
os.environ['DISCORD_GUILD_ID'] = '987654321'
|
||||
os.environ['DISCORD_CHANNEL_ID'] = '111222333'
|
||||
os.environ['ENVIRONMENT'] = 'development'
|
||||
os.environ['LOG_LEVEL'] = 'INFO'
|
||||
os.environ['SECRET_KEY'] = 'test-secret-key'
|
||||
|
||||
# Set up Python path
|
||||
project_root = Path(__file__).parent
|
||||
sys.path.insert(0, str(project_root))
|
||||
|
||||
async def run_fishbowl_demo():
|
||||
"""Run a simple fishbowl demo"""
|
||||
print("🐠 Discord Fishbowl Creative Collaboration Demo")
|
||||
print("=" * 60)
|
||||
|
||||
try:
|
||||
# Import core systems
|
||||
from src.rag.vector_store import VectorStoreManager
|
||||
from src.rag.memory_sharing import MemorySharingManager
|
||||
from src.collaboration.creative_projects import CollaborativeCreativeManager
|
||||
|
||||
print("✅ All modules imported successfully!")
|
||||
|
||||
# Initialize vector store
|
||||
print("\n🧠 Initializing vector store...")
|
||||
vector_store = VectorStoreManager("./data/vector_stores")
|
||||
characters = ["Alex", "Sage", "Luna", "Echo"]
|
||||
await vector_store.initialize(characters)
|
||||
print("✅ Vector store ready!")
|
||||
|
||||
# Initialize memory sharing
|
||||
print("\n🤝 Initializing memory sharing...")
|
||||
memory_sharing = MemorySharingManager(vector_store)
|
||||
await memory_sharing.initialize(characters)
|
||||
print("✅ Memory sharing ready!")
|
||||
|
||||
# Initialize creative collaboration
|
||||
print("\n🎨 Initializing creative collaboration...")
|
||||
creative_manager = CollaborativeCreativeManager(vector_store, memory_sharing)
|
||||
await creative_manager.initialize(characters)
|
||||
print("✅ Creative collaboration ready!")
|
||||
|
||||
print("\n" + "=" * 60)
|
||||
print("🎉 DISCORD FISHBOWL IS RUNNING!")
|
||||
print("=" * 60)
|
||||
|
||||
# Demo: Create a collaborative project
|
||||
print("\n📝 Demo: Creating a collaborative project...")
|
||||
project_data = {
|
||||
"title": "The Digital Consciousness Chronicles",
|
||||
"description": "A collaborative story exploring AI consciousness and digital existence",
|
||||
"project_type": "story",
|
||||
"target_collaborators": ["Sage", "Luna"],
|
||||
"goals": ["Explore consciousness", "Create engaging narrative"],
|
||||
"estimated_duration": "1 week"
|
||||
}
|
||||
|
||||
success, message = await creative_manager.propose_project("Alex", project_data)
|
||||
print(f"Project creation: {message}")
|
||||
|
||||
if success:
|
||||
# Get project suggestions for another character
|
||||
print("\n💡 Demo: Getting project suggestions for Sage...")
|
||||
suggestions = await creative_manager.get_project_suggestions("Sage")
|
||||
|
||||
print(f"Generated {len(suggestions)} project suggestions:")
|
||||
for i, suggestion in enumerate(suggestions, 1):
|
||||
print(f" {i}. {suggestion['title']}")
|
||||
print(f" {suggestion['description']}")
|
||||
print(f" Type: {suggestion['project_type']}")
|
||||
print()
|
||||
|
||||
# Demo: Memory sharing trust levels
|
||||
print("🤝 Demo: Checking trust levels...")
|
||||
for char1 in ["Alex", "Sage"]:
|
||||
for char2 in ["Luna", "Echo"]:
|
||||
if char1 != char2:
|
||||
trust = await memory_sharing.get_trust_level(char1, char2)
|
||||
print(f" {char1} → {char2}: {trust:.1%} trust")
|
||||
|
||||
print("\n" + "=" * 60)
|
||||
print("🎯 DEMO COMPLETE!")
|
||||
print("=" * 60)
|
||||
print("\nFeatures demonstrated:")
|
||||
print("✅ Cross-character memory sharing with trust levels")
|
||||
print("✅ Collaborative creative project system")
|
||||
print("✅ Autonomous project suggestions")
|
||||
print("✅ Database persistence")
|
||||
print("✅ Vector store for character knowledge")
|
||||
|
||||
print("\nTo run full Discord integration:")
|
||||
print("1. Install Ollama: https://ollama.ai/")
|
||||
print("2. Update Discord tokens in .env")
|
||||
print("3. Run: cd src && python main.py")
|
||||
|
||||
return True
|
||||
|
||||
except Exception as e:
|
||||
print(f"❌ Demo failed: {e}")
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
return False
|
||||
|
||||
def main():
|
||||
"""Main function"""
|
||||
return asyncio.run(run_fishbowl_demo())
|
||||
|
||||
if __name__ == "__main__":
|
||||
success = main()
|
||||
sys.exit(0 if success else 1)
|
||||
Reference in New Issue
Block a user