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(platform): allowing condition block to compare 2 strings (#8771)

Abhimanyu Yadav951948d239a9
diff --git a/autogpt_platform/backend/backend/blocks/branching.py b/autogpt_platform/backend/backend/blocks/branching.py
index 65a01c9772..daf967bc6a 100644
--- a/autogpt_platform/backend/backend/blocks/branching.py
+++ b/autogpt_platform/backend/backend/blocks/branching.py
@@ -75,11 +75,17 @@ class ConditionBlock(Block):
value1 = input_data.value1
if isinstance(value1, str):
- value1 = float(value1.strip())
+ try:
+ value1 = float(value1.strip())
+ except ValueError:
+ value1 = value1.strip()
value2 = input_data.value2
if isinstance(value2, str):
- value2 = float(value2.strip())
+ try:
+ value2 = float(value2.strip())
+ except ValueError:
+ value2 = value2.strip()
yes_value = input_data.yes_value if input_data.yes_value is not None else value1
no_value = input_data.no_value if input_data.no_value is not None else value2
diff --git a/docs/content/platform/advanced_setup.md b/docs/content/platform/advanced_setup.md
index 9bb413b70a..cfe8f9ae9b 100644
--- a/docs/content/platform/advanced_setup.md
+++ b/docs/content/platform/advanced_setup.md
@@ -55,7 +55,7 @@ This will generate the Prisma client for PostgreSQL. You will also need to run t
```bash
cd autogpt_platform/
-docker compose up -d
+docker compose up -d --build
```
You can then run the migrations from the `backend` directory.
diff --git a/docs/content/platform/getting-started.md b/docs/content/platform/getting-started.md
index f4e82392be..b57ff7de8f 100644
--- a/docs/content/platform/getting-started.md
+++ b/docs/content/platform/getting-started.md
@@ -90,7 +90,7 @@ To run the backend services, follow these steps:
* Run the backend services:
```
- docker compose up -d
+ docker compose up -d --build
```
This command will start all the necessary backend services defined in the `docker-compose.combined.yml` file in detached mode.