Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Condition Block tries to convert everything to a float #8721

Open
ntindle opened this issue Nov 19, 2024 — with Linear · 0 comments
Open

Condition Block tries to convert everything to a float #8721

ntindle opened this issue Nov 19, 2024 — with Linear · 0 comments
Labels
bug Something isn't working

Comments

Copy link
Member

ntindle commented Nov 19, 2024

You can replicate this by applying this diff for a new test (that you should add)

diff --git a/autogpt_platform/backend/backend/blocks/branching.py b/autogpt_platform/backend/backend/blocks/branching.py
index 65a01c977..1d3fbe18e 100644
--- a/autogpt_platform/backend/backend/blocks/branching.py
+++ b/autogpt_platform/backend/backend/blocks/branching.py
@@ -57,16 +57,27 @@ class ConditionBlock(Block):
             output_schema=ConditionBlock.Output,
             description="Handles conditional logic based on comparison operators",
             categories={BlockCategory.LOGIC},
-            test_input={
-                "value1": 10,
-                "operator": ComparisonOperator.GREATER_THAN.value,
-                "value2": 5,
-                "yes_value": "Greater",
-                "no_value": "Not greater",
-            },
+            test_input=[
+                {
+                    "value1": 10,
+                    "operator": ComparisonOperator.GREATER_THAN.value,
+                    "value2": 5,
+                    "yes_value": "Greater",
+                    "no_value": "Not greater",
+                },
+                {
+                    "value1": "hello",
+                    "operator": ComparisonOperator.EQUAL.value,
+                    "value2": "hello",
+                    "yes_value": "Equal",
+                    "no_value": "Not equal",
+                },
+            ],
             test_output=[
                 ("result", True),
                 ("yes_output", "Greater"),
+                ("result", True),
+                ("yes_output", "Equal"),
             ],
         )
@ntindle ntindle added the bug Something isn't working label Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant