agenticai / src /langgraph /node /basic_chatbot.py
rohit077's picture
adding all parameters to run the UI
b02e6a5
raw
history blame contribute delete
380 Bytes
from src.langgraph.state.state import State
class BasicChatbotNode:
"""
Basic chatbot logic implementation.
"""
def __init__(self,model):
self.llm = model
def process(self, state: State) -> dict:
"""
Processes the input state and generates a chatbot response.
"""
return {"messages":self.llm.invoke(state['messages'])}