Merge pull request #240580 from fabaff/google-generativeai

python311Packages.google-generativeai: init at 0.1.0
This commit is contained in:
Fabian Affolter 2023-06-30 08:57:17 +02:00 committed by GitHub
commit 3e0daac4dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 111 additions and 1 deletions

View file

@ -0,0 +1,55 @@
{ lib
, buildPythonPackage
, fetchPypi
, google-api-core
, google-cloud-testutils
, grpcio
, grpcio-status
, mock
, proto-plus
, protobuf
, pytest-asyncio
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "google-ai-generativelanguage";
version = "0.3.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-EIQruf8+/VFIlRBU9sI7bT4Xk3blFmSLhxJnMw1E4oA=";
};
propagatedBuildInputs = [
google-api-core
grpcio
grpcio-status
proto-plus
protobuf
];
nativeCheckInputs = [
google-cloud-testutils
mock
pytest-asyncio
pytestCheckHook
];
pythonImportsCheck = [
"google.ai.generativelanguage"
"google.ai.generativelanguage_v1beta2"
];
meta = with lib; {
description = "Google Ai Generativelanguage API client library";
homepage = "https://github.com/googleapis/google-cloud-python/tree/main/packages/google-ai-generativelanguage";
changelog = "https://github.com/googleapis/google-cloud-python/blob/google-ai-generativelanguage-v${version}/packages/google-ai-generativelanguage/CHANGELOG.md";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}

View file

@ -0,0 +1,49 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, google-ai-generativelanguage
, pythonOlder
, pythonRelaxDepsHook
}:
buildPythonPackage rec {
pname = "google-generativeai";
version = "0.1.0";
format = "setuptools";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "google";
repo = "generative-ai-python";
rev = "refs/tags/v${version}";
hash = "sha256-caFq7BZKRuNU7fKJWeWSbbDFNpav7OrIET4OQSHkPz4=";
};
pythonRelaxDeps = [
"google-ai-generativelanguage"
];
nativeBuildInputs = [
pythonRelaxDepsHook
];
propagatedBuildInputs = [
google-ai-generativelanguage
];
# Issue with the google.ai module. Check with the next release
doCheck = false;
pythonImportsCheck = [
"google.generativeai"
];
meta = with lib; {
description = "Python client library for Google's large language model PaLM API";
homepage = "https://github.com/google/generative-ai-python";
changelog = "https://github.com/google/generative-ai-python/releases/tag/v${version}";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}

View file

@ -1446,9 +1446,10 @@
];
"google_generative_ai_conversation" = ps: with ps; [
aiohttp-cors
google-generativeai
hassil
home-assistant-intents
]; # missing inputs: google-generativeai
];
"google_mail" = ps: with ps; [
aiohttp-cors
fnv-hash-fast
@ -4966,6 +4967,7 @@
"google_assistant"
"google_assistant_sdk"
"google_domains"
"google_generative_ai_conversation"
"google_mail"
"google_pubsub"
"google_sheets"

View file

@ -4187,6 +4187,8 @@ self: super: with self; {
goodwe = callPackage ../development/python-modules/goodwe { };
google-ai-generativelanguage = callPackage ../development/python-modules/google-ai-generativelanguage { };
google-api-core = callPackage ../development/python-modules/google-api-core { };
google-api-python-client = callPackage ../development/python-modules/google-api-python-client { };
@ -4297,6 +4299,8 @@ self: super: with self; {
inherit (pkgs) crc32c;
};
google-generativeai = callPackage ../development/python-modules/google-generativeai { };
google-i18n-address = callPackage ../development/python-modules/google-i18n-address { };
google-nest-sdm = callPackage ../development/python-modules/google-nest-sdm { };