5c370c0b2a
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
57 lines
993 B
Nix
57 lines
993 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 ];
|
|
};
|
|
}
|