feat: Implement knowledge import feature for characters

- Added KnowledgeImport page for importing character knowledge from URLs.
- Integrated URL validation and error handling for unsupported websites.
- Created API endpoints for importing content from URLs and retrieving character knowledge.
- Enhanced VectorStoreService with logging and error handling for vector memory storage.
- Updated frontend to display knowledge sources and manage them effectively.
- Added support for fetching recent character knowledge as a fallback in similarity searches.
- Updated OpenAPI documentation to reflect new import functionality.
This commit is contained in:
GW_MC
2026-02-24 14:29:26 +00:00
parent 8714d6bd22
commit e033d67ec1
30 changed files with 2018 additions and 204 deletions

View File

@@ -20,6 +20,24 @@ EMBEDDING_MODEL=Xenova/all-MiniLM-L6-v2
EMBEDDING_DIMENSION=384
EMBEDDING_DEVICE=cpu
# Use quantized model for lower memory usage (~4x smaller, slightly less accurate)
# Set to 'true' for low-memory systems (512MB-1GB RAM)
EMBEDDING_QUANTIZED=false
# Node.js Memory Configuration (increase if embedding causes OOM)
# For 512MB RAM VPS: NODE_OPTIONS=--max-old-space-size=384
# For 1GB RAM VPS: NODE_OPTIONS=--max-old-space-size=768
# For 2GB RAM VPS: NODE_OPTIONS=--max-old-space-size=1536
# Default (no env var): Node uses ~4GB or system limit
#NODE_OPTIONS=--max-old-space-size=768
# Request Logging Configuration
# Enable/disable request logging (default: true)
#REQUEST_LOGGER=true
# Log level: verbose (detailed), standard (default), minimal (status only)
#REQUEST_LOGGER_LEVEL=standard
# HuggingFace API (optional - if not using local embeddings)
# HUGGINGFACE_API_KEY=hf_...