aboutsummaryrefslogtreecommitdiff
path: root/autogpts/autogpt/autogpt/models/action_history.py
diff options
context:
space:
mode:
authorGravatar Reinier van der Leer <pwuts@agpt.co> 2024-01-29 17:23:47 +0100
committerGravatar Reinier van der Leer <pwuts@agpt.co> 2024-01-29 17:23:47 +0100
commit7ffc374bb58376317f249c929e5846e57b0da543 (patch)
tree49c4f6ced963ce22da38a6e1c308def0ec8ef180 /autogpts/autogpt/autogpt/models/action_history.py
parentfix: Fix missing categories in data_types.py (diff)
parentfix(agent/json_utils): Make `extract_dict_from_response` more robust (diff)
downloadAuto-GPT-7ffc374bb58376317f249c929e5846e57b0da543.tar.gz
Auto-GPT-7ffc374bb58376317f249c929e5846e57b0da543.tar.bz2
Auto-GPT-7ffc374bb58376317f249c929e5846e57b0da543.zip
Merge branch 'master' into bringing-in-the-benchmarkbringing-in-the-benchmark
Diffstat (limited to 'autogpts/autogpt/autogpt/models/action_history.py')
-rw-r--r--autogpts/autogpt/autogpt/models/action_history.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/autogpts/autogpt/autogpt/models/action_history.py b/autogpts/autogpt/autogpt/models/action_history.py
index a5ed8f28f..b36d7e540 100644
--- a/autogpts/autogpt/autogpt/models/action_history.py
+++ b/autogpts/autogpt/autogpt/models/action_history.py
@@ -13,7 +13,10 @@ class Action(BaseModel):
reasoning: str
def format_call(self) -> str:
- return f"{self.name}({', '.join([f'{a}={repr(v)}' for a, v in self.args.items()])})"
+ return (
+ f"{self.name}"
+ f"({', '.join([f'{a}={repr(v)}' for a, v in self.args.items()])})"
+ )
class ActionSuccessResult(BaseModel):
@@ -69,7 +72,10 @@ class ActionInterruptedByHuman(BaseModel):
status: Literal["interrupted_by_human"] = "interrupted_by_human"
def __str__(self) -> str:
- return f'The user interrupted the action with the following feedback: "{self.feedback}"'
+ return (
+ 'The user interrupted the action with the following feedback: "%s"'
+ % self.feedback
+ )
ActionResult = ActionSuccessResult | ActionErrorResult | ActionInterruptedByHuman