mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-29 03:44:28 +01:00
* feat: move task_complete command out of prompt * fix: formatting fixes * Add the shutdown command to the test agents * tests: update test vcrs --------- Co-authored-by: James Collins <collijk@uw.edu>
27 lines
646 B
Python
27 lines
646 B
Python
"""Task Statuses module."""
|
|
from __future__ import annotations
|
|
|
|
from typing import NoReturn
|
|
|
|
from autogpt.commands.command import command
|
|
from autogpt.logs import logger
|
|
|
|
|
|
@command(
|
|
"task_complete",
|
|
"Task Complete (Shutdown)",
|
|
'"reason": "<reason>"',
|
|
)
|
|
def task_complete(reason: str) -> NoReturn:
|
|
"""
|
|
A function that takes in a string and exits the program
|
|
|
|
Parameters:
|
|
reason (str): The reason for shutting down.
|
|
Returns:
|
|
A result string from create chat completion. A list of suggestions to
|
|
improve the code.
|
|
"""
|
|
logger.info(title="Shutting down...\n", message=reason)
|
|
quit()
|