mirror of
https://github.com/daylinmorgan/oizys.git
synced 2025-02-23 03:45:50 -06:00
add two more plugins for llm
This commit is contained in:
parent
67983ce711
commit
197e5c03bf
3 changed files with 82 additions and 7 deletions
37
pkgs/llm/llm-cmd/default.nix
Normal file
37
pkgs/llm/llm-cmd/default.nix
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
{
|
||||||
|
buildPythonPackage,
|
||||||
|
fetchFromGitHub,
|
||||||
|
|
||||||
|
# build-system
|
||||||
|
setuptools,
|
||||||
|
wheel,
|
||||||
|
|
||||||
|
# deps
|
||||||
|
prompt_toolkit,
|
||||||
|
pygments,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "llm-cmd";
|
||||||
|
version = "0.2a0";
|
||||||
|
pyproject = true;
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "simonw";
|
||||||
|
repo = "llm-cmd";
|
||||||
|
rev = version;
|
||||||
|
hash = "sha256-RhwQEllpee/XP1p0nrgL4m+KjSZzf61J8l1jJGlg94E=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
setuptools
|
||||||
|
wheel
|
||||||
|
];
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
prompt_toolkit pygments
|
||||||
|
];
|
||||||
|
|
||||||
|
dontCheckRuntimeDeps = true;
|
||||||
|
}
|
30
pkgs/llm/llm-jq/default.nix
Normal file
30
pkgs/llm/llm-jq/default.nix
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
{
|
||||||
|
buildPythonPackage,
|
||||||
|
fetchFromGitHub,
|
||||||
|
|
||||||
|
# build-system
|
||||||
|
setuptools,
|
||||||
|
wheel,
|
||||||
|
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "llm-jq";
|
||||||
|
version = "0.1.1";
|
||||||
|
pyproject = true;
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "simonw";
|
||||||
|
repo = "llm-jq";
|
||||||
|
rev = version;
|
||||||
|
hash = "sha256-Mf/tbB9+UdmSRpulqv5Wagr8wjDcRrNs2741DNQZhO4=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
setuptools
|
||||||
|
wheel
|
||||||
|
];
|
||||||
|
|
||||||
|
dontCheckRuntimeDeps = true;
|
||||||
|
}
|
|
@ -5,15 +5,23 @@
|
||||||
let
|
let
|
||||||
inherit (pkgs) python3Packages;
|
inherit (pkgs) python3Packages;
|
||||||
llm = python3Packages.callPackage ../llm { };
|
llm = python3Packages.callPackage ../llm { };
|
||||||
llm-anthropic = python3Packages.callPackage ../llm-anthropic { };
|
plugins = [
|
||||||
llm-gemini = python3Packages.callPackage ../llm-gemini { };
|
"anthropic"
|
||||||
|
"gemini"
|
||||||
|
"cmd"
|
||||||
|
"jq"
|
||||||
|
];
|
||||||
|
|
||||||
|
pluginPackages = plugins |> map (name: python3Packages.callPackage (../. + "/llm-${name}") { });
|
||||||
|
|
||||||
pyWithLlm = (
|
pyWithLlm = (
|
||||||
pkgs.python3.withPackages (_: [
|
pkgs.python3.withPackages (
|
||||||
llm
|
_:
|
||||||
llm-anthropic
|
[
|
||||||
llm-gemini
|
llm
|
||||||
])
|
]
|
||||||
|
++ pluginPackages
|
||||||
|
)
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
pkgs.writeShellScriptBin "llm" ''
|
pkgs.writeShellScriptBin "llm" ''
|
||||||
|
|
Loading…
Add table
Reference in a new issue