Spaces:
Runtime error
Runtime error
Download app/utils/interrupt_utils.py from Vinit006/EmailAgentwithMemory: direct link, hf CLI and curl.
- Browser
- Download file 388 Bytes
-
https://huggingface.co/spaces/Vinit006/EmailAgentwithMemory/resolve/b83afc7bf460c775cd41d423d93aa7fdb326a5ce/app/utils/interrupt_utils.py
- Command line
-
hf download hf://spaces/Vinit006/EmailAgentwithMemory@b83afc7bf460c775cd41d423d93aa7fdb326a5ce/app/utils/interrupt_utils.py
-
curl -L -o interrupt_utils.py https://huggingface.co/spaces/Vinit006/EmailAgentwithMemory/resolve/b83afc7bf460c775cd41d423d93aa7fdb326a5ce/app/utils/interrupt_utils.py
388 Bytes
| def parse_interrupt(final_state: dict): | |
| if "__interrupt__" not in final_state: | |
| return None | |
| interrupt_state = final_state["__interrupt__"] | |
| if not interrupt_state: | |
| return None | |
| interrupt = interrupt_state[0] | |
| value = getattr(interrupt, "value", {}) or {} | |
| return { | |
| "action": value.get("action"), | |
| "data": value.get("data", {}) | |
| } |