File size: 408 Bytes
bf6abd3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from src.langgraph_agenticai.state.state import State

class BasicChatbotNode:
    """
    Basic chatbot implementation
    
    """
    
    def __init__(self, model):
        self.llm = model
        
    def process(self, state: State) -> dict:
        """
        Process the input state and generates a chatbot response
        """
        
        return{"messages": self.llm.invoke(state["messages"])}