Spaces:
Build error
Build error
Download tests/integration/agent_utils.py from LolorzoloL/AutoGPTWeb: direct link, hf CLI and curl.
- Browser
- Download file 457 Bytes
-
https://huggingface.co/spaces/LolorzoloL/AutoGPTWeb/resolve/main/tests/integration/agent_utils.py
- Command line
-
hf download hf://spaces/LolorzoloL/AutoGPTWeb/tests/integration/agent_utils.py
-
curl -L -o agent_utils.py https://huggingface.co/spaces/LolorzoloL/AutoGPTWeb/resolve/main/tests/integration/agent_utils.py
457 Bytes
| import concurrent.futures | |
| from autogpt.agent.agent import Agent | |
| def run_interaction_loop(agent: Agent, timeout: float | None): | |
| with concurrent.futures.ThreadPoolExecutor() as executor: | |
| future = executor.submit(agent.start_interaction_loop) | |
| try: | |
| result = future.result(timeout=timeout) | |
| except concurrent.futures.TimeoutError: | |
| assert False, f"The process took longer than {timeout} seconds to complete." | |