AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

feat(blocks): Add AI List Generator block

Open Torantulino opened this issue 4 months ago • 2 comments

Background

I've found in my agent creation that I often need LLMs to generate lists. This block simplifies the process for users, allowing them to generate Python list objects without having to repeatedly figure out prompting and parsing. The new AIListGeneratorBlock allows users to efficiently generate lists based on a focus or provided source data.

Example Agent for testing

AI List Generator Test_v11.json 📁

image

Changes 🏗️

  • Added a new block AIListGeneratorBlock that generates Python lists using an LLM.
  • Input fields include focus, source_data, LLM model, and retry attempts.
  • Integrated a method to call an LLM and convert the response string into a valid Python list.
  • Implemented error handling and retry logic for up to 5 attempts.
  • Updated the LLM block to include the ability to generate lists without users needing to manually prompt and parse responses.

Testing 🔍

[!NOTE] Only for the new autogpt platform, currently in autogpt_platform/

  • Created an agent using the new AIListGeneratorBlock and confirmed it executes correctly.
  • Imported an agent from file upload, ensuring that the block produces valid Python lists.
  • Uploaded and imported the agent to/from the marketplace and verified execution.
  • Edited the agent via monitor, confirming correct behavior of the block with both valid and invalid inputs.

Torantulino avatar Sep 29 '24 17:09 Torantulino