mirror of
https://github.com/daylinmorgan/oizys.git
synced 2025-02-22 19:25: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
|
||||
inherit (pkgs) python3Packages;
|
||||
llm = python3Packages.callPackage ../llm { };
|
||||
llm-anthropic = python3Packages.callPackage ../llm-anthropic { };
|
||||
llm-gemini = python3Packages.callPackage ../llm-gemini { };
|
||||
plugins = [
|
||||
"anthropic"
|
||||
"gemini"
|
||||
"cmd"
|
||||
"jq"
|
||||
];
|
||||
|
||||
pluginPackages = plugins |> map (name: python3Packages.callPackage (../. + "/llm-${name}") { });
|
||||
|
||||
pyWithLlm = (
|
||||
pkgs.python3.withPackages (_: [
|
||||
llm
|
||||
llm-anthropic
|
||||
llm-gemini
|
||||
])
|
||||
pkgs.python3.withPackages (
|
||||
_:
|
||||
[
|
||||
llm
|
||||
]
|
||||
++ pluginPackages
|
||||
)
|
||||
);
|
||||
in
|
||||
pkgs.writeShellScriptBin "llm" ''
|
||||
|
|
Loading…
Add table
Reference in a new issue