d5f4a57cbf
GitOrigin-RevId: ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e
49 lines
947 B
Nix
49 lines
947 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, poetry-core
|
|
, pythonOlder
|
|
, aiohttp
|
|
, backoff
|
|
, importlib-metadata
|
|
, requests
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "cohere";
|
|
version = "4.16.0";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-i6kbjugulAcmmInFb+rH4WB50dM7SDO1HNW/JgD4OTQ=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
poetry-core
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
aiohttp
|
|
backoff
|
|
importlib-metadata
|
|
requests
|
|
];
|
|
|
|
# tests require CO_API_KEY
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [
|
|
"cohere"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Simplify interfacing with the Cohere API";
|
|
homepage = "https://docs.cohere.com/docs";
|
|
changelog = "https://github.com/cohere-ai/cohere-python/blob/main/CHANGELOG.md#${builtins.replaceStrings ["."] [""] version}";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ natsukium ];
|
|
};
|
|
}
|