Add echo client to app

This commit is contained in:
2026-02-20 05:42:50 +00:00
parent e03747f526
commit f848bbf0f2
9 changed files with 286 additions and 5 deletions

View File

@@ -2,7 +2,11 @@
from functools import lru_cache
from rag_client import HTTPRAGService, RAGServiceBase
from capa_de_integracion.services.rag import (
EchoRAGService,
HTTPRAGService,
RAGServiceBase,
)
from .config import Settings, settings
from .services import (
@@ -53,6 +57,8 @@ def get_notification_manager() -> NotificationManagerService:
@lru_cache(maxsize=1)
def get_rag_service() -> RAGServiceBase:
"""Get RAG service instance."""
if settings.rag_echo_enabled:
return EchoRAGService()
return HTTPRAGService(
endpoint_url=settings.rag_endpoint_url,
max_connections=100,