mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-06 04:53:27 +00:00
62 lines
1.1 KiB
Nix
62 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
|
|
# build-system
|
|
poetry-core,
|
|
|
|
# dependencies
|
|
fastavro,
|
|
httpx,
|
|
httpx-sse,
|
|
parameterized,
|
|
pydantic,
|
|
pydantic-core,
|
|
requests,
|
|
tokenizers,
|
|
types-requests,
|
|
typing-extensions,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "cohere";
|
|
version = "5.11.3";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "cohere-ai";
|
|
repo = "cohere-python";
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-0Y/zSw2pdrwsYpBctiV/tVf2xPhf3jG7c18frSjBass=";
|
|
};
|
|
|
|
build-system = [ poetry-core ];
|
|
|
|
dependencies = [
|
|
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 ];
|
|
};
|
|
}
|