Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

fix: Fix serialization error caused by ignored field in ErrorInfo object

Reinier van der Leer653fc5851de3
diff --git a/autogpts/autogpt/autogpt/models/action_history.py b/autogpts/autogpt/autogpt/models/action_history.py
index 01ab47171b..a5ed8f28ff 100644
--- a/autogpts/autogpt/autogpt/models/action_history.py
+++ b/autogpts/autogpt/autogpt/models/action_history.py
@@ -30,7 +30,7 @@ class ErrorInfo(BaseModel):
args: tuple
message: str
exception_type: str
- _repr: str
+ repr: str
@staticmethod
def from_exception(exception: Exception) -> ErrorInfo:
@@ -38,14 +38,14 @@ class ErrorInfo(BaseModel):
args=exception.args,
message=getattr(exception, "message", exception.args[0]),
exception_type=exception.__class__.__name__,
- _repr=repr(exception),
+ repr=repr(exception),
)
def __str__(self):
return repr(self)
def __repr__(self):
- return self._repr
+ return self.repr
class ActionErrorResult(BaseModel):