python3Packages.llm-groq: init at 0.8

This commit is contained in:
Philip Taron
2025-05-31 20:22:52 -07:00
parent 41ca780911
commit 97b709d4da
4 changed files with 70 additions and 0 deletions
+3
View File
@@ -6,6 +6,7 @@
enable-llm-command-r ? false,
enable-llm-gemini ? false,
enable-llm-grok ? false,
enable-llm-groq ? false,
enable-llm-gguf ? false,
enable-llm-jq ? false,
enable-llm-mistral ? false,
@@ -23,6 +24,7 @@ let
llm-gemini
llm-gguf
llm-grok
llm-groq
llm-jq
llm-mistral
llm-ollama
@@ -40,6 +42,7 @@ toPythonApplication (
++ lib.optionals enable-llm-gemini [ llm-gemini ]
++ lib.optionals enable-llm-gguf [ llm-gguf ]
++ lib.optionals enable-llm-grok [ llm-grok ]
++ lib.optionals enable-llm-groq [ llm-groq ]
++ lib.optionals enable-llm-jq [ llm-jq ]
++ lib.optionals enable-llm-mistral [ llm-mistral ]
++ lib.optionals enable-llm-ollama [ llm-ollama ]
@@ -0,0 +1,43 @@
{
lib,
callPackage,
buildPythonPackage,
fetchFromGitHub,
setuptools,
llm,
groq,
}:
buildPythonPackage rec {
pname = "llm-groq";
version = "0.8";
pyproject = true;
src = fetchFromGitHub {
owner = "angerman";
repo = "llm-groq";
tag = "v${version}";
hash = "sha256-sZ5d9w43NvypaPrebwZ5BLgRaCHAhd7gBU6uHEdUaF4=";
};
build-system = [
setuptools
llm
];
dependencies = [ groq ];
pythonImportsCheck = [ "llm_groq" ];
passthru.tests = {
llm-plugin = callPackage ./tests/llm-plugin.nix { };
};
meta = {
description = "LLM plugin providing access to Groqcloud models.";
homepage = "https://github.com/angerman/llm-groq";
changelog = "https://github.com/angerman/llm-groq/releases/tag/${src.tag}/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-groq
]);
in
runCommand "llm-groq-test-llm-plugin"
{
nativeBuildInputs = [
venv
yq
];
}
''
llm plugins | yq --exit-status 'any(.name == "llm-groq")'
touch "$out"
''
+2
View File
@@ -8306,6 +8306,8 @@ self: super: with self; {
llm-grok = callPackage ../development/python-modules/llm-grok { };
llm-groq = callPackage ../development/python-modules/llm-groq { };
llm-jq = callPackage ../development/python-modules/llm-jq { };
llm-mistral = callPackage ../development/python-modules/llm-mistral { };