statefulChatbot / src /nodes /basic_chatbot_nodes.py
shubhamchau222
chabot graph build & tested
58617a7
raw
history blame contribute delete
400 Bytes
import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..'))
from src.state.state import graphstate
from langgraph.graph import START, END, StateGraph
class BasicChatbotNodes:
def __init__(self, model):
self.llm = model
def process(self, state: graphstate):
return {"messages":
self.llm.invoke(state["messages"])}