diff --git a/autogpt_platform/README.md b/autogpt_platform/README.md index 64e61e880c..3fbb6519b1 100644 --- a/autogpt_platform/README.md +++ b/autogpt_platform/README.md @@ -22,7 +22,7 @@ To run the AutoGPT Platform, follow these steps: 2. Run the following command: ``` - git submodule update --init --recursive + git submodule update --init --recursive --progress ``` This command will initialize and update the submodules in the repository. The `supabase` folder will be cloned to the root directory. diff --git a/autogpt_platform/backend/backend/blocks/text.py b/autogpt_platform/backend/backend/blocks/text.py index b2ad5e77e1..21351bbbd6 100644 --- a/autogpt_platform/backend/backend/blocks/text.py +++ b/autogpt_platform/backend/backend/blocks/text.py @@ -76,6 +76,8 @@ class ExtractTextInformationBlock(Block): class Output(BlockSchema): positive: str = SchemaField(description="Extracted text") negative: str = SchemaField(description="Original text") + matched_results: list[str] = SchemaField(description="List of matched results") + matched_count: int = SchemaField(description="Number of matched results") def __init__(self): super().__init__( @@ -103,13 +105,31 @@ class ExtractTextInformationBlock(Block): }, ], test_output=[ + # Test case 1 ("positive", "World!"), + ("matched_results", ["World!"]), + ("matched_count", 1), + # Test case 2 ("positive", "Hello, World!"), + ("matched_results", ["Hello, World!"]), + ("matched_count", 1), + # Test case 3 ("negative", "Hello, World!"), + ("matched_results", []), + ("matched_count", 0), + # Test case 4 ("positive", "Hello,"), + ("matched_results", ["Hello,"]), + ("matched_count", 1), + # Test case 5 ("positive", "World!!"), + ("matched_results", ["World!!"]), + ("matched_count", 1), + # Test case 6 ("positive", "World!!"), ("positive", "Earth!!"), + ("matched_results", ["World!!", "Earth!!"]), + ("matched_count", 2), ], ) @@ -130,13 +150,16 @@ class ExtractTextInformationBlock(Block): for match in re.finditer(input_data.pattern, txt, flags) if input_data.group <= len(match.groups()) ] + if not input_data.find_all: + matches = matches[:1] for match in matches: yield "positive", match - if not input_data.find_all: - return if not matches: yield "negative", input_data.text + yield "matched_results", matches + yield "matched_count", len(matches) + class FillTextTemplateBlock(Block): class Input(BlockSchema): diff --git a/autogpt_platform/frontend/src/components/agptui/composite/PublishAgentPopout.tsx b/autogpt_platform/frontend/src/components/agptui/composite/PublishAgentPopout.tsx index 8842f6dbbb..7022cdd754 100644 --- a/autogpt_platform/frontend/src/components/agptui/composite/PublishAgentPopout.tsx +++ b/autogpt_platform/frontend/src/components/agptui/composite/PublishAgentPopout.tsx @@ -263,7 +263,7 @@ export const PublishAgentPopout: React.FC = ({ onClose={handleClose} onDone={handleClose} onViewProgress={() => { - router.push("/marketplace/dashboard"); + router.push("/profile/dashboard"); handleClose(); }} /> diff --git a/docs/content/platform/getting-started.md b/docs/content/platform/getting-started.md index 3613d014f5..7ec256c9d4 100644 --- a/docs/content/platform/getting-started.md +++ b/docs/content/platform/getting-started.md @@ -77,7 +77,7 @@ To run the backend services, follow these steps: * Within the repository, clone the submodules and navigate to the `autogpt_platform` directory: ```bash - git submodule update --init --recursive + git submodule update --init --recursive --progress cd autogpt_platform ``` This command will initialize and update the submodules in the repository. The `supabase` folder will be cloned to the root directory.