nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 cachetools,
6 numpy,
7 redis,
8 redis-om,
9 requests,
10}:
11
12buildPythonPackage rec {
13 pname = "gptcache";
14 version = "0.1.44";
15 format = "setuptools";
16
17 src = fetchFromGitHub {
18 owner = "zilliztech";
19 repo = "GPTCache";
20 tag = version;
21 hash = "sha256-FRqngDyGO0ReTRtm9617TFLHVXWY9/NQlZHlBP8ukg0=";
22 };
23
24 propagatedBuildInputs = [
25 cachetools
26 numpy
27 redis
28 redis-om
29 requests
30 ];
31
32 # many tests require network access and complicated dependencies
33 doCheck = false;
34
35 pythonImportsCheck = [ "gptcache" ];
36
37 meta = {
38 description = "Semantic cache for LLMs and fully integrated with LangChain and llama_index";
39 mainProgram = "gptcache_server";
40 homepage = "https://github.com/zilliztech/GPTCache";
41 changelog = "https://github.com/zilliztech/GPTCache/releases/tag/${version}";
42 license = lib.licenses.mit;
43 maintainers = with lib.maintainers; [ natsukium ];
44 };
45}