Merge pull request #281627 from malob/update-open-interpreter

open-interpreter: 0.1.11 -> 0.2.0
This commit is contained in:
Yt 2024-01-18 02:55:40 +00:00 committed by GitHub
commit ed9d7efc78
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 103 additions and 67 deletions

View File

@ -0,0 +1,94 @@
{ lib
, fetchFromGitHub
, buildPythonPackage
, pythonOlder
, pythonRelaxDepsHook
, poetry-core
, appdirs
, astor
, inquirer
, litellm
, pyyaml
, rich
, six
, tiktoken
, tokentrim
, wget
, psutil
, html2image
, ipykernel
, jupyter-client
, matplotlib
, toml
, posthog
, openai
, setuptools
}:
buildPythonPackage rec {
pname = "open-interpreter";
version = "0.2.0";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "KillianLucas";
repo = pname;
rev = "v${version}";
hash = "sha256-XeJ6cADtyXtqoTXwYJu+i9d3NYbJCLpYOeZYmdImtwI=";
};
# Remove unused dependency
postPatch = ''
substituteInPlace pyproject.toml --replace 'git-python = "^1.0.3"' ""
'';
pythonRelaxDeps = [
"tiktoken"
];
nativeBuildInputs = [
poetry-core
pythonRelaxDepsHook
];
propagatedBuildInputs = [
appdirs
astor
inquirer
litellm
pyyaml
rich
six
tiktoken
tokentrim
wget
psutil
html2image
ipykernel
jupyter-client
matplotlib
toml
posthog
openai
# Not explicitly in pyproject.toml but required due to use of `pkgs_resources`
setuptools
];
pythonImportsCheck = [ "interpreter" ];
# Most tests required network access
doCheck = false;
meta = with lib; {
description = "OpenAI's Code Interpreter in your terminal, running locally";
homepage = "https://github.com/KillianLucas/open-interpreter";
license = licenses.mit;
changelog = "https://github.com/KillianLucas/open-interpreter/releases/tag/v${version}";
maintainers = with maintainers; [ happysalada ];
mainProgram = "interpreter";
};
}

View File

@ -5,16 +5,16 @@
, tiktoken
}:
buildPythonPackage {
buildPythonPackage rec {
pname = "tokentrim";
version = "unstable-2023-09-07";
format = "pyproject";
version = "0.1.13";
pyproject = true;
src = fetchFromGitHub {
owner = "KillianLucas";
repo = "tokentrim";
rev = "e98ad3a2ca0e321a7347f76c30be584175495139";
hash = "sha256-95xitHnbFFaj0xPuLMWvIvuJzoCO3VSd592X1RI9h3A=";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-zr2SLT3MBuMD98g9fdS0mLuijcssRQ/S3+tCq2Cw1/4=";
};
nativeBuildInputs = [

View File

@ -1,60 +0,0 @@
{ lib
, python3
, fetchFromGitHub
, semgrep
}:
let
version = "0.1.11";
in
python3.pkgs.buildPythonApplication {
pname = "open-interpreter";
format = "pyproject";
inherit version;
src = fetchFromGitHub {
owner = "KillianLucas";
repo = "open-interpreter";
rev = "v${version}";
hash = "sha256-viUMGUBy5UNWag6P8tXE4TcJIx53Q/tASNV3bmCCK0g=";
};
nativeBuildInputs = [
python3.pkgs.poetry-core
];
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
];
# the import check phase fails trying to do a network request to openai
# because of litellm
# pythonImportsCheck = [ "interpreter" ];
meta = with lib; {
description = "OpenAI's Code Interpreter in your terminal, running locally";
homepage = "https://github.com/KillianLucas/open-interpreter";
license = licenses.mit;
changelog = "https://github.com/KillianLucas/open-interpreter/releases/tag/v${version}";
maintainers = with maintainers; [ happysalada ];
mainProgram = "interpreter";
};
}

View File

@ -11585,7 +11585,7 @@ with pkgs;
open-ecard = callPackage ../tools/security/open-ecard { };
open-interpreter = callPackage ../tools/llm/open-interpreter { };
open-interpreter = with python3Packages; toPythonApplication open-interpreter;
openjade = callPackage ../tools/text/sgml/openjade { };

View File

@ -8657,6 +8657,8 @@ self: super: with self; {
open-garage = callPackage ../development/python-modules/open-garage { };
open-interpreter = callPackage ../development/python-modules/open-interpreter { };
open-meteo = callPackage ../development/python-modules/open-meteo { };
openai-triton = callPackage ../development/python-modules/openai-triton {