Spaces:
Sleeping
Sleeping
File size: 585 Bytes
5551822 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | from src.MultiRag.graph.builder import graph
from utils.asyncHandler import asyncHandler
from src.MultiRag.models.rag_model import State
import logging
class RunComponent:
def __init__(self):
pass
@asyncHandler
async def run(self,state:State, thread_id:str):
logging.info("Entered in the run_component")
logging.info(f"Running graph with thread_id: {thread_id}")
config = {"configurable": {"thread_id": thread_id}}
res=await graph.ainvoke(state, config)
logging.info(f"Graph execution completed")
return res
|