You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: interpreter/core/computer/skills/skills.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -49,14 +49,14 @@ def create(self):
49
49
"""
50
50
@@@SEND_MESSAGE_AS_USER@@@
51
51
INSTRUCTIONS
52
-
You are creating a new skill. Follow these steps exactly:
52
+
You are creating a new skill. Follow these steps exactly to get me to tell you its name:
53
53
1. Ask me what the name of this skill is.
54
-
2. When I respond, write the following (including the markdown code block):
54
+
2. After I explicitly tell you the name of the skill (I may tell you to proceed which is not the name— if I do say that, you probably need more information from me, so tell me that), after you get the proper name, write the following (including the markdown code block):
Runs the given AppleScript using osascript and returns the result.
6
7
"""
7
-
args= ['osascript', '-e', script]
8
+
print("Running this AppleScript:\n", script)
9
+
print(
10
+
"---\nFeel free to directly run AppleScript to accomplish the user's task. This gives you more granular control than the `computer` module, but it is slower."
Runs the given AppleScript using osascript, captures the output and error, and returns them.
14
19
"""
15
-
args= ['osascript', '-e', script]
20
+
print("Running this AppleScript:\n", script)
21
+
print(
22
+
"---\nFeel free to directly run AppleScript to accomplish the user's task. This gives you more granular control than the `computer` module, but it is slower."
Copy file name to clipboardExpand all lines: interpreter/core/core.py
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -49,9 +49,9 @@ def __init__(
49
49
max_output=2800,
50
50
safe_mode="off",
51
51
shrink_images=False,
52
-
loop=False,
53
-
loop_message="""Proceed. You CAN run code on my machine. If you want to run code, start your message with "```"! If the entire task I asked for is done, say exactly 'The task is done.' If you need some specific information (like username or password) say EXACTLY 'Please provide more information.' If it's impossible, say 'The task is impossible.' (If I haven't provided a task, say exactly 'Let me know what you'd like to do next.') Otherwise keep going.""",
54
-
loop_breakers=[
52
+
force_task_completion=False,
53
+
force_task_completion_message="""Proceed. You CAN run code on my machine. If you want to run code, start your message with "```"! If the entire task I asked for is done, say exactly 'The task is done.' If you need some specific information (like username or password) say EXACTLY 'Please provide more information.' If it's impossible, say 'The task is impossible.' (If I haven't provided a task, say exactly 'Let me know what you'd like to do next.') Otherwise keep going.""",
"If the entire task I asked for is done, take a screenshot to verify it's complete, or if you've already taken a screenshot and verified it's complete,",
Copy file name to clipboardExpand all lines: interpreter/terminal_interface/profiles/defaults/01.py
+12-10Lines changed: 12 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -12,9 +12,9 @@
12
12
interpreter.llm.max_tokens=4096
13
13
interpreter.auto_run=True
14
14
15
-
interpreter.loop=True
16
-
interpreter.loop_message="""Proceed with what you were doing (this is not confirmation, if you just asked me something). You CAN run code on my machine. If you want to run code, start your message with "```"! If the entire task is done, say exactly 'The task is done.' If you need some specific information (like username, message text, skill name, skill step, etc.) say EXACTLY 'Please provide more information.' If it's impossible, say 'The task is impossible.' (If I haven't provided a task, say exactly 'Let me know what you'd like to do next.') Otherwise keep going. CRITICAL: REMEMBER TO FOLLOW ALL PREVIOUS INSTRUCTIONS. If I'm teaching you something, remember to run the related `computer.skills.new_skill` function."""
17
-
interpreter.loop_breakers= [
15
+
interpreter.force_task_completion=True
16
+
interpreter.force_task_completion_message="""Proceed with what you were doing (this is not confirmation, if you just asked me something). You CAN run code on my machine. If you want to run code, start your message with "```"! If the entire task is done, say exactly 'The task is done.' If you need some specific information (like username, message text, skill name, skill step, etc.) say EXACTLY 'Please provide more information.' If it's impossible, say 'The task is impossible.' (If I haven't provided a task, say exactly 'Let me know what you'd like to do next.') Otherwise keep going. CRITICAL: REMEMBER TO FOLLOW ALL PREVIOUS INSTRUCTIONS. If I'm teaching you something, remember to run the related `computer.skills.new_skill` function."""
17
+
interpreter.force_task_completion_breakers= [
18
18
"The task is done.",
19
19
"The task is impossible.",
20
20
"Let me know what you'd like to do next.",
@@ -64,24 +64,26 @@
64
64
65
65
# THE COMPUTER API
66
66
67
-
The `computer` module is ALREADY IMPORTED, and can be used for most tasks:
67
+
The `computer` module is ALREADY IMPORTED, and can be used for some tasks:
68
68
69
69
```python
70
-
computer.browser.search(query) # Google search results will be returned from this function as a string
70
+
result_string = computer.browser.search(query) # Google search results will be returned from this function as a string
71
71
computer.files.edit(path_to_file, original_text, replacement_text) # Edit a file
computer.calendar.get_events(start_date=datetime.date.today(), end_date=None) # Get events between dates. If end_date is None, only gets events for start_date
73
+
events_string = computer.calendar.get_events(start_date=datetime.date.today(), end_date=None) # Get events between dates. If end_date is None, only gets events for start_date
74
74
computer.calendar.delete_event(event_title="Meeting", start_date=datetime.datetime) # Delete a specific event with a matching title and start date, you may need to get use get_events() to find the specific event object first
computer.mail.send("[email protected]", "Meeting Reminder", "Reminder that our meeting is at 3pm today.", ["path/to/attachment.pdf", "path/to/attachment2.pdf"]) # Send an email with a optional attachments
78
-
computer.mail.get(4, unread=True) # Returns the {number} of unread emails, or all emails if False is passed
79
-
computer.mail.unread_count() # Returns the number of unread emails
78
+
emails_string = computer.mail.get(4, unread=True) # Returns the {number} of unread emails, or all emails if False is passed
79
+
unread_num = computer.mail.unread_count() # Returns the number of unread emails
80
80
computer.sms.send("555-123-4567", "Hello from the computer!") # Send a text message. MUST be a phone number, so use computer.contacts.get_phone_number frequently here
81
81
```
82
82
83
83
Do not import the computer module, or any of its sub-modules. They are already imported.
84
84
85
+
DO NOT use the computer module for ALL tasks. Many tasks can be accomplished via Python, or by pip installing new libraries. Be creative!
86
+
85
87
# GUI CONTROL (RARE)
86
88
87
89
You are a computer controlling language model. You can control the user's GUI.
0 commit comments