更新autogptadd

This commit is contained in:
w_xiaolizu
2023-05-30 15:48:14 +08:00
parent cfa885a04e
commit 548532e522
78 changed files with 7706 additions and 0 deletions

View File

@ -0,0 +1,29 @@
"""Task Statuses module."""
from __future__ import annotations
from typing import TYPE_CHECKING, NoReturn
from autogpt.commands.command import command
from autogpt.logs import logger
if TYPE_CHECKING:
from autogpt.config import Config
@command(
"task_complete",
"Task Complete (Shutdown)",
'"reason": "<reason>"',
)
def task_complete(reason: str, config: Config) -> 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()