Spaces:
Build error
Build error
Download src/langgraphagenticai/nodes/basic_chatbot_node.py from Techiiot/sandeep_basic_chatbot: direct link, hf CLI and curl.
- Browser
- Download file 389 Bytes
-
https://huggingface.co/spaces/Techiiot/sandeep_basic_chatbot/resolve/main/src/langgraphagenticai/nodes/basic_chatbot_node.py
- Command line
-
hf download hf://spaces/Techiiot/sandeep_basic_chatbot/src/langgraphagenticai/nodes/basic_chatbot_node.py
-
curl -L -o basic_chatbot_node.py https://huggingface.co/spaces/Techiiot/sandeep_basic_chatbot/resolve/main/src/langgraphagenticai/nodes/basic_chatbot_node.py
389 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'])} |