depot/third_party/nixpkgs/pkgs/development/python-modules/cohere/default.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02: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.10.0";
pyproject = true;
src = fetchFromGitHub {
owner = "cohere-ai";
repo = "cohere-python";
rev = "refs/tags/${version}";
hash = "sha256-9d72JWEz2L8yyZQKkdwQMgwQM3nz4yVHnmVCERaa5C8=";
};
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 ];
};
}