diff --git a/euclid/helpers/agents/CodeMonkey.py b/euclid/helpers/agents/CodeMonkey.py index 0ee2d5a..f205db4 100644 --- a/euclid/helpers/agents/CodeMonkey.py +++ b/euclid/helpers/agents/CodeMonkey.py @@ -23,7 +23,7 @@ class CodeMonkey(Agent): changes = convo.send_message('development/implement_changes.prompt', { "instructions": code_changes_description, - "directory_tree": self.project.get_directory_tree(), + "directory_tree": self.project.get_directory_tree(True), "files": self.project.get_files(files_needed), }, IMPLEMENT_CHANGES, True) diff --git a/euclid/prompts/development/task/breakdown.prompt b/euclid/prompts/development/task/breakdown.prompt index f681774..bba56ae 100644 --- a/euclid/prompts/development/task/breakdown.prompt +++ b/euclid/prompts/development/task/breakdown.prompt @@ -67,6 +67,11 @@ You can get the list of files by calling `get_files` function. {% else %} #} +Here are all the file that are written so far in a file tree format: +``` +{{ directory_tree }} +``` + First, just make a list of steps we need to do to fulfill this task. It should be in a JSON array. Every step must NOT contain both a command that needs to be run and the code that needs to be changed. It can be either command (or multiple commands) that need to be run or a change in the code. {# Each step must start with a keyword `command` in case the step consists of commands that need to be run or `code_change` in case it consists of changes in the code. After the keyword, write a description of what will be done in that step. Do not write what needs to be done for each step but only list them in an array. diff --git a/euclid/prompts/development/task/step_check.prompt b/euclid/prompts/development/task/step_check.prompt index 7164448..2c064bb 100644 --- a/euclid/prompts/development/task/step_check.prompt +++ b/euclid/prompts/development/task/step_check.prompt @@ -3,6 +3,6 @@ Now, we need to verify if this change was successfully implemented. We can do th 2. By running a command (or multiple commands) - this is good for when an automated test is an overkill. For example, if we installed a new package or changed some configuration. Keep in mind that in this case, there shouldn't be any human intervention needed - I will run the commands you will give me and show you the CLI output and from that, you should be able to determine if the test passed or failed. -3. By requesting that a human checks if everything works as expected - this is the last option that we want to avoid but if we can't test the functionality programmatically, we should ask a human to check if it works as expected. For example, if something was visually changed in the UI. +3. By requesting that a human checks if everything works as expected - this is the last option that we want to avoid but if we can't test the functionality programmatically, we should ask a human to check if it works as expected. For example, if something was visually changed in the UI. If you have any option to test the code change with an automated test or a command, you always do it. Manual test is the last resort that should be avoided if possible. Ok, now, tell me how can we verify if this change was successful and respond only with a keyword for a type of test. \ No newline at end of file diff --git a/euclid/utils/llm_connection.py b/euclid/utils/llm_connection.py index 9899c91..d229ba7 100644 --- a/euclid/utils/llm_connection.py +++ b/euclid/utils/llm_connection.py @@ -106,8 +106,7 @@ def create_gpt_chat_completion(messages: List[dict], req_type, min_tokens=MIN_TO return response except Exception as e: print( - 'The request to OpenAI API failed. Might be due to GPT being down or due to the too large message. It\'s ' - 'best if you try again.') + 'The request to OpenAI API failed. Here is the error message:') print(e)