1{ lib 2, buildPythonPackage 3, pythonOlder 4, bentoml 5, hatch-fancy-pypi-readme 6, hatch-vcs 7, hatchling 8, anyio 9, distro 10, httpx 11, httpx-auth 12, openllm-core 13, soundfile 14, transformers 15}: 16 17buildPythonPackage rec { 18 inherit (openllm-core) src version; 19 pname = "openllm-client"; 20 pyproject = true; 21 22 disabled = pythonOlder "3.8"; 23 24 sourceRoot = "source/openllm-client"; 25 26 nativeBuildInputs = [ 27 hatch-fancy-pypi-readme 28 hatch-vcs 29 hatchling 30 ]; 31 32 propagatedBuildInputs = [ 33 anyio 34 distro 35 httpx 36 openllm-core 37 ]; 38 39 passthru.optional-dependencies = { 40 grpc = [ 41 bentoml 42 ] ++ bentoml.optional-dependencies.grpc; 43 auth = [ 44 httpx-auth 45 ]; 46 agents = [ 47 transformers 48 # diffusers 49 soundfile 50 ] ++ transformers.agents; 51 full = passthru.optional-dependencies.grpc ++ passthru.optional-dependencies.agents; 52 }; 53 54 # there is no tests 55 doCheck = false; 56 57 pythonImportsCheck = [ "openllm_client" ]; 58 59 meta = with lib; { 60 description = "Interacting with OpenLLM HTTP/gRPC server, or any BentoML server"; 61 homepage = "https://github.com/bentoml/OpenLLM/tree/main/openllm-client"; 62 changelog = "https://github.com/bentoml/OpenLLM/blob/${src.rev}/CHANGELOG.md"; 63 license = licenses.asl20; 64 maintainers = with maintainers; [ natsukium ]; 65 }; 66}