1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 httpx,
7 httpx-sse,
8 llm,
9 llm-fragments-reader,
10 pytestCheckHook,
11 pytest-asyncio,
12 pytest-httpx,
13 writableTmpDirAsHomeHook,
14}:
15
16buildPythonPackage rec {
17 pname = "llm-fragments-reader";
18 version = "0.1";
19 pyproject = true;
20
21 src = fetchFromGitHub {
22 owner = "simonw";
23 repo = "llm-fragments-reader";
24 tag = version;
25 hash = "sha256-2xdvOpMGsTtnerrlGiVSHoJrM+GQ7Zgv+zn2SAwYAL4=";
26 };
27
28 build-system = [ setuptools ];
29
30 dependencies = [ llm ];
31
32 nativeCheckInputs = [
33 pytestCheckHook
34 pytest-httpx
35 writableTmpDirAsHomeHook
36 ];
37
38 pythonImportsCheck = [ "llm_fragments_reader" ];
39
40 passthru.tests = llm.mkPluginTest llm-fragments-reader;
41
42 meta = {
43 description = "Run URLs through the Jina Reader API";
44 homepage = "https://github.com/simonw/llm-fragments-reader";
45 changelog = "https://github.com/simonw/llm-fragments-reader/releases/tag/${version}/CHANGELOG.md";
46 license = lib.licenses.asl20;
47 maintainers = with lib.maintainers; [ philiptaron ];
48 };
49}