at master 1.1 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 setuptools, 8 llm, 9 10 # dependencies 11 click, 12 ollama, 13 pydantic, 14 15 # tests 16 pytestCheckHook, 17 pytest-asyncio, 18 pytest-mock, 19 writableTmpDirAsHomeHook, 20 llm-ollama, 21}: 22 23buildPythonPackage rec { 24 pname = "llm-ollama"; 25 version = "0.14.0"; 26 pyproject = true; 27 28 src = fetchFromGitHub { 29 owner = "taketwo"; 30 repo = "llm-ollama"; 31 tag = version; 32 hash = "sha256-8ELjUpHaIC8BOcmyQNeyQDPxQ5vO4Pj6FFnHFhvP+r0="; 33 }; 34 35 build-system = [ setuptools ]; 36 37 dependencies = [ 38 click 39 llm 40 ollama 41 pydantic 42 ]; 43 44 nativeCheckInputs = [ 45 pytestCheckHook 46 pytest-asyncio 47 pytest-mock 48 writableTmpDirAsHomeHook 49 ]; 50 51 pythonImportsCheck = [ 52 "llm_ollama" 53 ]; 54 55 passthru.tests = llm.mkPluginTest llm-ollama; 56 57 meta = { 58 description = "LLM plugin providing access to Ollama models using HTTP API"; 59 homepage = "https://github.com/taketwo/llm-ollama"; 60 changelog = "https://github.com/taketwo/llm-ollama/releases/tag/${version}"; 61 license = lib.licenses.asl20; 62 maintainers = with lib.maintainers; [ erethon ]; 63 }; 64}