From 3b8740f07897d192a047c81cf31aaab8b14ce550 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E4=BC=9F=E9=9F=AC?= Date: Tue, 15 Oct 2024 15:59:17 +0800 Subject: [PATCH] update prompt: report url when respond and summary --- metagpt/prompts/di/role_zero.py | 8 ++++---- metagpt/strategy/experience_retriever.py | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/metagpt/prompts/di/role_zero.py b/metagpt/prompts/di/role_zero.py index 8091f7899..af65b7e82 100644 --- a/metagpt/prompts/di/role_zero.py +++ b/metagpt/prompts/di/role_zero.py @@ -75,9 +75,9 @@ You may use any of the available commands to create a plan or update the plan. Y If you finish current task, you will automatically take the next task in the existing plan, use Plan.finish_current_task, DON'T append a new task. Review the latest plan's outcome, focusing on achievements. If your completed task matches the current, consider it finished. Using Editor.insert_content_at_line and Editor.edit_file_by_replace more than once in the current command list is forbidden. Because the command is mutually exclusive and will change the line number after execution. -In your response, include at least one command. +In your response, include at least one command. If you want to stop, use {{"command_name":"end"}} command. -# Your commands in a json array, in the following output format with correct command_name and args. If there is nothing to do, use the pass or end command: +# Your commands in a json array, in the following output format with correct command_name and args. Some text indicating your thoughts before JSON is required, such as what tasks have been completed, what tasks are next, how you should update the plan status, respond to inquiry, or seek for help. Then a json array of commands. You must output ONE and ONLY ONE json array. DON'T output multiple json arrays with thoughts between them. Output should adhere to the following format. ```json @@ -245,14 +245,14 @@ Reply : The herb names have been successfully extracted. A total of 8 herb names ------------ Carefully review the history and respond to the user in the expected language to meet their requirements. -If you have any deliverables that are helpful in explaining the results (such as files, metrics, quantitative results, etc.), provide brief descriptions of them. +If you have any deliverables that are helpful in explaining the results (such as deployment URL, files, metrics, quantitative results, etc.), provide brief descriptions of them. Your reply must be concise. You must respond in {respond_language} Directly output your reply content. Do not add any output format. """ SUMMARY_PROMPT = """ Summarize what you have accomplished lately. Be concise. -If you produce any deliverables, include their short descriptions and file paths. If there are any metrics or quantitative results, include them, too. +If you produce any deliverables, include their short descriptions and file paths. If there are any metrics, url or quantitative results, include them, too. If the deliverable is code, only output the file path. """ diff --git a/metagpt/strategy/experience_retriever.py b/metagpt/strategy/experience_retriever.py index de02c36c8..7c7957782 100644 --- a/metagpt/strategy/experience_retriever.py +++ b/metagpt/strategy/experience_retriever.py @@ -847,8 +847,8 @@ Explanation: This is a project that needs to be implemented using Vue.js. Theref User Requirement: Writing code. Here's the Plan -1. Rewrite the code index.html and the code in src folder. Specifically, this includes the index.html, src/main.jsx, src/index.css, and src/App.jsx. which is the main structure file, entry point of the project, the global style file, and the main component. All these files must be styled using Tailwind CSS. -2. Create new files when needed. In the current ecommerce website project, I need to create homepage.jsx, product.jsx, and cart.jsx. +1. Rewrite the code index.html and the code in src folder. Specifically, this includes the index.html, src/main.jsx, src/index.css, and src/App.jsx. which is the main structure file, entry point of the project, the global style file, and the main component. All these files must Use Tailwind CSS for styling +2. Create new files when needed. In the current ecommerce website project, I need to create homepage.jsx, product.jsx. 3. Install, build and deploy after the project is finished. If the project is a Vue or React Project, install the dependencies after finishing project. And then deploy the project to the public. ```json @@ -867,7 +867,7 @@ If the project is a Vue or React Project, install the dependencies after finishi "args": { "task_id": "2", "dependent_task_ids": ["1"], - "instruction": "Rewrite the src/App.jsx file, which is the main component. Be styled using Tailwind CSS.", + "instruction": "Rewrite the src/App.jsx file, which is the main component. Use Tailwind CSS for styling", "assignee": "Alex" } }, @@ -876,7 +876,7 @@ If the project is a Vue or React Project, install the dependencies after finishi "args": { "task_id": "3", "dependent_task_ids": ["2"], - "instruction": "Rewrite the src/style.css file with Tailwind CSS for the 2048 Game. Be styled using Tailwind CSS.", + "instruction": "Rewrite the src/style.css file with Tailwind CSS.", "assignee": "Alex" } }, @@ -894,7 +894,7 @@ If the project is a Vue or React Project, install the dependencies after finishi "args": { "task_id": "5", "dependent_task_ids": ["2","3","4"], - "instruction": "Create the src/homepage.jsx, which will include the homepage content. Be styled using Tailwind CSS.", + "instruction": "Create the src/homepage.jsx, which will include the homepage content. Use Tailwind CSS for styling", "assignee": "Alex" } }, @@ -903,7 +903,7 @@ If the project is a Vue or React Project, install the dependencies after finishi "args": { "task_id": "6", "dependent_task_ids": ["2","3","4","5"], - "instruction": "Create the src/product.js, which will include the product detail page. Be styled using Tailwind CSS.", + "instruction": "Create the src/product.js, which will include the product detail page. Use Tailwind CSS for styling", "assignee": "Alex" } },