summaryrefslogtreecommitdiff
path: root/Omni/Bild/Deps/llm-ollama.nix
diff options
context:
space:
mode:
Diffstat (limited to 'Omni/Bild/Deps/llm-ollama.nix')
-rw-r--r--Omni/Bild/Deps/llm-ollama.nix57
1 files changed, 36 insertions, 21 deletions
diff --git a/Omni/Bild/Deps/llm-ollama.nix b/Omni/Bild/Deps/llm-ollama.nix
index 15b26cc..3956bb7 100644
--- a/Omni/Bild/Deps/llm-ollama.nix
+++ b/Omni/Bild/Deps/llm-ollama.nix
@@ -1,47 +1,62 @@
{
+ lib,
buildPythonPackage,
fetchFromGitHub,
- lib,
+ # build-system
+ setuptools,
llm,
+ # dependencies
+ click,
ollama,
+ pydantic,
+ # tests
pytestCheckHook,
- setuptools,
- pythonOlder,
}:
buildPythonPackage rec {
pname = "llm-ollama";
- version = "0.3.0";
+ version = "0.8.2";
pyproject = true;
- disabled = pythonOlder "3.8";
-
src = fetchFromGitHub {
owner = "taketwo";
- repo = pname;
- rev = "refs/tags/${version}";
- hash = "sha256-Ar0Ux8BNGY0i764CEk7+48J6jnndlRIIMPZ9tFpXiy4=";
+ repo = "llm-ollama";
+ tag = version;
+ hash = "sha256-/WAugfkI4izIQ7PoKM9epd/4vFxYPvsiwDbEqqTdMq4=";
};
- nativeBuildInputs = [setuptools];
+ build-system = [
+ setuptools
+ # Follows the reasoning from https://github.com/NixOS/nixpkgs/pull/327800#discussion_r1681586659 about including llm in build-system
+ llm
+ ];
- buildInputs = [llm ollama];
+ dependencies = [
+ click
+ ollama
+ pydantic
+ ];
- propagatedBuildInputs = [ollama];
+ nativeCheckInputs = [
+ pytestCheckHook
+ ];
+ # These tests try to access the filesystem and fail
disabledTests = [
- # wants to mkdir in the /homeless-shelter
- "test_registered_models"
+ "test_registered_model"
+ "test_registered_chat_models"
+ "test_registered_embedding_models"
+ "test_registered_models_when_ollama_is_down"
];
- nativeCheckInputs = [pytestCheckHook];
-
- pythonImportsCheck = ["llm_ollama"];
+ pythonImportsCheck = [
+ "llm_ollama"
+ ];
- meta = with lib; {
+ meta = {
+ description = "LLM plugin providing access to Ollama models using HTTP API";
homepage = "https://github.com/taketwo/llm-ollama";
- description = "LLM plugin providing access to local Ollama models usting HTTP API";
changelog = "https://github.com/taketwo/llm-ollama/releases/tag/${version}";
- license = licenses.asl20;
- maintainers = with maintainers; [bsima];
+ license = lib.licenses.asl20;
+ maintainers = with lib.maintainers; [erethon];
};
}