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.

feat: deep copy the schema (#9794)

Nicholas Tindle62361ccc4832
diff --git a/autogpt_platform/backend/backend/blocks/io.py b/autogpt_platform/backend/backend/blocks/io.py
index ee742d1c89..f9f9b85fb0 100644
--- a/autogpt_platform/backend/backend/blocks/io.py
+++ b/autogpt_platform/backend/backend/blocks/io.py
@@ -1,3 +1,4 @@
+import copy
from datetime import date, time
from typing import Any, Optional
@@ -54,7 +55,7 @@ class AgentInputBlock(Block):
)
def generate_schema(self):
- schema = self.get_field_schema("value")
+ schema = copy.deepcopy(self.get_field_schema("value"))
if possible_values := self.placeholder_values:
schema["enum"] = possible_values
return schema