From 6025506caec0b44d43c7f91f25ad90f392c5e544 Mon Sep 17 00:00:00 2001 From: Abhimanyu Yadav <122007096+Abhi1992002@users.noreply.github.com> Date: Fri, 20 Dec 2024 19:32:44 +0530 Subject: [PATCH] feat(store) : add new model and prompt in image generation (#9099) Update Marketplace Image generation Prompt and Model **Changes:** - Updated the image generation prompt for Marketplace to better highlight agent functionality: ``` Create a visually engaging app store thumbnail for the AI agent that highlights what it does in a clear and captivating way: - **Name**: {agent.name} - **Description**: {agent.description} Focus on showcasing its core functionality with an appealing design. ``` - Changed the model to `black-forest-labs/flux-1.1-pro` for improved results. --- autogpt_platform/backend/backend/server/v2/store/image_gen.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autogpt_platform/backend/backend/server/v2/store/image_gen.py b/autogpt_platform/backend/backend/server/v2/store/image_gen.py index 7150a42797f9..a1a22d159248 100644 --- a/autogpt_platform/backend/backend/server/v2/store/image_gen.py +++ b/autogpt_platform/backend/backend/server/v2/store/image_gen.py @@ -38,7 +38,7 @@ async def generate_agent_image(agent: Graph) -> io.BytesIO: raise ValueError("Missing Replicate API key in settings") # Construct prompt from agent details - prompt = f"App store image for AI agent that gives a cool visual representation of what the agent does: - {agent.name} - {agent.description}" + prompt = f"Create a visually engaging app store thumbnail for the AI agent that highlights what it does in a clear and captivating way:\n- **Name**: {agent.name}\n- **Description**: {agent.description}\nFocus on showcasing its core functionality with an appealing design." # Set up Replicate client client = replicate.Client(api_token=settings.secrets.replicate_api_key) @@ -59,7 +59,7 @@ async def generate_agent_image(agent: Graph) -> io.BytesIO: try: # Run model - output = client.run("black-forest-labs/flux-pro", input=input_data) + output = client.run("black-forest-labs/flux-1.1-pro", input=input_data) # Depending on the model output, extract the image URL or bytes # If the output is a list of FileOutput or URLs