2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
cachetools,
|
|
|
|
numpy,
|
|
|
|
pythonOlder,
|
|
|
|
redis,
|
|
|
|
redis-om,
|
|
|
|
requests,
|
2023-08-04 22:07:22 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "gptcache";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "0.1.43";
|
2023-08-04 22:07:22 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8.1";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zilliztech";
|
|
|
|
repo = "GPTCache";
|
|
|
|
rev = "refs/tags/${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-EDsHzl55j4sehbKk0/be+WOl83f1/7zPLvPyzKnTBP4=";
|
2023-08-04 22:07:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
cachetools
|
|
|
|
numpy
|
2023-11-16 04:20:00 +00:00
|
|
|
redis
|
|
|
|
redis-om
|
2023-08-04 22:07:22 +00:00
|
|
|
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";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "gptcache_server";
|
2023-08-04 22:07:22 +00:00
|
|
|
homepage = "https://github.com/zilliztech/GPTCache";
|
|
|
|
changelog = "https://github.com/zilliztech/GPTCache/releases/tag/${src.rev}";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ natsukium ];
|
|
|
|
};
|
|
|
|
}
|