Hugging Face Integration. Remove OpenAI and Anthropic and DeepSeek. Add Hugging Face.

This commit is contained in:
ajaysi
2025-10-29 20:15:04 +05:30
parent 4431cd9848
commit 3219e6bbe4
15 changed files with 883 additions and 482 deletions

View File

@@ -14,7 +14,7 @@ from loguru import logger
class RateLimiter:
"""Manages rate limiting for ALwrity backend."""
def __init__(self, window_seconds: int = 60, max_requests: int = 200):
def __init__(self, window_seconds: int = 60, max_requests: int = 1000): # Increased for development
self.window_seconds = window_seconds
self.max_requests = max_requests
self.request_counts: Dict[str, List[float]] = defaultdict(list)
@@ -28,6 +28,12 @@ class RateLimiter:
"/ai-analytics",
"/gap-analysis",
"/calendar-events",
# Research endpoints - exempt from rate limiting
"/api/research",
"/api/blog-writer",
"/api/blog-writer/research",
"/api/blog-writer/research/",
"/api/blog/research/status",
"/calendar-generation/progress",
"/health",
"/health/database",