CoolFace
Apppublic

ankitpatil3003/Basic-AI-Chatbot-using-Langgraph

sourceHugging Faceapache-2.0updated 2y agoView on Hugging Face
1likes
basic_chatbot_node.py14 linesDownload Raw Back to nodes
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'])}