From 7f5dd771e582bfac76af797356b77d808e5e97ae Mon Sep 17 00:00:00 2001 From: Malo Bourgon Date: Wed, 17 Jan 2024 12:20:49 -0800 Subject: open-interpreter: 0.1.11 -> 0.2.0 --- pkgs/tools/llm/open-interpreter/default.nix | 55 +++++++++++++++++------------ 1 file changed, 33 insertions(+), 22 deletions(-) (limited to 'pkgs/tools/llm') diff --git a/pkgs/tools/llm/open-interpreter/default.nix b/pkgs/tools/llm/open-interpreter/default.nix index b8624fdc48312..ced3141006fc8 100644 --- a/pkgs/tools/llm/open-interpreter/default.nix +++ b/pkgs/tools/llm/open-interpreter/default.nix @@ -1,53 +1,64 @@ { lib , python3 , fetchFromGitHub -, semgrep }: -let - version = "0.1.11"; -in -python3.pkgs.buildPythonApplication { + +python3.pkgs.buildPythonApplication rec { pname = "open-interpreter"; - format = "pyproject"; - inherit version; + version = "0.2.0"; + pyproject = true; + + disabled = python3.pkgs.pythonOlder "3.9"; src = fetchFromGitHub { owner = "KillianLucas"; - repo = "open-interpreter"; + repo = pname; rev = "v${version}"; - hash = "sha256-viUMGUBy5UNWag6P8tXE4TcJIx53Q/tASNV3bmCCK0g="; + hash = "sha256-XeJ6cADtyXtqoTXwYJu+i9d3NYbJCLpYOeZYmdImtwI="; }; + # Remove unused dependency + postPatch = '' + substituteInPlace pyproject.toml --replace 'git-python = "^1.0.3"' "" + ''; + + pythonRelaxDeps = [ + "tiktoken" + ]; + nativeBuildInputs = [ python3.pkgs.poetry-core + python3.pkgs.pythonRelaxDepsHook ]; propagatedBuildInputs = with python3.pkgs; [ appdirs astor - gitpython - huggingface-hub inquirer - jinja2 litellm - openai - # pyreadline3 # this is a windows deps - python-dotenv pyyaml rich six tiktoken - tokenizers tokentrim wget - yaspin - ] ++ [ - semgrep + psutil + html2image + ipykernel + jupyter-client + matplotlib + toml + posthog + openai + + # Not explicitly in pyproject.toml but required due to use of `pkgs_resources` + setuptools ]; - # the import check phase fails trying to do a network request to openai - # because of litellm - # pythonImportsCheck = [ "interpreter" ]; + pythonImportsCheck = [ "interpreter" ]; + + # Most tests required network access + doCheck = false; meta = with lib; { description = "OpenAI's Code Interpreter in your terminal, running locally"; -- cgit 1.4.1