feat: implement TTS, Document processing, and Memory Service /facts API

- TTS: xtts-v2 integration with voice cloning support
- Document: docling integration for PDF/DOCX/PPTX processing
- Memory Service: added /facts/upsert, /facts/{key}, /facts endpoints
- Added required dependencies (TTS, docling)
This commit is contained in:
Apple
2026-01-17 08:16:37 -08:00
parent a9fcadc6e2
commit 5290287058
121 changed files with 17071 additions and 436 deletions

View File

@@ -6,7 +6,7 @@ import os
import jwt
import time
from typing import Optional, Union
from fastapi import HTTPException, Security
from fastapi import HTTPException, Security, Depends
from fastapi.security import HTTPBearer, HTTPAuthorizationCredentials
from app.config import get_settings
@@ -18,6 +18,7 @@ JWT_ALGORITHM = settings.jwt_algorithm
JWT_EXPIRATION = settings.jwt_expiration
security = HTTPBearer()
security_optional = HTTPBearer(auto_error=False)
def generate_jwt_token(service_name: str, permissions: list = None) -> str:
@@ -43,7 +44,7 @@ def verify_jwt_token(token: str) -> dict:
async def get_current_service_optional(
credentials: Optional[HTTPAuthorizationCredentials] = Security(security, auto_error=False)
credentials: Optional[HTTPAuthorizationCredentials] = Depends(security_optional)
) -> Optional[dict]:
"""Dependency для отримання поточного сервісу з JWT (опціонально)"""
if not credentials: