Spaces:
Sleeping
Sleeping
Download src/langgraphagenticai/node/basic_chatbot_node.py from genaitiwari/langgraphAgenticAI: direct link, hf CLI and curl.
- Browser
- Download file 391 Bytes
-
https://huggingface.co/spaces/genaitiwari/langgraphAgenticAI/resolve/main/src/langgraphagenticai/node/basic_chatbot_node.py
- Command line
-
hf download hf://spaces/genaitiwari/langgraphAgenticAI/src/langgraphagenticai/node/basic_chatbot_node.py
-
curl -L -o basic_chatbot_node.py https://huggingface.co/spaces/genaitiwari/langgraphAgenticAI/resolve/main/src/langgraphagenticai/node/basic_chatbot_node.py
391 Bytes
| from src.langgraphagenticai.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'])} | |