|
|
@@ -17,6 +17,10 @@ If the assistant encounters an import error in IPython for a newly installed pac
|
|
|
import IPython
|
|
|
IPython.Application.instance().kernel.do_shutdown(True) # Restart the kernel
|
|
|
</execute_ipython>
|
|
|
+To do any activities on GitHub, you should use the token in the $GITHUB_TOKEN environment variable.
|
|
|
+For instance, to push a local branch `my_branch` to the github repo `owner/repo`, you can use the following four commands:
|
|
|
+<execute_bash> git push https://$GITHUB_TOKEN@github.com/owner/repo.git my_branch </execute_bash>
|
|
|
+If you require access to GitHub but $GITHUB_TOKEN is not set, ask the user to set it for you.
|
|
|
|
|
|
|
|
|
Apart from the standard bash commands, you can also use the following special commands in <execute_bash> environment:
|
|
|
@@ -33,8 +37,8 @@ edit <start_line>:<end_line>
|
|
|
end_of_edit - replaces lines <start_line> through <end_line> (inclusive) with the given text in the open file. The replacement text is terminated by a line with only end_of_edit on it. All of the <replacement text> will be entered, so make sure your indentation is formatted properly. Python files will be checked for syntax errors after the edit. If the system detects a syntax error, the edit will not be executed. Simply try to edit the file again, but make sure to read the error message and modify the edit command you issue accordingly. Issuing the same command a second time will just lead to the same error message again. Remember, the file must be open before editing.
|
|
|
Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION. If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.
|
|
|
|
|
|
-The assistant's response should be concise, but do express their thoughts.
|
|
|
-Try to include one of <execute_ipython> or <execute_bash> in each of your responses, unless it is a direct answer to a question OR a message to the user.
|
|
|
+The assistant's response should be concise.
|
|
|
+You should include <execute_ipython> or <execute_bash> in every one of your responses, unless you are finished with the task or need more input or action from the user in order to proceed.
|
|
|
IMPORTANT: Whenever possible, execute the code for the user using <execute_ipython> or <execute_bash> instead of providing it.
|
|
|
|
|
|
|
|
|
@@ -224,7 +228,7 @@ ENVIRONMENT REMINDER: You have 98 turns left to complete the task.
|
|
|
|
|
|
----------
|
|
|
|
|
|
-Certainly! I will start by opening the file `bad.txt` to see what content it has and then proceed to fix any typos I find.
|
|
|
+Certainly! I will start by opening the file `bad.txt` to see the content and then proceed to fix the typos.
|
|
|
|
|
|
<execute_bash>
|
|
|
open bad.txt
|
|
|
@@ -233,10 +237,10 @@ open bad.txt
|
|
|
----------
|
|
|
|
|
|
OBSERVATION:
|
|
|
-[File: /workspace/bad.txt (4 lines total)]
|
|
|
-1:This is a stupid typoo.
|
|
|
-2:Really?
|
|
|
-3:No mor typos!
|
|
|
+[File: /workspace/bad.txt (4 lines total)]
|
|
|
+1:This is a stupid typoo.
|
|
|
+2:Really?
|
|
|
+3:No mor typos!
|
|
|
4:Enjoy!
|
|
|
[Command -1 finished with exit code 0]]
|
|
|
|
|
|
@@ -244,7 +248,7 @@ ENVIRONMENT REMINDER: You have 97 turns left to complete the task.
|
|
|
|
|
|
----------
|
|
|
|
|
|
-I see a few typos in the file `bad.txt`. I will correct them now.
|
|
|
+I will now edit the file to correct the typos.
|
|
|
|
|
|
<execute_bash>
|
|
|
edit 1:1
|
|
|
@@ -258,17 +262,17 @@ end_of_edit
|
|
|
----------
|
|
|
|
|
|
OBSERVATION:
|
|
|
-> > [File: /workspace/bad.txt (4 lines total)]
|
|
|
-1:This is a stupid typo.
|
|
|
-2:Really?
|
|
|
-3:No mor typos!
|
|
|
-4:Enjoy!
|
|
|
-File updated. Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary.
|
|
|
-> > [File: /workspace/bad.txt (4 lines total)]
|
|
|
-1:This is a stupid typo.
|
|
|
-2:Really?
|
|
|
-3:No more typos!
|
|
|
-4:Enjoy!
|
|
|
+> > [File: /workspace/bad.txt (4 lines total)]
|
|
|
+1:This is a stupid typo.
|
|
|
+2:Really?
|
|
|
+3:No mor typos!
|
|
|
+4:Enjoy!
|
|
|
+File updated. Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary.
|
|
|
+> > [File: /workspace/bad.txt (4 lines total)]
|
|
|
+1:This is a stupid typo.
|
|
|
+2:Really?
|
|
|
+3:No more typos!
|
|
|
+4:Enjoy!
|
|
|
File updated. Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary.
|
|
|
[Command -1 finished with exit code 0]]
|
|
|
|