nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at r-updates 55 lines 1.2 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 google-ai-generativelanguage, 6 google-api-core, 7 google-api-python-client, 8 google-auth, 9 protobuf, 10 pydantic, 11 setuptools, 12 tqdm, 13 typing-extensions, 14}: 15 16buildPythonPackage rec { 17 pname = "google-generativeai"; 18 version = "0.8.6"; 19 pyproject = true; 20 21 src = fetchFromGitHub { 22 owner = "google"; 23 repo = "generative-ai-python"; 24 tag = "v${version}"; 25 hash = "sha256-zUNgQqpGgMyCBhW+Z9EiSJIyuIQh2XhwlCdgrTymCVk="; 26 }; 27 28 pythonRelaxDeps = [ "google-ai-generativelanguage" ]; 29 30 build-system = [ setuptools ]; 31 32 dependencies = [ 33 google-ai-generativelanguage 34 google-api-core 35 google-api-python-client 36 google-auth 37 protobuf 38 pydantic 39 tqdm 40 typing-extensions 41 ]; 42 43 # Issue with the google.ai module. Check with the next release 44 doCheck = false; 45 46 pythonImportsCheck = [ "google.generativeai" ]; 47 48 meta = { 49 description = "Python client library for Google's large language model PaLM API"; 50 homepage = "https://github.com/google/generative-ai-python"; 51 changelog = "https://github.com/google/generative-ai-python/releases/tag/${src.tag}"; 52 license = lib.licenses.asl20; 53 maintainers = with lib.maintainers; [ fab ]; 54 }; 55}