diff --git a/autogpt_platform/backend/backend/blocks/llm.py b/autogpt_platform/backend/backend/blocks/llm.py index 0051aa34e0..eb96122c4d 100644 --- a/autogpt_platform/backend/backend/blocks/llm.py +++ b/autogpt_platform/backend/backend/blocks/llm.py @@ -1375,13 +1375,15 @@ class AIStructuredResponseGeneratorBlock(AIBlockBase): else "Please provide a" ) + f" valid JSON {outer_output_type} that matches the expected format." - return trim_prompt(f""" + return trim_prompt( + f""" |{complaint} | |{indented_parse_error} | |{instruction} - """) + """ + ) def get_json_from_response( self, response_text: str, *, pure_json_mode: bool, output_tag_start: str @@ -2018,7 +2020,8 @@ class AIListGeneratorBlock(AIBlockBase): for item in parsed_list: yield "list_item", item - SYSTEM_PROMPT = trim_prompt(""" + SYSTEM_PROMPT = trim_prompt( + """ |You are a JSON array generator. Your task is to generate a JSON array of string values based on the user's prompt. | |The 'list' field should contain a JSON array with the generated string values. @@ -2028,4 +2031,5 @@ class AIListGeneratorBlock(AIBlockBase): |• ["string1", "string2", "string3"] | |Ensure you provide a proper JSON array with only string values in the 'list' field. - """) + """ + )