forked from Significant-Gravitas/AutoGPT
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move task_complete command out of prompt (Significant-Gravitas#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 <[email protected]>
- Loading branch information
Showing
9 changed files
with
1,415 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
"""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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
721 changes: 712 additions & 9 deletions
721
...egration/challenges/memory/cassettes/test_memory_challenge_a/test_memory_challenge_a.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
423 changes: 423 additions & 0 deletions
423
tests/integration/goal_oriented/cassettes/test_browse_website/test_browse_website.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters