File size: 547 Bytes
9c90775
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from src.graphs.builder import graph
from src.utils.asyncHandler import asyncHandler
import logging

class RunGraph:
    def __init__(self):
        pass

    @asyncHandler
    async def run(self, state: dict, config: dict = None) -> dict:
        logging.info("Starting RunGraph component execution...")
        if config is None:
            config = {"configurable": {"thread_id": "default_thread"}}
        result = await graph.ainvoke(state, config=config)
        logging.info("RunGraph component execution completed.")
        return result