2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
2024-07-27 06:49:29 +00:00
|
|
|
fetchFromGitHub,
|
|
|
|
|
|
|
|
# build-system
|
|
|
|
poetry-core,
|
|
|
|
|
|
|
|
# dependencies
|
|
|
|
boto3,
|
2024-06-05 15:53:02 +00:00
|
|
|
fastavro,
|
|
|
|
httpx,
|
|
|
|
httpx-sse,
|
2024-07-27 06:49:29 +00:00
|
|
|
parameterized,
|
2024-06-05 15:53:02 +00:00
|
|
|
pydantic,
|
2024-07-27 06:49:29 +00:00
|
|
|
pydantic-core,
|
2024-06-05 15:53:02 +00:00
|
|
|
requests,
|
2024-10-11 05:15:48 +00:00
|
|
|
sagemaker,
|
2024-06-05 15:53:02 +00:00
|
|
|
tokenizers,
|
|
|
|
types-requests,
|
|
|
|
typing-extensions,
|
2023-05-24 13:37:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cohere";
|
2024-10-11 05:15:48 +00:00
|
|
|
version = "5.11.0";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cohere-ai";
|
|
|
|
repo = "cohere-python";
|
|
|
|
rev = "refs/tags/${version}";
|
2024-10-11 05:15:48 +00:00
|
|
|
hash = "sha256-KhONCdIGKYbIcFG+zv6uXSiX+crsmgPZUU+5NsSWaA8=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ poetry-core ];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
dependencies = [
|
2024-07-27 06:49:29 +00:00
|
|
|
boto3
|
2023-10-09 19:29:22 +00:00
|
|
|
fastavro
|
2024-05-15 15:35:15 +00:00
|
|
|
httpx
|
|
|
|
httpx-sse
|
2024-07-27 06:49:29 +00:00
|
|
|
parameterized
|
2024-05-15 15:35:15 +00:00
|
|
|
pydantic
|
2024-07-27 06:49:29 +00:00
|
|
|
pydantic-core
|
2023-08-10 07:59:29 +00:00
|
|
|
requests
|
2024-10-11 05:15:48 +00:00
|
|
|
sagemaker
|
2024-05-15 15:35:15 +00:00
|
|
|
tokenizers
|
|
|
|
types-requests
|
|
|
|
typing-extensions
|
2023-05-24 13:37:59 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# tests require CO_API_KEY
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "cohere" ];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
meta = {
|
2023-05-24 13:37:59 +00:00
|
|
|
description = "Simplify interfacing with the Cohere API";
|
|
|
|
homepage = "https://docs.cohere.com/docs";
|
2024-05-15 15:35:15 +00:00
|
|
|
changelog = "https://github.com/cohere-ai/cohere-python/releases/tag/${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ natsukium ];
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
}
|