aboutsummaryrefslogtreecommitdiff
path: root/autogpts/autogpt/autogpt/models/command_parameter.py
diff options
context:
space:
mode:
Diffstat (limited to 'autogpts/autogpt/autogpt/models/command_parameter.py')
-rw-r--r--autogpts/autogpt/autogpt/models/command_parameter.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/autogpts/autogpt/autogpt/models/command_parameter.py b/autogpts/autogpt/autogpt/models/command_parameter.py
new file mode 100644
index 000000000..402e870fc
--- /dev/null
+++ b/autogpts/autogpt/autogpt/models/command_parameter.py
@@ -0,0 +1,17 @@
+import dataclasses
+
+from autogpt.core.utils.json_schema import JSONSchema
+
+
+@dataclasses.dataclass
+class CommandParameter:
+ name: str
+ spec: JSONSchema
+
+ def __repr__(self):
+ return "CommandParameter('%s', '%s', '%s', %s)" % (
+ self.name,
+ self.spec.type,
+ self.spec.description,
+ self.spec.required,
+ )