Merge pull request #240344 from natsukium/clarifai/init
python310Packages.clarifai: init at 9.5.2; python310Packages.langchain: add clarifai as an optional dependency
This commit is contained in:
commit
13d5e6245e
4 changed files with 92 additions and 0 deletions
42
pkgs/development/python-modules/clarifai-grpc/default.nix
Normal file
42
pkgs/development/python-modules/clarifai-grpc/default.nix
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchPypi
|
||||||
|
, pythonOlder
|
||||||
|
, googleapis-common-protos
|
||||||
|
, grpcio
|
||||||
|
, protobuf
|
||||||
|
, requests
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "clarifai-grpc";
|
||||||
|
version = "9.5.0";
|
||||||
|
format = "setuptools";
|
||||||
|
|
||||||
|
disabled = pythonOlder "3.8";
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
hash = "sha256-amMUgRXtvcrALfWwat7W0W60FJQnEeMvHhyxxBCMqUg=";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
googleapis-common-protos
|
||||||
|
grpcio
|
||||||
|
protobuf
|
||||||
|
requests
|
||||||
|
];
|
||||||
|
|
||||||
|
# almost all tests require network access
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "clarifai_grpc" ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Clarifai gRPC API Client";
|
||||||
|
homepage = "https://github.com/Clarifai/clarifai-python-grpc";
|
||||||
|
changelog = "https://github.com/Clarifai/clarifai-python-grpc/releases/tag/${version}";
|
||||||
|
license = licenses.asl20;
|
||||||
|
maintainers = with maintainers; [ natsukium ];
|
||||||
|
};
|
||||||
|
}
|
40
pkgs/development/python-modules/clarifai/default.nix
Normal file
40
pkgs/development/python-modules/clarifai/default.nix
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchFromGitHub
|
||||||
|
, pythonOlder
|
||||||
|
, clarifai-grpc
|
||||||
|
, pytestCheckHook
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "clarifai";
|
||||||
|
version = "9.5.2";
|
||||||
|
format = "setuptools";
|
||||||
|
|
||||||
|
disabled = pythonOlder "3.8";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "Clarifai";
|
||||||
|
repo = "clarifai-python-utils";
|
||||||
|
rev = "refs/tags/${version}";
|
||||||
|
hash = "sha256-29by0YAQ7qc0gL/3lAFOk4FLDB5Qv4X9QDyK49gfyAo=";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
clarifai-grpc
|
||||||
|
];
|
||||||
|
|
||||||
|
nativeCheckInputs = [
|
||||||
|
pytestCheckHook
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "clarifai" ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Clarifai Python Utilities";
|
||||||
|
homepage = "https://github.com/Clarifai/clarifai-python-utils";
|
||||||
|
changelog = "https://github.com/Clarifai/clarifai-python-utils/releases/tag/${src.rev}";
|
||||||
|
license = licenses.asl20;
|
||||||
|
maintainers = with maintainers; [ natsukium ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -17,6 +17,7 @@
|
||||||
, bash
|
, bash
|
||||||
# optional dependencies
|
# optional dependencies
|
||||||
, anthropic
|
, anthropic
|
||||||
|
, clarifai
|
||||||
, cohere
|
, cohere
|
||||||
, openai
|
, openai
|
||||||
, nlpcloud
|
, nlpcloud
|
||||||
|
@ -123,6 +124,7 @@ buildPythonPackage rec {
|
||||||
passthru.optional-dependencies = {
|
passthru.optional-dependencies = {
|
||||||
llms = [
|
llms = [
|
||||||
anthropic
|
anthropic
|
||||||
|
clarifai
|
||||||
cohere
|
cohere
|
||||||
openai
|
openai
|
||||||
nlpcloud
|
nlpcloud
|
||||||
|
@ -140,6 +142,9 @@ buildPythonPackage rec {
|
||||||
text_helpers = [
|
text_helpers = [
|
||||||
chardet
|
chardet
|
||||||
];
|
];
|
||||||
|
clarifai = [
|
||||||
|
clarifai
|
||||||
|
];
|
||||||
cohere = [
|
cohere = [
|
||||||
cohere
|
cohere
|
||||||
];
|
];
|
||||||
|
@ -157,6 +162,7 @@ buildPythonPackage rec {
|
||||||
];
|
];
|
||||||
all = [
|
all = [
|
||||||
anthropic
|
anthropic
|
||||||
|
clarifai
|
||||||
cohere
|
cohere
|
||||||
openai
|
openai
|
||||||
nlpcloud
|
nlpcloud
|
||||||
|
|
|
@ -1861,6 +1861,10 @@ self: super: with self; {
|
||||||
|
|
||||||
ckcc-protocol = callPackage ../development/python-modules/ckcc-protocol { };
|
ckcc-protocol = callPackage ../development/python-modules/ckcc-protocol { };
|
||||||
|
|
||||||
|
clarifai = callPackage ../development/python-modules/clarifai { };
|
||||||
|
|
||||||
|
clarifai-grpc = callPackage ../development/python-modules/clarifai-grpc { };
|
||||||
|
|
||||||
claripy = callPackage ../development/python-modules/claripy { };
|
claripy = callPackage ../development/python-modules/claripy { };
|
||||||
|
|
||||||
classify-imports = callPackage ../development/python-modules/classify-imports { };
|
classify-imports = callPackage ../development/python-modules/classify-imports { };
|
||||||
|
|
Loading…
Reference in a new issue