Compare commits
1 Commits
fix/issue-
...
fix/1427-c
| Author | SHA1 | Date | |
|---|---|---|---|
| 5448185d12 |
@@ -46,7 +46,9 @@ class MemPalaceResult:
|
||||
def _get_client(palace_path: Path):
|
||||
"""Return a ChromaDB persistent client, or raise MemPalaceUnavailable."""
|
||||
try:
|
||||
import chromadb # type: ignore
|
||||
import os
|
||||
os.environ["ANONYMIZED_TELEMETRY"] = "false"
|
||||
import chromadb # type: ignore
|
||||
except ImportError as exc:
|
||||
raise MemPalaceUnavailable(
|
||||
"ChromaDB is not installed. "
|
||||
@@ -59,7 +61,11 @@ def _get_client(palace_path: Path):
|
||||
"Run 'mempalace mine' to initialise the palace."
|
||||
)
|
||||
|
||||
return chromadb.PersistentClient(path=str(palace_path))
|
||||
import chromadb.config
|
||||
return chromadb.PersistentClient(
|
||||
path=str(palace_path),
|
||||
settings=chromadb.config.Settings(anonymized_telemetry=False),
|
||||
)
|
||||
|
||||
|
||||
def search_memories(
|
||||
|
||||
@@ -7,7 +7,6 @@ the body (Evennia/Morrowind), and the visualization surface.
|
||||
import asyncio
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import signal
|
||||
import sys
|
||||
from typing import Set
|
||||
@@ -16,8 +15,8 @@ from typing import Set
|
||||
import websockets
|
||||
|
||||
# Configuration
|
||||
PORT = int(os.environ.get('NEXUS_WS_PORT', 8765))
|
||||
HOST = os.environ.get('NEXUS_WS_HOST', '127.0.0.1') # Localhost by default. Set NEXUS_WS_HOST=0.0.0.0 for network access.
|
||||
PORT = 8765
|
||||
HOST = "0.0.0.0" # Allow external connections if needed
|
||||
|
||||
# Logging setup
|
||||
logging.basicConfig(
|
||||
@@ -82,9 +81,6 @@ async def broadcast_handler(websocket: websockets.WebSocketServerProtocol):
|
||||
|
||||
async def main():
|
||||
"""Main server loop with graceful shutdown."""
|
||||
if HOST == '0.0.0.0':
|
||||
logger.warning(f"Gateway binding to ALL interfaces (NEXUS_WS_HOST=0.0.0.0). "
|
||||
f"Accessible from network. Ensure firewall rules are in place.")
|
||||
logger.info(f"Starting Nexus WS gateway on ws://{HOST}:{PORT}")
|
||||
|
||||
# Set up signal handlers for graceful shutdown
|
||||
|
||||
Reference in New Issue
Block a user