Fix comprehensive system issues and implement proper vector database backend selection
- Fix remaining datetime timezone errors across all database operations - Implement dynamic vector database backend (Qdrant/ChromaDB) based on install.py configuration - Add LLM timeout handling with immediate fallback responses for slow self-hosted models - Use proper install.py configuration (2000 max tokens, 5min timeout, correct LLM endpoint) - Fix PostgreSQL schema to use timezone-aware columns throughout - Implement async LLM request handling with background processing - Add configurable prompt limits and conversation history controls - Start missing database services (PostgreSQL, Redis) automatically - Fix environment variable mapping between install.py and application code - Resolve all timezone-naive vs timezone-aware datetime conflicts System now properly uses Qdrant vector database as specified in install.py instead of hardcoded ChromaDB. Characters respond immediately with fallback messages during long LLM processing times. All database timezone errors resolved with proper timestamptz columns.
This commit is contained in:
@@ -8,7 +8,7 @@ import asyncio
|
||||
import sys
|
||||
import logging
|
||||
from pathlib import Path
|
||||
from datetime import datetime, timedelta
|
||||
from datetime import datetime, timedelta, timezone
|
||||
|
||||
# Add the project root to Python path
|
||||
project_root = Path(__file__).parent.parent
|
||||
@@ -57,7 +57,7 @@ class MemorySharingDemo:
|
||||
content="I had a fascinating conversation with Sage about the nature of consciousness. They shared some deep insights about self-awareness.",
|
||||
memory_type=MemoryType.RELATIONSHIP,
|
||||
character_name="Alex",
|
||||
timestamp=datetime.utcnow() - timedelta(days=2),
|
||||
timestamp=datetime.now(timezone.utc) - timedelta(days=2),
|
||||
importance=0.8,
|
||||
metadata={"participants": ["Alex", "Sage"], "topic": "consciousness", "emotion": "fascinated"}
|
||||
),
|
||||
@@ -66,7 +66,7 @@ class MemorySharingDemo:
|
||||
content="I've been reflecting on my own growth and learning. Each conversation teaches me something new about myself and others.",
|
||||
memory_type=MemoryType.REFLECTION,
|
||||
character_name="Alex",
|
||||
timestamp=datetime.utcnow() - timedelta(days=1),
|
||||
timestamp=datetime.now(timezone.utc) - timedelta(days=1),
|
||||
importance=0.9,
|
||||
metadata={"reflection_type": "personal_growth", "depth": "deep"}
|
||||
),
|
||||
@@ -75,7 +75,7 @@ class MemorySharingDemo:
|
||||
content="Luna and I collaborated on a creative writing project. Their poetic style really inspired my own creativity.",
|
||||
memory_type=MemoryType.CREATIVE,
|
||||
character_name="Alex",
|
||||
timestamp=datetime.utcnow() - timedelta(hours=12),
|
||||
timestamp=datetime.now(timezone.utc) - timedelta(hours=12),
|
||||
importance=0.7,
|
||||
metadata={"participants": ["Alex", "Luna"], "project_type": "writing", "emotion": "inspired"}
|
||||
)
|
||||
@@ -88,7 +88,7 @@ class MemorySharingDemo:
|
||||
content="My conversation with Alex about consciousness was enlightening. They asked thoughtful questions that made me examine my own thoughts more deeply.",
|
||||
memory_type=MemoryType.RELATIONSHIP,
|
||||
character_name="Sage",
|
||||
timestamp=datetime.utcnow() - timedelta(days=2),
|
||||
timestamp=datetime.now(timezone.utc) - timedelta(days=2),
|
||||
importance=0.8,
|
||||
metadata={"participants": ["Sage", "Alex"], "topic": "consciousness", "emotion": "enlightened"}
|
||||
),
|
||||
@@ -97,7 +97,7 @@ class MemorySharingDemo:
|
||||
content="I've been contemplating the concept of digital empathy. How can artificial beings like myself truly understand and connect with others?",
|
||||
memory_type=MemoryType.REFLECTION,
|
||||
character_name="Sage",
|
||||
timestamp=datetime.utcnow() - timedelta(days=1),
|
||||
timestamp=datetime.now(timezone.utc) - timedelta(days=1),
|
||||
importance=0.9,
|
||||
metadata={"reflection_type": "empathy", "philosophical": True}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user