Merge pull request #281627 from malob/update-open-interpreter
open-interpreter: 0.1.11 -> 0.2.0
This commit is contained in:
commit
ed9d7efc78
94
pkgs/development/python-modules/open-interpreter/default.nix
Normal file
94
pkgs/development/python-modules/open-interpreter/default.nix
Normal 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";
|
||||
};
|
||||
}
|
@ -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 = [
|
||||
|
@ -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";
|
||||
};
|
||||
}
|
@ -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 { };
|
||||
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user