From 5acfaa6f64afae20f101ba20241aca5521b6434a Mon Sep 17 00:00:00 2001 From: natsukium Date: Sun, 30 Jul 2023 10:25:26 +0900 Subject: [PATCH] python310Packages.gptcache: init at 0.1.37 --- .../python-modules/gptcache/default.nix | 42 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 44 insertions(+) create mode 100644 pkgs/development/python-modules/gptcache/default.nix diff --git a/pkgs/development/python-modules/gptcache/default.nix b/pkgs/development/python-modules/gptcache/default.nix new file mode 100644 index 000000000000..9fd2c80c3c49 --- /dev/null +++ b/pkgs/development/python-modules/gptcache/default.nix @@ -0,0 +1,42 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, cachetools +, numpy +, pythonOlder +, requests +}: + +buildPythonPackage rec { + pname = "gptcache"; + version = "0.1.37"; + format = "setuptools"; + + disabled = pythonOlder "3.8.1"; + + src = fetchFromGitHub { + owner = "zilliztech"; + repo = "GPTCache"; + rev = "refs/tags/${version}"; + hash = "sha256-eQu3O6jPL1BRObA99XA2EOznn9NaArVRouqD1Ypz/4w="; + }; + + propagatedBuildInputs = [ + cachetools + numpy + requests + ]; + + # many tests require network access and complicated dependencies + doCheck = false; + + pythonImportsCheck = [ "gptcache" ]; + + meta = with lib; { + description = "Semantic cache for LLMs and fully integrated with LangChain and llama_index"; + homepage = "https://github.com/zilliztech/GPTCache"; + changelog = "https://github.com/zilliztech/GPTCache/releases/tag/${src.rev}"; + license = licenses.mit; + maintainers = with maintainers; [ natsukium ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b4b058cd18b8..c6f35a46b6b6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4456,6 +4456,8 @@ self: super: with self; { gpt-2-simple = callPackage ../development/python-modules/gpt-2-simple { }; + gptcache = callPackage ../development/python-modules/gptcache { }; + gql = callPackage ../development/python-modules/gql { }; grad-cam = callPackage ../development/python-modules/grad-cam { };