Spaces:
Sleeping
Sleeping
Download src/langgraphagenticai/nodes/basic_chatbot_node.py from sahandkh1419/LangGraph_ChatBot: direct link, hf CLI and curl.
- Browser
- Download file 399 Bytes
-
https://huggingface.co/spaces/sahandkh1419/LangGraph_ChatBot/resolve/main/src/langgraphagenticai/nodes/basic_chatbot_node.py
- Command line
-
hf download hf://spaces/sahandkh1419/LangGraph_ChatBot/src/langgraphagenticai/nodes/basic_chatbot_node.py
-
curl -L -o basic_chatbot_node.py https://huggingface.co/spaces/sahandkh1419/LangGraph_ChatBot/resolve/main/src/langgraphagenticai/nodes/basic_chatbot_node.py
399 Bytes
| from src.langgraphagenticai.state.state import State | |
| class BasicChatbotNode: | |
| """ | |
| Basic Chatbot login 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'])} | |