Files
Auto-GPT/autogpt/commands/task_statuses.py
Nicholas Tindle d74428057e Move task_complete command out of prompt (#3663)
* 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>
2023-05-03 16:40:49 -07:00

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()