Spaces:
Build error
Build error
Download src/langgraph_agenticai/nodes/basic_chatbot_node.py from msaifee/Agentic-AI: direct link, hf CLI and curl.
- Browser
- Download file 408 Bytes
-
https://huggingface.co/spaces/msaifee/Agentic-AI/resolve/main/src/langgraph_agenticai/nodes/basic_chatbot_node.py
- Command line
-
hf download hf://spaces/msaifee/Agentic-AI/src/langgraph_agenticai/nodes/basic_chatbot_node.py
-
curl -L -o basic_chatbot_node.py https://huggingface.co/spaces/msaifee/Agentic-AI/resolve/main/src/langgraph_agenticai/nodes/basic_chatbot_node.py
408 Bytes
| from src.langgraph_agenticai.state.state import State | |
| class BasicChatbotNode: | |
| """ | |
| Basic chatbot implementation | |
| """ | |
| def __init__(self, model): | |
| self.llm = model | |
| def process(self, state: State) -> dict: | |
| """ | |
| Process the input state and generates a chatbot response | |
| """ | |
| return{"messages": self.llm.invoke(state["messages"])} |