Spaces:
Paused
Paused
Download agent_zero_framework/python/api/nudge.py from Oldmangrizzz/Agent-Node: direct link, hf CLI and curl.
- Browser
- Download file 540 Bytes
-
https://huggingface.co/spaces/Oldmangrizzz/Agent-Node/resolve/main/agent_zero_framework/python/api/nudge.py
- Command line
-
hf download hf://spaces/Oldmangrizzz/Agent-Node/agent_zero_framework/python/api/nudge.py
-
curl -L -o nudge.py https://huggingface.co/spaces/Oldmangrizzz/Agent-Node/resolve/main/agent_zero_framework/python/api/nudge.py
540 Bytes
| from python.helpers.api import ApiHandler, Request, Response | |
| class Nudge(ApiHandler): | |
| async def process(self, input: dict, request: Request) -> dict | Response: | |
| ctxid = input.get("ctxid", "") | |
| if not ctxid: | |
| raise Exception("No context id provided") | |
| context = self.use_context(ctxid) | |
| context.nudge() | |
| msg = "Process reset, agent nudged." | |
| context.log.log(type="info", content=msg) | |
| return { | |
| "message": msg, | |
| "ctxid": context.id, | |
| } |