Nikhil Pravin Pise
feat: production upgrade β€” agentic RAG, OpenSearch, Redis, Langfuse, Docker, Gradio, Telegram
1e732dd
raw
history blame
734 Bytes
"""
MediGuard AI β€” Agentic RAG Context
Runtime dependency injection dataclass β€” passed to every LangGraph node
so nodes can access services without globals.
"""
from __future__ import annotations
from dataclasses import dataclass
from typing import Any, Optional
@dataclass(frozen=True)
class AgenticContext:
"""Immutable runtime context for agentic RAG nodes."""
llm: Any # LangChain chat model
embedding_service: Any # EmbeddingService
opensearch_client: Any # OpenSearchClient
cache: Any # RedisCache
tracer: Any # LangfuseTracer
guild: Optional[Any] = None # ClinicalInsightGuild (original workflow)