Skip to content

Commit

Permalink
Merge pull request OpenInterpreter#23 from KillianLucas/curl-error-fix
Browse files Browse the repository at this point in the history
Windows CURL error fix
  • Loading branch information
KillianLucas authored Sep 2, 2023
2 parents cdcb33d + d35f295 commit c77b0fc
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
2 changes: 0 additions & 2 deletions interpreter/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,6 @@ def verify_api_key(self):

else:
self.api_key = response
print(Markdown("> Model set to `GPT-4`"))
# time.sleep(1)
print('', Markdown("**Tip:** To save this key for later, run `export OPENAI_API_KEY=your_api_key` on Mac/Linux or `setx OPENAI_API_KEY your_api_key` on Windows."), '')
time.sleep(2)
print(Rule(style="white"))
Expand Down
4 changes: 2 additions & 2 deletions interpreter/llama_2.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import sys
import wget
import appdirs
import inquirer
import subprocess
Expand Down Expand Up @@ -82,8 +83,7 @@ def format_quality_choice(quality, model):
download_path = os.path.join(default_path, file_name)
message = f"This instance of `Code-Llama` was not found. Would you like to download it?"
if confirm_action(message):
print("")
subprocess.run(f"curl -L '{url}' -o '{download_path}'", shell=True)
wget.download(url, download_path)
model_path = download_path
print('\n', "Finished downloading `Code-Llama`.", '\n')
else:
Expand Down
12 changes: 11 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ six = "^1.16.0"
# On non-windows systems, you can just `import readline`.
# On windows, `pyreadline3` replaces that, so you can also just `import readline`.
inquirer = "^3.1.3"
wget = "^3.2"
[tool.poetry.dependencies.pyreadline3]
version = "^3.4.1"
markers = "sys_platform == 'win32'"
Expand Down

0 comments on commit c77b0fc

Please sign in to comment.