mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-29 11:54:29 +01:00
* Use JSON for command signature Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com> * Improve plugin backward compatibility (#4716) * Fixed plugin test Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com> * Fix Docker-CI Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com> * Put back commands, clean typing and signatures Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com> --------- Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com> Co-authored-by: Erik Peterson <e@eriklp.com> Co-authored-by: Luke K (pr-0f3t) <2609441+lc0rp@users.noreply.github.com>
34 lines
924 B
Python
34 lines
924 B
Python
"""Task Statuses module."""
|
|
from __future__ import annotations
|
|
|
|
from typing import NoReturn
|
|
|
|
from autogpt.agent.agent import Agent
|
|
from autogpt.command_decorator import command
|
|
from autogpt.logs import logger
|
|
|
|
|
|
@command(
|
|
"goals_accomplished",
|
|
"Goals are accomplished and there is nothing left to do",
|
|
{
|
|
"reason": {
|
|
"type": "string",
|
|
"description": "A summary to the user of how the goals were accomplished",
|
|
"required": True,
|
|
}
|
|
},
|
|
)
|
|
def task_complete(reason: str, agent: Agent) -> NoReturn:
|
|
"""
|
|
A function that takes in a string and exits the program
|
|
|
|
Parameters:
|
|
reason (str): A summary to the user of how the goals were accomplished.
|
|
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()
|