From e7d460d932ca4dcdac04cbe588356f39392d89a1 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Thu, 16 Nov 2023 10:08:41 -0800 Subject: [PATCH] Make sure that API requirements are installed --- one_click.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/one_click.py b/one_click.py index 1fec499..b6e3947 100644 --- a/one_click.py +++ b/one_click.py @@ -316,6 +316,11 @@ def update_requirements(initial_installation=False): run_cmd("python -m pip uninstall -y " + package_name, environment=True) print(f"Uninstalled {package_name}") + # Make sure that API requirements are installed (temporary) + extension_req_path = os.path.join("extensions", "openai", "requirements.txt") + if os.path.exists(extension_req_path): + run_cmd("python -m pip install -r " + extension_req_path + " --upgrade", environment=True) + # Install/update the project requirements run_cmd("python -m pip install -r temp_requirements.txt --upgrade", assert_success=True, environment=True) os.remove('temp_requirements.txt')