python3Packages.llm-grok: init at 1.0.1
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
enable-llm-cmd ? false,
|
||||
enable-llm-command-r ? false,
|
||||
enable-llm-gemini ? false,
|
||||
enable-llm-grok ? false,
|
||||
enable-llm-gguf ? false,
|
||||
enable-llm-jq ? false,
|
||||
enable-llm-mistral ? false,
|
||||
@@ -21,6 +22,7 @@ let
|
||||
llm-command-r
|
||||
llm-gemini
|
||||
llm-gguf
|
||||
llm-grok
|
||||
llm-jq
|
||||
llm-mistral
|
||||
llm-ollama
|
||||
@@ -37,6 +39,7 @@ toPythonApplication (
|
||||
++ lib.optionals enable-llm-cmd [ llm-command-r ]
|
||||
++ 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-jq [ llm-jq ]
|
||||
++ lib.optionals enable-llm-mistral [ llm-mistral ]
|
||||
++ lib.optionals enable-llm-ollama [ llm-ollama ]
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
{
|
||||
lib,
|
||||
callPackage,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
setuptools,
|
||||
llm,
|
||||
httpx,
|
||||
httpx-sse,
|
||||
rich,
|
||||
pytestCheckHook,
|
||||
pytest-httpx,
|
||||
writableTmpDirAsHomeHook,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "llm-grok";
|
||||
version = "1.0.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Hiepler";
|
||||
repo = "llm-grok";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-OeeU/53XKucLCtGvnl5RWc/QqF0TprB/SO8pnnK5fdw=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
setuptools
|
||||
llm
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
httpx
|
||||
httpx-sse
|
||||
rich
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
pytest-httpx
|
||||
writableTmpDirAsHomeHook
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "llm_grok" ];
|
||||
|
||||
passthru.tests = {
|
||||
llm-plugin = callPackage ./tests/llm-plugin.nix { };
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "LLM plugin providing access to Grok models using the xAI API";
|
||||
homepage = "https://github.com/Hiepler/llm-grok";
|
||||
changelog = "https://github.com/Hiepler/llm-grok/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-grok
|
||||
]);
|
||||
in
|
||||
runCommand "llm-grok-test-llm-plugin"
|
||||
{
|
||||
nativeBuildInputs = [
|
||||
venv
|
||||
yq
|
||||
];
|
||||
}
|
||||
''
|
||||
llm plugins | yq --exit-status 'any(.name == "llm-grok")'
|
||||
touch "$out"
|
||||
''
|
||||
@@ -8304,6 +8304,8 @@ self: super: with self; {
|
||||
|
||||
llm-gguf = callPackage ../development/python-modules/llm-gguf { };
|
||||
|
||||
llm-grok = callPackage ../development/python-modules/llm-grok { };
|
||||
|
||||
llm-jq = callPackage ../development/python-modules/llm-jq { };
|
||||
|
||||
llm-mistral = callPackage ../development/python-modules/llm-mistral { };
|
||||
|
||||
Reference in New Issue
Block a user