depot/third_party/nixpkgs/pkgs/development/python-modules/cohere/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

54 lines
996 B
Nix

{
lib,
buildPythonPackage,
fetchPypi,
poetry-core,
pythonOlder,
fastavro,
httpx,
httpx-sse,
pydantic,
requests,
tokenizers,
types-requests,
typing-extensions,
}:
buildPythonPackage rec {
pname = "cohere";
version = "5.3.4";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-tFoshbAl3RU2fWm/knSN5KMOyCq7Swj6UwG3LokFH+I=";
};
build-system = [ poetry-core ];
dependencies = [
fastavro
httpx
httpx-sse
pydantic
requests
tokenizers
types-requests
typing-extensions
];
# 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/releases/tag/${version}";
license = licenses.mit;
maintainers = with maintainers; [ natsukium ];
};
}