1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 httpx, 7 httpx-sse, 8 llm, 9 llm-mistral, 10 pytestCheckHook, 11 pytest-asyncio, 12 pytest-httpx, 13 writableTmpDirAsHomeHook, 14}: 15 16buildPythonPackage rec { 17 pname = "llm-mistral"; 18 version = "0.15"; 19 pyproject = true; 20 21 src = fetchFromGitHub { 22 owner = "simonw"; 23 repo = "llm-mistral"; 24 tag = version; 25 hash = "sha256-4ajvsq0sm3/vdiHUuNxHsHKdX58VNNpHIwhWI0ws+08="; 26 }; 27 28 build-system = [ 29 setuptools 30 ]; 31 32 dependencies = [ 33 httpx 34 httpx-sse 35 llm 36 ]; 37 38 nativeCheckInputs = [ 39 pytestCheckHook 40 pytest-asyncio 41 pytest-httpx 42 writableTmpDirAsHomeHook 43 ]; 44 45 pythonImportsCheck = [ "llm_mistral" ]; 46 47 passthru.tests = llm.mkPluginTest llm-mistral; 48 49 meta = { 50 description = "LLM plugin providing access to Mistral models using the Mistral API"; 51 homepage = "https://github.com/simonw/llm-mistral"; 52 changelog = "https://github.com/simonw/llm-mistral/releases/tag/${src.tag}/CHANGELOG.md"; 53 license = lib.licenses.asl20; 54 maintainers = with lib.maintainers; [ philiptaron ]; 55 }; 56}