Add echo client to app
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user