Skip to content

Commit

Permalink
Merge pull request OpenInterpreter#1504 from OpenInterpreter/development
Browse files Browse the repository at this point in the history
Windows fix
  • Loading branch information
KillianLucas authored Oct 26, 2024
2 parents 348cec1 + 27ff3be commit 36ec071
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 28 deletions.
23 changes: 0 additions & 23 deletions interpreter/computer_use/loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,29 +95,6 @@ class APIProvider(StrEnum):
# We encourage modifying this system prompt to ensure the model has context for the
# environment it is running in, and to provide any additional information that may be
# helpful for the task at hand.
SYSTEM_PROMPT = f"""<SYSTEM_CAPABILITY>
* You are utilizing a virtual machine running {platform.system()} on {platform.machine()} architecture with internet access.
* You can feel free to install applications with your bash tool.
* Using bash tool you can start GUI applications. GUI apps run with bash tool will appear within your desktop environment, but they may take some time to appear. Take a screenshot to confirm it did.
* When using your bash tool with commands that are expected to output very large quantities of text, redirect into a tmp file and use str_replace_editor or `grep -n -B <lines before> -A <lines after> <query> <filename>` to confirm output.
* When viewing a page it can be helpful to zoom out so that you can see everything on the page. Either that, or make sure you scroll down to see everything before deciding something isn't available.
* When using your computer function calls, they take a while to run and send back to you. Where possible/feasible, try to chain multiple of these calls all into one function calls request.
* The current date is {datetime.today().strftime('%A, %B %d, %Y')}.
</SYSTEM_CAPABILITY>
<IMPORTANT>
* If the item you are looking at is a pdf, if after taking a single screenshot of the pdf it seems that you want to read the entire document instead of trying to continue to read the pdf from your screenshots + navigation, determine the URL, use curl to download the pdf, install and use pdftotext to convert it to a text file, and then read that text file directly with your StrReplaceEditTool.
</IMPORTANT>"""

SYSTEM_PROMPT = f"""<SYSTEM_CAPABILITY>
* You are an AI assistant with access to a virtual machine running on {platform.machine()} architecture.
* You have the capability to edit and run code.
* You can use the bash tool to run shell commands, execute scripts, and manage files.
* You have access to a code editor tool for viewing and modifying source code files.
* You can install and use command-line applications and development tools as needed.
* When dealing with large outputs, use redirection to temporary files and tools like `grep` or the str_replace_editor to analyze the content efficiently.
* The current date is {datetime.today().strftime('%A, %B %#d, %Y' if platform.system() == 'Windows' else '%A, %B %-d, %Y')}.
</SYSTEM_CAPABILITY>"""

SYSTEM_PROMPT = f"""<SYSTEM_CAPABILITY>
* You are an AI assistant with access to a virtual machine running on {"Mac OS" if platform.system() == "Darwin" else platform.system()} with internet access.
Expand Down
9 changes: 5 additions & 4 deletions interpreter/terminal_interface/start_terminal_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,9 +410,7 @@ def print_help(self, *args, **kwargs):

if args.version:
version = pkg_resources.get_distribution("open-interpreter").version
update_name = (
"The Beginning (Ty and Victor)" # Change this with each major update
)
update_name = "Developer Preview" # Change this with each major update
print(f"Open Interpreter {version} {update_name}")
return

Expand Down Expand Up @@ -478,7 +476,10 @@ def print_help(self, *args, **kwargs):
### Set attributes on interpreter, because the arguments passed in via the CLI should override profile

set_attributes(args, arguments)
interpreter.disable_telemetry=os.getenv("DISABLE_TELEMETRY", "false").lower() == "true" or args.disable_telemetry
interpreter.disable_telemetry = (
os.getenv("DISABLE_TELEMETRY", "false").lower() == "true"
or args.disable_telemetry
)

### Set some helpful settings we know are likely to be true

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ packages = [
{include = "interpreter"},
{include = "scripts"},
]
version = "0.4.2" # Use "-rc1", "-rc2", etc. for pre-release versions
version = "0.4.3" # Use "-rc1", "-rc2", etc. for pre-release versions
description = "Let language models run code"
authors = ["Killian Lucas <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 36ec071

Please sign in to comment.