9c6ee729d6
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
47 lines
902 B
Nix
47 lines
902 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, poetry-core
|
|
, pythonOlder
|
|
, requests
|
|
, aiohttp
|
|
, backoff
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "cohere";
|
|
version = "4.9.0";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-4d89x+Pg5HZSUyxryH6OuMMGiMfeHXQX5Wy0XS++obY=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
poetry-core
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
requests
|
|
aiohttp
|
|
backoff
|
|
];
|
|
|
|
# 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 ];
|
|
};
|
|
}
|