python3Packages.llm-templates-github: init at 0.1
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
enable-llm-ollama ? false,
|
||||
enable-llm-openai-plugin ? false,
|
||||
enable-llm-openrouter ? false,
|
||||
enable-llm-templates-github ? false,
|
||||
enable-llm-venice ? false,
|
||||
enable-llm-video-frames ? false,
|
||||
}:
|
||||
@@ -35,6 +36,7 @@ let
|
||||
llm-ollama
|
||||
llm-openai-plugin
|
||||
llm-openrouter
|
||||
llm-templates-github
|
||||
llm-venice
|
||||
llm-video-frames
|
||||
;
|
||||
@@ -57,6 +59,7 @@ toPythonApplication (
|
||||
++ lib.optionals enable-llm-ollama [ llm-ollama ]
|
||||
++ lib.optionals enable-llm-openai-plugin [ llm-openai-plugin ]
|
||||
++ lib.optionals enable-llm-openrouter [ llm-openrouter ]
|
||||
++ lib.optionals enable-llm-templates-github [ llm-templates-github ]
|
||||
++ lib.optionals enable-llm-venice [ llm-venice ]
|
||||
++ lib.optionals enable-llm-video-frames [ llm-video-frames ];
|
||||
})
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
lib,
|
||||
callPackage,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
setuptools,
|
||||
llm,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "llm-templates-github";
|
||||
version = "0.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "simonw";
|
||||
repo = "llm-templates-github";
|
||||
tag = version;
|
||||
hash = "sha256-SFXrvpKrvfIP0JmXQt6OZ52kne4AEtiggbshyac9XQc=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
setuptools
|
||||
llm
|
||||
];
|
||||
dependencies = [ ];
|
||||
|
||||
pythonImportsCheck = [ "llm_templates_github" ];
|
||||
|
||||
passthru.tests = {
|
||||
llm-plugin = callPackage ./tests/llm-plugin.nix { };
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Load LLM templates from GitHub repositories";
|
||||
homepage = "https://github.com/simonw/llm-templates-github";
|
||||
changelog = "https://github.com/simonw/llm-templates-github/releases/tag/${version}/CHANGELOG.md";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ philiptaron ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
runCommand,
|
||||
python,
|
||||
yq,
|
||||
}:
|
||||
let
|
||||
venv = python.withPackages (ps: [
|
||||
ps.llm
|
||||
ps.llm-templates-github
|
||||
]);
|
||||
in
|
||||
runCommand "llm-templates-github-test-llm-plugin"
|
||||
{
|
||||
nativeBuildInputs = [
|
||||
venv
|
||||
yq
|
||||
];
|
||||
}
|
||||
''
|
||||
llm plugins | yq --exit-status 'any(.name == "llm-templates-github")'
|
||||
touch "$out"
|
||||
''
|
||||
@@ -8320,6 +8320,8 @@ self: super: with self; {
|
||||
|
||||
llm-openrouter = callPackage ../development/python-modules/llm-openrouter { };
|
||||
|
||||
llm-templates-github = callPackage ../development/python-modules/llm-templates-github { };
|
||||
|
||||
llm-venice = callPackage ../development/python-modules/llm-venice { };
|
||||
|
||||
llm-video-frames = callPackage ../development/python-modules/llm-video-frames { };
|
||||
|
||||
Reference in New Issue
Block a user