mirror of
https://github.com/daylinmorgan/oizys.git
synced 2025-02-24 04:35:49 -06:00
update llm and plugins
This commit is contained in:
parent
d5b00e93ec
commit
b41ebaff31
2 changed files with 13 additions and 32 deletions
|
@ -11,12 +11,12 @@ let
|
||||||
|
|
||||||
pluginAttr = {
|
pluginAttr = {
|
||||||
anthropic = {
|
anthropic = {
|
||||||
version = "0.12";
|
version = "0.13";
|
||||||
hash = "sha256-7+5j5jZBFfaaqnfjvLTI+mz1PUuG8sB5nD59UCpJuR4=";
|
hash = "sha256-eIppCyFu/2VKExkO88iRozC9AVDcRQaUKrNeLU89rrQ=";
|
||||||
};
|
};
|
||||||
gemini = {
|
gemini = {
|
||||||
version = "0.10";
|
version = "0.11";
|
||||||
hash = "sha256-+ghsBvEY8GQAphdvG7Rdu3T/7yz64vmkuA1VGvqw1fU=";
|
hash = "sha256-xYtfIajEU1iqHvSPDLmg9lHEllcKpVYyUuNZUGNcccw=";
|
||||||
};
|
};
|
||||||
cmd = {
|
cmd = {
|
||||||
version = "0.2a0";
|
version = "0.2a0";
|
||||||
|
@ -33,16 +33,8 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
pluginPackages = pluginAttr |> mapAttrs mkPlugin |> attrValues;
|
pluginPackages = pluginAttr |> mapAttrs mkPlugin |> attrValues;
|
||||||
|
pyWithLlm = (pkgs.python3.withPackages (_: [ llm ] ++ pluginPackages));
|
||||||
|
|
||||||
pyWithLlm = (
|
|
||||||
pkgs.python3.withPackages (
|
|
||||||
_:
|
|
||||||
[
|
|
||||||
llm
|
|
||||||
]
|
|
||||||
++ pluginPackages
|
|
||||||
)
|
|
||||||
);
|
|
||||||
in
|
in
|
||||||
pkgs.writeShellScriptBin "llm" ''
|
pkgs.writeShellScriptBin "llm" ''
|
||||||
exec ${pyWithLlm}/bin/llm "$@"
|
exec ${pyWithLlm}/bin/llm "$@"
|
||||||
|
|
|
@ -2,9 +2,10 @@
|
||||||
lib,
|
lib,
|
||||||
buildPythonPackage,
|
buildPythonPackage,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
pytestCheckHook,
|
|
||||||
pythonOlder,
|
pythonOlder,
|
||||||
setuptools,
|
setuptools,
|
||||||
|
|
||||||
|
# deps
|
||||||
click-default-group,
|
click-default-group,
|
||||||
numpy,
|
numpy,
|
||||||
openai,
|
openai,
|
||||||
|
@ -18,11 +19,12 @@
|
||||||
pytest-httpx,
|
pytest-httpx,
|
||||||
puremagic,
|
puremagic,
|
||||||
sqlite-utils,
|
sqlite-utils,
|
||||||
|
|
||||||
|
pytestCheckHook,
|
||||||
}:
|
}:
|
||||||
let
|
buildPythonPackage rec {
|
||||||
llm = buildPythonPackage rec {
|
|
||||||
pname = "llm";
|
pname = "llm";
|
||||||
version = "0.21";
|
version = "0.22";
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
build-system = [ setuptools ];
|
build-system = [ setuptools ];
|
||||||
|
@ -33,7 +35,7 @@ let
|
||||||
owner = "simonw";
|
owner = "simonw";
|
||||||
repo = "llm";
|
repo = "llm";
|
||||||
rev = "refs/tags/${version}";
|
rev = "refs/tags/${version}";
|
||||||
hash = "sha256-gxmhdczgbcvbWJQTy+gek499C/3jm9WL5vKZmaGVWgU=";
|
hash = "sha256-l4tFBCIey5cOUvJ8IXLOjslc1zy9MnuiwFFP275S/Bg=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# patches = [ ./001-disable-install-uninstall-commands.patch ];
|
# patches = [ ./001-disable-install-uninstall-commands.patch ];
|
||||||
|
@ -69,10 +71,6 @@ let
|
||||||
|
|
||||||
pythonImportsCheck = [ "llm" ];
|
pythonImportsCheck = [ "llm" ];
|
||||||
|
|
||||||
passthru = {
|
|
||||||
inherit withPlugins;
|
|
||||||
};
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/simonw/llm";
|
homepage = "https://github.com/simonw/llm";
|
||||||
description = "Access large language models from the command-line";
|
description = "Access large language models from the command-line";
|
||||||
|
@ -84,13 +82,4 @@ let
|
||||||
mccartykim
|
mccartykim
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
withPlugins = throw ''
|
|
||||||
llm.withPlugins was confusing to use and has been removed.
|
|
||||||
Please migrate to using python3.withPackages(ps: [ ps.llm ]) instead.
|
|
||||||
|
|
||||||
See https://nixos.org/manual/nixpkgs/stable/#python.withpackages-function for more usage examples.
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
llm
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue