diff --git a/gptscript/gptscript.py b/gptscript/gptscript.py index 6e09c45..614aed0 100644 --- a/gptscript/gptscript.py +++ b/gptscript/gptscript.py @@ -1,4 +1,5 @@ import json +import platform import os from socket import socket from subprocess import Popen, PIPE @@ -144,4 +145,8 @@ def _get_command(): if os.getenv("GPTSCRIPT_BIN") is not None: return os.getenv("GPTSCRIPT_BIN") - return os.path.join(os.path.dirname(executable), "gptscript") + bin_path = os.path.join(os.path.dirname(executable), "gptscript") + if platform.system() == "Windows": + bin_path += ".exe" + + return bin_path if os.path.exists(bin_path) else "gptscript" \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index e906478..f21a66b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,6 +12,7 @@ license = { file = "LICENSE" } dependencies = [ "certifi==2024.2.2", "charset-normalizer==3.3.2", + "httpx==0.27.0", "idna==3.6", "requests==2.31.0", "tqdm==4.66.2",