ankitpatil3003/Basic-AI-Chatbot-using-Langgraph
1
1from src.langgraphagenticai.state.state import State2 3class BasicChatbotNode:4 """5 Basic chatbot logic implementation.6 """7 def __init__(self,model):8 self.llm = model9 10 def process(self, state: State) -> dict:11 """12 Processes the input state and generates a chatbot response.13 """14 return {"messages":self.llm.invoke(state['messages'])}