depot/third_party/nixpkgs/pkgs/development/python-modules/cohere/default.nix
Default email 7e47f3658e Project import generated by Copybara.
GitOrigin-RevId: 1925c603f17fc89f4c8f6bf6f631a802ad85d784
2024-09-26 11:04:55 +00:00

63 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
poetry-core,
# dependencies
boto3,
fastavro,
httpx,
httpx-sse,
parameterized,
pydantic,
pydantic-core,
requests,
tokenizers,
types-requests,
typing-extensions,
}:
buildPythonPackage rec {
pname = "cohere";
version = "5.9.4";
pyproject = true;
src = fetchFromGitHub {
owner = "cohere-ai";
repo = "cohere-python";
rev = "refs/tags/${version}";
hash = "sha256-RtBbS2t0298EyW30yRnqstmXkiU36tou0dsbf6Tq1xE=";
};
build-system = [ poetry-core ];
dependencies = [
boto3
fastavro
httpx
httpx-sse
parameterized
pydantic
pydantic-core
requests
tokenizers
types-requests
typing-extensions
];
# tests require CO_API_KEY
doCheck = false;
pythonImportsCheck = [ "cohere" ];
meta = {
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 = lib.licenses.mit;
maintainers = with lib.maintainers; [ natsukium ];
};
}