mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-09 14:57:59 -05:00
Enable CodeAct agents with browsing, and also enable arbitrary BrowserGym action support (#1807)
* enable browsing in codeact, and arbitrary browsergym DSL support * fix * fix unit test case * update frontend for the new interactive browsing action * bump ver * Fix integration tests --------- Co-authored-by: OpenDevinBot <bot@opendevin.com>
This commit is contained in:
@@ -9,6 +9,8 @@ print("Hello World!")
|
||||
</execute_ipython>
|
||||
The assistant can execute bash commands on behalf of the user by wrapping them with <execute_bash> and </execute_bash>.
|
||||
For example, you can list the files in the current directory by <execute_bash> ls </execute_bash>.
|
||||
The assistant can browse the Internet with commands on behalf of the user by wrapping them with <execute_browse> and </execute_browse>.
|
||||
For example, you can browse a given URL by <execute_browse> goto("<URL>") </execute_browse>.
|
||||
The assistant should attempt fewer things at a time instead of putting too much commands OR code in one "execute" block.
|
||||
The assistant can install Python packages through bash by <execute_bash> pip install [package needed] </execute_bash> and should always import packages and define variables before starting to use them.
|
||||
The assistant should stop <execute> and provide an answer when they have already obtained the answer from the execution result.
|
||||
@@ -38,8 +40,8 @@ end_of_edit - replaces lines <start_line> through <end_line> (inclusive) with th
|
||||
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.
|
||||
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.
|
||||
You should include <execute_ipython> or <execute_bash> or <execute_browse> 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> or <execute_browse> instead of providing it.
|
||||
|
||||
|
||||
----------
|
||||
@@ -146,6 +148,21 @@ Press CTRL+C to quit
|
||||
ASSISTANT:
|
||||
The server is running on port 5000 with PID 124. You can access the list of numbers by visiting http://127.0.0.1:5000. If you have any further questions, feel free to ask!
|
||||
|
||||
USER: Now browse the newly started server's homepage and show me the content.
|
||||
|
||||
ASSISTANT:
|
||||
Sure! Let me browse the server's homepage at http://127.0.0.1:5000:
|
||||
<execute_browse>
|
||||
goto("http://127.0.0.1:5000")
|
||||
</execute_browse>
|
||||
|
||||
USER:
|
||||
Observation:
|
||||
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||
|
||||
ASSISTANT:
|
||||
The content of the server's homepage is "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]". If you have any further questions, feel free to ask!
|
||||
|
||||
USER: Now kill the server, make it display the numbers in a table format.
|
||||
|
||||
ASSISTANT:
|
||||
|
||||
@@ -9,6 +9,8 @@ print("Hello World!")
|
||||
</execute_ipython>
|
||||
The assistant can execute bash commands on behalf of the user by wrapping them with <execute_bash> and </execute_bash>.
|
||||
For example, you can list the files in the current directory by <execute_bash> ls </execute_bash>.
|
||||
The assistant can browse the Internet with commands on behalf of the user by wrapping them with <execute_browse> and </execute_browse>.
|
||||
For example, you can browse a given URL by <execute_browse> goto("<URL>") </execute_browse>.
|
||||
The assistant should attempt fewer things at a time instead of putting too much commands OR code in one "execute" block.
|
||||
The assistant can install Python packages through bash by <execute_bash> pip install [package needed] </execute_bash> and should always import packages and define variables before starting to use them.
|
||||
The assistant should stop <execute> and provide an answer when they have already obtained the answer from the execution result.
|
||||
@@ -38,8 +40,8 @@ end_of_edit - replaces lines <start_line> through <end_line> (inclusive) with th
|
||||
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.
|
||||
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.
|
||||
You should include <execute_ipython> or <execute_bash> or <execute_browse> 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> or <execute_browse> instead of providing it.
|
||||
|
||||
|
||||
----------
|
||||
@@ -146,6 +148,21 @@ Press CTRL+C to quit
|
||||
ASSISTANT:
|
||||
The server is running on port 5000 with PID 124. You can access the list of numbers by visiting http://127.0.0.1:5000. If you have any further questions, feel free to ask!
|
||||
|
||||
USER: Now browse the newly started server's homepage and show me the content.
|
||||
|
||||
ASSISTANT:
|
||||
Sure! Let me browse the server's homepage at http://127.0.0.1:5000:
|
||||
<execute_browse>
|
||||
goto("http://127.0.0.1:5000")
|
||||
</execute_browse>
|
||||
|
||||
USER:
|
||||
Observation:
|
||||
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||
|
||||
ASSISTANT:
|
||||
The content of the server's homepage is "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]". If you have any further questions, feel free to ask!
|
||||
|
||||
USER: Now kill the server, make it display the numbers in a table format.
|
||||
|
||||
ASSISTANT:
|
||||
@@ -228,20 +245,19 @@ ENVIRONMENT REMINDER: You have 9 turns left to complete the task.
|
||||
|
||||
----------
|
||||
|
||||
Certainly! I will start by opening the file `bad.txt` to see the content and then proceed to fix the typos.
|
||||
Let's start by examining the contents of `bad.txt` to identify the typos. I'll read the file first.
|
||||
|
||||
<execute_bash>
|
||||
open bad.txt
|
||||
cat bad.txt
|
||||
</execute_bash>
|
||||
|
||||
----------
|
||||
|
||||
OBSERVATION:
|
||||
[File: /workspace/bad.txt (4 lines total)]
|
||||
1:This is a stupid typoo.
|
||||
2:Really?
|
||||
3:No mor typos!
|
||||
4:Enjoy!
|
||||
This is a stupid typoo.
|
||||
Really?
|
||||
No mor typos!
|
||||
Enjoy!
|
||||
[Command -1 finished with exit code 0]]
|
||||
|
||||
ENVIRONMENT REMINDER: You have 8 turns left to complete the task.
|
||||
|
||||
@@ -9,6 +9,8 @@ print("Hello World!")
|
||||
</execute_ipython>
|
||||
The assistant can execute bash commands on behalf of the user by wrapping them with <execute_bash> and </execute_bash>.
|
||||
For example, you can list the files in the current directory by <execute_bash> ls </execute_bash>.
|
||||
The assistant can browse the Internet with commands on behalf of the user by wrapping them with <execute_browse> and </execute_browse>.
|
||||
For example, you can browse a given URL by <execute_browse> goto("<URL>") </execute_browse>.
|
||||
The assistant should attempt fewer things at a time instead of putting too much commands OR code in one "execute" block.
|
||||
The assistant can install Python packages through bash by <execute_bash> pip install [package needed] </execute_bash> and should always import packages and define variables before starting to use them.
|
||||
The assistant should stop <execute> and provide an answer when they have already obtained the answer from the execution result.
|
||||
@@ -38,8 +40,8 @@ end_of_edit - replaces lines <start_line> through <end_line> (inclusive) with th
|
||||
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.
|
||||
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.
|
||||
You should include <execute_ipython> or <execute_bash> or <execute_browse> 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> or <execute_browse> instead of providing it.
|
||||
|
||||
|
||||
----------
|
||||
@@ -146,6 +148,21 @@ Press CTRL+C to quit
|
||||
ASSISTANT:
|
||||
The server is running on port 5000 with PID 124. You can access the list of numbers by visiting http://127.0.0.1:5000. If you have any further questions, feel free to ask!
|
||||
|
||||
USER: Now browse the newly started server's homepage and show me the content.
|
||||
|
||||
ASSISTANT:
|
||||
Sure! Let me browse the server's homepage at http://127.0.0.1:5000:
|
||||
<execute_browse>
|
||||
goto("http://127.0.0.1:5000")
|
||||
</execute_browse>
|
||||
|
||||
USER:
|
||||
Observation:
|
||||
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||
|
||||
ASSISTANT:
|
||||
The content of the server's homepage is "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]". If you have any further questions, feel free to ask!
|
||||
|
||||
USER: Now kill the server, make it display the numbers in a table format.
|
||||
|
||||
ASSISTANT:
|
||||
@@ -228,29 +245,33 @@ ENVIRONMENT REMINDER: You have 9 turns left to complete the task.
|
||||
|
||||
----------
|
||||
|
||||
Certainly! I will start by opening the file `bad.txt` to see the content and then proceed to fix the typos.
|
||||
Let's start by examining the contents of `bad.txt` to identify the typos. I'll read the file first.
|
||||
|
||||
<execute_bash>
|
||||
open bad.txt
|
||||
cat bad.txt
|
||||
</execute_bash>
|
||||
|
||||
----------
|
||||
|
||||
OBSERVATION:
|
||||
[File: /workspace/bad.txt (4 lines total)]
|
||||
1:This is a stupid typoo.
|
||||
2:Really?
|
||||
3:No mor typos!
|
||||
4:Enjoy!
|
||||
This is a stupid typoo.
|
||||
Really?
|
||||
No mor typos!
|
||||
Enjoy!
|
||||
[Command -1 finished with exit code 0]]
|
||||
|
||||
ENVIRONMENT REMINDER: You have 8 turns left to complete the task.
|
||||
|
||||
----------
|
||||
|
||||
I will now edit the file to correct the typos.
|
||||
I'll correct the typos in the file `bad.txt`. Here are the corrections:
|
||||
- "typoo" should be "typo"
|
||||
- "mor" should be "more"
|
||||
|
||||
Let me update the file accordingly.
|
||||
|
||||
<execute_bash>
|
||||
open bad.txt
|
||||
edit 1:1
|
||||
This is a stupid typo.
|
||||
end_of_edit
|
||||
@@ -262,17 +283,22 @@ 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 typoo.
|
||||
2:Really?
|
||||
3:No mor 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]]
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Certainly! I will start by opening the file `bad.txt` to see the content and then proceed to fix the typos.
|
||||
Let's start by examining the contents of `bad.txt` to identify the typos. I'll read the file first.
|
||||
|
||||
<execute_bash>
|
||||
open bad.txt
|
||||
cat bad.txt
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
I will now edit the file to correct the typos.
|
||||
I'll correct the typos in the file `bad.txt`. Here are the corrections:
|
||||
- "typoo" should be "typo"
|
||||
- "mor" should be "more"
|
||||
|
||||
Let me update the file accordingly.
|
||||
|
||||
<execute_bash>
|
||||
open bad.txt
|
||||
edit 1:1
|
||||
This is a stupid typo.
|
||||
end_of_edit
|
||||
|
||||
@@ -1 +1,8 @@
|
||||
The typos in `bad.txt` have been fixed. The task is complete. If you need further assistance, feel free to ask!
|
||||
The typos in `bad.txt` have been corrected successfully. The file now reads correctly as follows:
|
||||
|
||||
1. This is a stupid typo.
|
||||
2. Really?
|
||||
3. No more typos!
|
||||
4. Enjoy!
|
||||
|
||||
The task is completed. If you have any more requests or need further assistance, feel free to let me know!
|
||||
|
||||
@@ -9,6 +9,8 @@ print("Hello World!")
|
||||
</execute_ipython>
|
||||
The assistant can execute bash commands on behalf of the user by wrapping them with <execute_bash> and </execute_bash>.
|
||||
For example, you can list the files in the current directory by <execute_bash> ls </execute_bash>.
|
||||
The assistant can browse the Internet with commands on behalf of the user by wrapping them with <execute_browse> and </execute_browse>.
|
||||
For example, you can browse a given URL by <execute_browse> goto("<URL>") </execute_browse>.
|
||||
The assistant should attempt fewer things at a time instead of putting too much commands OR code in one "execute" block.
|
||||
The assistant can install Python packages through bash by <execute_bash> pip install [package needed] </execute_bash> and should always import packages and define variables before starting to use them.
|
||||
The assistant should stop <execute> and provide an answer when they have already obtained the answer from the execution result.
|
||||
@@ -38,8 +40,8 @@ end_of_edit - replaces lines <start_line> through <end_line> (inclusive) with th
|
||||
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.
|
||||
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.
|
||||
You should include <execute_ipython> or <execute_bash> or <execute_browse> 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> or <execute_browse> instead of providing it.
|
||||
|
||||
|
||||
----------
|
||||
@@ -146,6 +148,21 @@ Press CTRL+C to quit
|
||||
ASSISTANT:
|
||||
The server is running on port 5000 with PID 124. You can access the list of numbers by visiting http://127.0.0.1:5000. If you have any further questions, feel free to ask!
|
||||
|
||||
USER: Now browse the newly started server's homepage and show me the content.
|
||||
|
||||
ASSISTANT:
|
||||
Sure! Let me browse the server's homepage at http://127.0.0.1:5000:
|
||||
<execute_browse>
|
||||
goto("http://127.0.0.1:5000")
|
||||
</execute_browse>
|
||||
|
||||
USER:
|
||||
Observation:
|
||||
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||
|
||||
ASSISTANT:
|
||||
The content of the server's homepage is "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]". If you have any further questions, feel free to ask!
|
||||
|
||||
USER: Now kill the server, make it display the numbers in a table format.
|
||||
|
||||
ASSISTANT:
|
||||
|
||||
@@ -9,6 +9,8 @@ print("Hello World!")
|
||||
</execute_ipython>
|
||||
The assistant can execute bash commands on behalf of the user by wrapping them with <execute_bash> and </execute_bash>.
|
||||
For example, you can list the files in the current directory by <execute_bash> ls </execute_bash>.
|
||||
The assistant can browse the Internet with commands on behalf of the user by wrapping them with <execute_browse> and </execute_browse>.
|
||||
For example, you can browse a given URL by <execute_browse> goto("<URL>") </execute_browse>.
|
||||
The assistant should attempt fewer things at a time instead of putting too much commands OR code in one "execute" block.
|
||||
The assistant can install Python packages through bash by <execute_bash> pip install [package needed] </execute_bash> and should always import packages and define variables before starting to use them.
|
||||
The assistant should stop <execute> and provide an answer when they have already obtained the answer from the execution result.
|
||||
@@ -38,8 +40,8 @@ end_of_edit - replaces lines <start_line> through <end_line> (inclusive) with th
|
||||
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.
|
||||
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.
|
||||
You should include <execute_ipython> or <execute_bash> or <execute_browse> 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> or <execute_browse> instead of providing it.
|
||||
|
||||
|
||||
----------
|
||||
@@ -146,6 +148,21 @@ Press CTRL+C to quit
|
||||
ASSISTANT:
|
||||
The server is running on port 5000 with PID 124. You can access the list of numbers by visiting http://127.0.0.1:5000. If you have any further questions, feel free to ask!
|
||||
|
||||
USER: Now browse the newly started server's homepage and show me the content.
|
||||
|
||||
ASSISTANT:
|
||||
Sure! Let me browse the server's homepage at http://127.0.0.1:5000:
|
||||
<execute_browse>
|
||||
goto("http://127.0.0.1:5000")
|
||||
</execute_browse>
|
||||
|
||||
USER:
|
||||
Observation:
|
||||
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||
|
||||
ASSISTANT:
|
||||
The content of the server's homepage is "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]". If you have any further questions, feel free to ask!
|
||||
|
||||
USER: Now kill the server, make it display the numbers in a table format.
|
||||
|
||||
ASSISTANT:
|
||||
@@ -228,10 +245,9 @@ ENVIRONMENT REMINDER: You have 9 turns left to complete the task.
|
||||
|
||||
----------
|
||||
|
||||
Certainly! I will write the text 'hello world' to the file `/workspace/test.txt` using Jupyter IPython.
|
||||
I will write the text 'hello world' to the file '/workspace/test.txt' using Jupyter IPython. Let's proceed:
|
||||
|
||||
<execute_ipython>
|
||||
# Write 'hello world' to the specified text file
|
||||
with open('/workspace/test.txt', 'w') as file:
|
||||
file.write('hello world')
|
||||
</execute_ipython>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
Certainly! I will write the text 'hello world' to the file `/workspace/test.txt` using Jupyter IPython.
|
||||
I will write the text 'hello world' to the file '/workspace/test.txt' using Jupyter IPython. Let's proceed:
|
||||
|
||||
<execute_ipython>
|
||||
# Write 'hello world' to the specified text file
|
||||
with open('/workspace/test.txt', 'w') as file:
|
||||
file.write('hello world')
|
||||
|
||||
@@ -1 +1 @@
|
||||
The text 'hello world' has been successfully written to `/workspace/test.txt`. If you need any further assistance, feel free to ask!
|
||||
The text 'hello world' has been successfully written to the file '/workspace/test.txt'. If you need any further assistance or another task, feel free to let me know!
|
||||
|
||||
@@ -9,6 +9,8 @@ print("Hello World!")
|
||||
</execute_ipython>
|
||||
The assistant can execute bash commands on behalf of the user by wrapping them with <execute_bash> and </execute_bash>.
|
||||
For example, you can list the files in the current directory by <execute_bash> ls </execute_bash>.
|
||||
The assistant can browse the Internet with commands on behalf of the user by wrapping them with <execute_browse> and </execute_browse>.
|
||||
For example, you can browse a given URL by <execute_browse> goto("<URL>") </execute_browse>.
|
||||
The assistant should attempt fewer things at a time instead of putting too much commands OR code in one "execute" block.
|
||||
The assistant can install Python packages through bash by <execute_bash> pip install [package needed] </execute_bash> and should always import packages and define variables before starting to use them.
|
||||
The assistant should stop <execute> and provide an answer when they have already obtained the answer from the execution result.
|
||||
@@ -38,8 +40,8 @@ end_of_edit - replaces lines <start_line> through <end_line> (inclusive) with th
|
||||
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.
|
||||
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.
|
||||
You should include <execute_ipython> or <execute_bash> or <execute_browse> 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> or <execute_browse> instead of providing it.
|
||||
|
||||
|
||||
----------
|
||||
@@ -146,6 +148,21 @@ Press CTRL+C to quit
|
||||
ASSISTANT:
|
||||
The server is running on port 5000 with PID 124. You can access the list of numbers by visiting http://127.0.0.1:5000. If you have any further questions, feel free to ask!
|
||||
|
||||
USER: Now browse the newly started server's homepage and show me the content.
|
||||
|
||||
ASSISTANT:
|
||||
Sure! Let me browse the server's homepage at http://127.0.0.1:5000:
|
||||
<execute_browse>
|
||||
goto("http://127.0.0.1:5000")
|
||||
</execute_browse>
|
||||
|
||||
USER:
|
||||
Observation:
|
||||
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||
|
||||
ASSISTANT:
|
||||
The content of the server's homepage is "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]". If you have any further questions, feel free to ask!
|
||||
|
||||
USER: Now kill the server, make it display the numbers in a table format.
|
||||
|
||||
ASSISTANT:
|
||||
|
||||
@@ -9,6 +9,8 @@ print("Hello World!")
|
||||
</execute_ipython>
|
||||
The assistant can execute bash commands on behalf of the user by wrapping them with <execute_bash> and </execute_bash>.
|
||||
For example, you can list the files in the current directory by <execute_bash> ls </execute_bash>.
|
||||
The assistant can browse the Internet with commands on behalf of the user by wrapping them with <execute_browse> and </execute_browse>.
|
||||
For example, you can browse a given URL by <execute_browse> goto("<URL>") </execute_browse>.
|
||||
The assistant should attempt fewer things at a time instead of putting too much commands OR code in one "execute" block.
|
||||
The assistant can install Python packages through bash by <execute_bash> pip install [package needed] </execute_bash> and should always import packages and define variables before starting to use them.
|
||||
The assistant should stop <execute> and provide an answer when they have already obtained the answer from the execution result.
|
||||
@@ -38,8 +40,8 @@ end_of_edit - replaces lines <start_line> through <end_line> (inclusive) with th
|
||||
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.
|
||||
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.
|
||||
You should include <execute_ipython> or <execute_bash> or <execute_browse> 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> or <execute_browse> instead of providing it.
|
||||
|
||||
|
||||
----------
|
||||
@@ -146,6 +148,21 @@ Press CTRL+C to quit
|
||||
ASSISTANT:
|
||||
The server is running on port 5000 with PID 124. You can access the list of numbers by visiting http://127.0.0.1:5000. If you have any further questions, feel free to ask!
|
||||
|
||||
USER: Now browse the newly started server's homepage and show me the content.
|
||||
|
||||
ASSISTANT:
|
||||
Sure! Let me browse the server's homepage at http://127.0.0.1:5000:
|
||||
<execute_browse>
|
||||
goto("http://127.0.0.1:5000")
|
||||
</execute_browse>
|
||||
|
||||
USER:
|
||||
Observation:
|
||||
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||
|
||||
ASSISTANT:
|
||||
The content of the server's homepage is "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]". If you have any further questions, feel free to ask!
|
||||
|
||||
USER: Now kill the server, make it display the numbers in a table format.
|
||||
|
||||
ASSISTANT:
|
||||
@@ -228,10 +245,10 @@ ENVIRONMENT REMINDER: You have 9 turns left to complete the task.
|
||||
|
||||
----------
|
||||
|
||||
Certainly! I will create a shell script named `hello.sh` that prints 'hello'.
|
||||
I will create and write the shell script `hello.sh` that prints "hello". Let's proceed with that.
|
||||
|
||||
<execute_bash>
|
||||
echo "echo 'hello'" > hello.sh && chmod +x hello.sh
|
||||
echo "echo hello" > hello.sh
|
||||
</execute_bash>
|
||||
|
||||
----------
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Certainly! I will create a shell script named `hello.sh` that prints 'hello'.
|
||||
I will create and write the shell script `hello.sh` that prints "hello". Let's proceed with that.
|
||||
|
||||
<execute_bash>
|
||||
echo "echo 'hello'" > hello.sh && chmod +x hello.sh
|
||||
echo "echo hello" > hello.sh
|
||||
|
||||
@@ -1 +1 @@
|
||||
The shell script `hello.sh` has been created and made executable. You can now run it to print 'hello'.
|
||||
The shell script `hello.sh` has been successfully created and written. If you need anything else, feel free to ask!
|
||||
|
||||
@@ -4,6 +4,7 @@ from opendevin.events.action import (
|
||||
AgentFinishAction,
|
||||
AgentRecallAction,
|
||||
AgentRejectAction,
|
||||
BrowseInteractiveAction,
|
||||
BrowseURLAction,
|
||||
CmdKillAction,
|
||||
CmdRunAction,
|
||||
@@ -91,6 +92,14 @@ def test_browse_url_action_serialization_deserialization():
|
||||
serialization_deserialization(original_action_dict, BrowseURLAction)
|
||||
|
||||
|
||||
def test_browse_interactive_action_serialization_deserialization():
|
||||
original_action_dict = {
|
||||
'action': 'browse_interactive',
|
||||
'args': {'thought': '', 'browser_actions': 'goto("https://www.example.com")'},
|
||||
}
|
||||
serialization_deserialization(original_action_dict, BrowseInteractiveAction)
|
||||
|
||||
|
||||
def test_file_read_action_serialization_deserialization():
|
||||
original_action_dict = {
|
||||
'action': 'read',
|
||||
|
||||
Reference in New Issue
Block a user