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/873e08b45dfe20e862960aaaf68e6ccdb0fb8a63/app/utils/interrupt_utils.py
- Command line
-
hf download hf://spaces/Vinit006/EmailAgentwithMemory@873e08b45dfe20e862960aaaf68e6ccdb0fb8a63/app/utils/interrupt_utils.py
-
curl -L -o interrupt_utils.py https://huggingface.co/spaces/Vinit006/EmailAgentwithMemory/resolve/873e08b45dfe20e862960aaaf68e6ccdb0fb8a63/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", {}) | |
| } |