refactor(logging): introduce centralized logging and FastAPI lifespan
Some checks failed
Build and Push Docker / build-and-push (push) Failing after 2m38s
Some checks failed
Build and Push Docker / build-and-push (push) Failing after 2m38s
This commit is contained in:
@ -4,6 +4,7 @@ import threading
|
||||
from datetime import datetime
|
||||
import sys
|
||||
import os
|
||||
import logging
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
|
||||
from config import (
|
||||
@ -13,6 +14,8 @@ from config import (
|
||||
from api.doubao_tts import text_to_speech
|
||||
from memory_module.memory_integration import Mem0Integration
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class ChatService:
|
||||
def __init__(self, user_id: str = None):
|
||||
@ -25,7 +28,7 @@ class ChatService:
|
||||
if self._initialized:
|
||||
return
|
||||
|
||||
print(f"[INFO] Initializing Mem0 integration for user: {self.user_id}")
|
||||
logger.info(f"Initializing Mem0 integration for user: {self.user_id}")
|
||||
self._initialized = True
|
||||
|
||||
def chat(self, user_input: str, include_audio: bool = True) -> Dict[str, Any]:
|
||||
|
Reference in New Issue
Block a user