haiku.rag-slim 0.16.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of haiku.rag-slim might be problematic. Click here for more details.

Files changed (71) hide show
  1. haiku/rag/__init__.py +0 -0
  2. haiku/rag/app.py +542 -0
  3. haiku/rag/chunker.py +65 -0
  4. haiku/rag/cli.py +466 -0
  5. haiku/rag/client.py +731 -0
  6. haiku/rag/config/__init__.py +74 -0
  7. haiku/rag/config/loader.py +94 -0
  8. haiku/rag/config/models.py +99 -0
  9. haiku/rag/embeddings/__init__.py +49 -0
  10. haiku/rag/embeddings/base.py +25 -0
  11. haiku/rag/embeddings/ollama.py +28 -0
  12. haiku/rag/embeddings/openai.py +26 -0
  13. haiku/rag/embeddings/vllm.py +29 -0
  14. haiku/rag/embeddings/voyageai.py +27 -0
  15. haiku/rag/graph/__init__.py +26 -0
  16. haiku/rag/graph/agui/__init__.py +53 -0
  17. haiku/rag/graph/agui/cli_renderer.py +135 -0
  18. haiku/rag/graph/agui/emitter.py +197 -0
  19. haiku/rag/graph/agui/events.py +254 -0
  20. haiku/rag/graph/agui/server.py +310 -0
  21. haiku/rag/graph/agui/state.py +34 -0
  22. haiku/rag/graph/agui/stream.py +86 -0
  23. haiku/rag/graph/common/__init__.py +5 -0
  24. haiku/rag/graph/common/models.py +42 -0
  25. haiku/rag/graph/common/nodes.py +265 -0
  26. haiku/rag/graph/common/prompts.py +46 -0
  27. haiku/rag/graph/common/utils.py +44 -0
  28. haiku/rag/graph/deep_qa/__init__.py +1 -0
  29. haiku/rag/graph/deep_qa/dependencies.py +27 -0
  30. haiku/rag/graph/deep_qa/graph.py +243 -0
  31. haiku/rag/graph/deep_qa/models.py +20 -0
  32. haiku/rag/graph/deep_qa/prompts.py +59 -0
  33. haiku/rag/graph/deep_qa/state.py +56 -0
  34. haiku/rag/graph/research/__init__.py +3 -0
  35. haiku/rag/graph/research/common.py +87 -0
  36. haiku/rag/graph/research/dependencies.py +151 -0
  37. haiku/rag/graph/research/graph.py +295 -0
  38. haiku/rag/graph/research/models.py +166 -0
  39. haiku/rag/graph/research/prompts.py +107 -0
  40. haiku/rag/graph/research/state.py +85 -0
  41. haiku/rag/logging.py +56 -0
  42. haiku/rag/mcp.py +245 -0
  43. haiku/rag/monitor.py +194 -0
  44. haiku/rag/qa/__init__.py +33 -0
  45. haiku/rag/qa/agent.py +93 -0
  46. haiku/rag/qa/prompts.py +60 -0
  47. haiku/rag/reader.py +135 -0
  48. haiku/rag/reranking/__init__.py +63 -0
  49. haiku/rag/reranking/base.py +13 -0
  50. haiku/rag/reranking/cohere.py +34 -0
  51. haiku/rag/reranking/mxbai.py +28 -0
  52. haiku/rag/reranking/vllm.py +44 -0
  53. haiku/rag/reranking/zeroentropy.py +59 -0
  54. haiku/rag/store/__init__.py +4 -0
  55. haiku/rag/store/engine.py +309 -0
  56. haiku/rag/store/models/__init__.py +4 -0
  57. haiku/rag/store/models/chunk.py +17 -0
  58. haiku/rag/store/models/document.py +17 -0
  59. haiku/rag/store/repositories/__init__.py +9 -0
  60. haiku/rag/store/repositories/chunk.py +442 -0
  61. haiku/rag/store/repositories/document.py +261 -0
  62. haiku/rag/store/repositories/settings.py +165 -0
  63. haiku/rag/store/upgrades/__init__.py +62 -0
  64. haiku/rag/store/upgrades/v0_10_1.py +64 -0
  65. haiku/rag/store/upgrades/v0_9_3.py +112 -0
  66. haiku/rag/utils.py +211 -0
  67. haiku_rag_slim-0.16.0.dist-info/METADATA +128 -0
  68. haiku_rag_slim-0.16.0.dist-info/RECORD +71 -0
  69. haiku_rag_slim-0.16.0.dist-info/WHEEL +4 -0
  70. haiku_rag_slim-0.16.0.dist-info/entry_points.txt +2 -0
  71. haiku_rag_slim-0.16.0.dist-info/licenses/LICENSE +7 -0
@@ -0,0 +1,128 @@
1
+ Metadata-Version: 2.4
2
+ Name: haiku.rag-slim
3
+ Version: 0.16.0
4
+ Summary: Agentic Retrieval Augmented Generation (RAG) with LanceDB - Minimal dependencies
5
+ Author-email: Yiorgis Gozadinos <ggozadinos@gmail.com>
6
+ License: MIT
7
+ License-File: LICENSE
8
+ Keywords: RAG,lancedb,mcp,ml,vector-database
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Environment :: Console
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Operating System :: MacOS
13
+ Classifier: Operating System :: Microsoft :: Windows :: Windows 10
14
+ Classifier: Operating System :: Microsoft :: Windows :: Windows 11
15
+ Classifier: Operating System :: POSIX :: Linux
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Typing :: Typed
19
+ Requires-Python: >=3.12
20
+ Requires-Dist: docling-core==2.50.1
21
+ Requires-Dist: httpx>=0.28.1
22
+ Requires-Dist: lancedb==0.25.2
23
+ Requires-Dist: pathspec>=0.12.1
24
+ Requires-Dist: pydantic-ai-slim[ag-ui,fastmcp,logfire,openai]>=1.11.1
25
+ Requires-Dist: pydantic>=2.12.3
26
+ Requires-Dist: python-dotenv>=1.2.1
27
+ Requires-Dist: pyyaml>=6.0.3
28
+ Requires-Dist: rich>=14.2.0
29
+ Requires-Dist: tiktoken>=0.12.0
30
+ Requires-Dist: typer<0.20.0,>=0.19.2
31
+ Requires-Dist: watchfiles>=1.1.1
32
+ Provides-Extra: anthropic
33
+ Requires-Dist: pydantic-ai-slim[anthropic]; extra == 'anthropic'
34
+ Provides-Extra: bedrock
35
+ Requires-Dist: pydantic-ai-slim[bedrock]; extra == 'bedrock'
36
+ Provides-Extra: cohere
37
+ Requires-Dist: cohere>=5.0.0; extra == 'cohere'
38
+ Provides-Extra: docling
39
+ Requires-Dist: docling==2.61.1; extra == 'docling'
40
+ Provides-Extra: google
41
+ Requires-Dist: pydantic-ai-slim[google]; extra == 'google'
42
+ Provides-Extra: groq
43
+ Requires-Dist: pydantic-ai-slim[groq]; extra == 'groq'
44
+ Provides-Extra: mistral
45
+ Requires-Dist: pydantic-ai-slim[mistral]; extra == 'mistral'
46
+ Provides-Extra: mxbai
47
+ Requires-Dist: mxbai-rerank>=0.1.6; extra == 'mxbai'
48
+ Provides-Extra: vertexai
49
+ Requires-Dist: pydantic-ai-slim[vertexai]; extra == 'vertexai'
50
+ Provides-Extra: voyageai
51
+ Requires-Dist: voyageai>=0.3.5; extra == 'voyageai'
52
+ Provides-Extra: zeroentropy
53
+ Requires-Dist: zeroentropy>=0.1.0a6; extra == 'zeroentropy'
54
+ Description-Content-Type: text/markdown
55
+
56
+ # haiku.rag-slim
57
+
58
+ Retrieval-Augmented Generation (RAG) library built on LanceDB - Core package with minimal dependencies.
59
+
60
+ `haiku.rag-slim` is the core package for users who want to install only the dependencies they need. Document processing (docling), and reranker support are all optional extras.
61
+
62
+ **For most users, we recommend installing [`haiku.rag`](https://pypi.org/project/haiku.rag/) instead**, which includes all features out of the box.
63
+
64
+ ## Installation
65
+
66
+ **Python 3.12 or newer required**
67
+
68
+ ### Minimal Installation
69
+
70
+ ```bash
71
+ uv pip install haiku.rag-slim
72
+ ```
73
+
74
+ Core functionality with OpenAI/Ollama support, MCP server, and Logfire observability. Document processing (docling) is optional.
75
+
76
+ ### With Document Processing
77
+
78
+ ```bash
79
+ uv pip install haiku.rag-slim[docling]
80
+ ```
81
+
82
+ Adds support for 40+ file formats including PDF, DOCX, HTML, and more.
83
+
84
+ ### Available Extras
85
+
86
+ **Document Processing:**
87
+ - `docling` - PDF, DOCX, HTML, and 40+ file formats
88
+
89
+ **Embedding Providers:**
90
+ - `voyageai` - VoyageAI embeddings
91
+
92
+ **Rerankers:**
93
+ - `mxbai` - MixedBread AI
94
+ - `cohere` - Cohere
95
+ - `zeroentropy` - Zero Entropy
96
+
97
+ **Model Providers:**
98
+ - OpenAI/Ollama - included in core (OpenAI-compatible APIs)
99
+ - `anthropic` - Anthropic Claude
100
+ - `groq` - Groq
101
+ - `google` - Google Gemini
102
+ - `mistral` - Mistral AI
103
+ - `bedrock` - AWS Bedrock
104
+ - `vertexai` - Google Vertex AI
105
+
106
+
107
+ ```bash
108
+ # Common combinations
109
+ uv pip install haiku.rag-slim[docling,anthropic,mxbai]
110
+ uv pip install haiku.rag-slim[docling,groq,logfire]
111
+ ```
112
+
113
+ ## Usage
114
+
115
+ See the main [`haiku.rag`](https://github.com/ggozad/haiku.rag) repository for:
116
+ - Quick start guide
117
+ - CLI examples
118
+ - Python API usage
119
+ - MCP server setup
120
+
121
+ ## Documentation
122
+
123
+ Full documentation: https://ggozad.github.io/haiku.rag/
124
+
125
+ - [Installation](https://ggozad.github.io/haiku.rag/installation/) - Provider setup
126
+ - [Configuration](https://ggozad.github.io/haiku.rag/configuration/) - YAML configuration
127
+ - [CLI](https://ggozad.github.io/haiku.rag/cli/) - Command reference
128
+ - [Python API](https://ggozad.github.io/haiku.rag/python/) - Complete API docs
@@ -0,0 +1,71 @@
1
+ haiku/rag/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ haiku/rag/app.py,sha256=pBauUXYs6Bme4c4qoeYvOVxQxuLL-BYmorA3TSeTZKQ,22363
3
+ haiku/rag/chunker.py,sha256=V3Sm47BY9vAQlzXuGKJiUMA22-XvAZXLkHX37pwvXcY,1926
4
+ haiku/rag/cli.py,sha256=eVj2Muo07TiI5Tssx6rYMxoMvrtfzvYvt2YX0Trj1a4,12593
5
+ haiku/rag/client.py,sha256=cYaThPAf9sdBxdC-WusnC_2MMcjcFHHkEOTDMjTJHWs,27848
6
+ haiku/rag/logging.py,sha256=dm65AwADpcQsH5OAPtRA-4hsw0w5DK-sGOvzYkj6jzw,1720
7
+ haiku/rag/mcp.py,sha256=ld3xLkPDzLGcoo2tUmN-TXY6XIxfIky3PUZdA24VZPQ,8729
8
+ haiku/rag/monitor.py,sha256=aM92Q36-RDYMabaOk-TK7ok3C865E9aB63ObvLOZkNU,6978
9
+ haiku/rag/reader.py,sha256=dK3zayFyNQcay-ROB_M3n8r0s4sLj3Y2sNCFoF4Ot9I,3846
10
+ haiku/rag/utils.py,sha256=VExKww-W2ZQU0peougb89JNfsU6JVr9goad1qUb66dc,6411
11
+ haiku/rag/config/__init__.py,sha256=U12iAoS5V1oW7wOSkAOvuy_cB5bbSsajtsye57Hu5B8,1636
12
+ haiku/rag/config/loader.py,sha256=mhvoPoTXYGPx0ASeJ22rvRl0vQGtNrTzcKm--vXGBfQ,2752
13
+ haiku/rag/config/models.py,sha256=AwgEuIFiKkhxxZ6bR4oBRVbrjEc1bSjI1Wg0zIv2rkg,2701
14
+ haiku/rag/embeddings/__init__.py,sha256=zwWRU9S5YGEJxlgPv5haHBgj3LUJMe-dEwr3LKLa9RY,1731
15
+ haiku/rag/embeddings/base.py,sha256=kzca54e2HGzS_0YKt9OLESM9lrFKpBm_97V07jx0aas,783
16
+ haiku/rag/embeddings/ollama.py,sha256=_uIIObbZX9QVU1lcgWQFooA3b-AeZRNncM7yQ2TxlEU,825
17
+ haiku/rag/embeddings/openai.py,sha256=BfmPni567DH8KqwLCPiOmr3q-dpzpOJkvFFoUuTR5as,731
18
+ haiku/rag/embeddings/vllm.py,sha256=IZFS3pbvLXkhvdT7pFVi2csFlNTSza5bpybwz7ud3Po,847
19
+ haiku/rag/embeddings/voyageai.py,sha256=6vEuk6q510AJv-K2lL93P2dVrziAjELTOe_w_Zp5YT4,917
20
+ haiku/rag/graph/__init__.py,sha256=rQJKwsr52NLhqjLvdGlA9Svpm7iAYIPutH_8w-aATWM,646
21
+ haiku/rag/graph/agui/__init__.py,sha256=Mh3l373-LAT1sR7pubTbNQk5UOqkxWXlp-_VAb5bb_8,1351
22
+ haiku/rag/graph/agui/cli_renderer.py,sha256=_IVkPZWUrFJsKtA2fNI_GRMx-tfOUmBfKFZwttqiZZY,5187
23
+ haiku/rag/graph/agui/emitter.py,sha256=k5lEAASa0lC0Gthsxi-mNFWyI6GpR697EKkoL9E1SkE,6445
24
+ haiku/rag/graph/agui/events.py,sha256=5XGVEfFX2KqywkrQOgW5v3dtluwGswb5LgDyEnIK1GQ,6033
25
+ haiku/rag/graph/agui/server.py,sha256=muLq9D-ekejlfT7p1NpPy7RDFIX5CoE5fN87_wEFN28,10497
26
+ haiku/rag/graph/agui/state.py,sha256=LkuuAY9w32pc0kkXkLJvyNGC0JzhXn05IfIVZzCXAv0,965
27
+ haiku/rag/graph/agui/stream.py,sha256=Z3AVzgcPf2S89c7JBdd_p62VDj7AuMKKr3aroZahnsw,2693
28
+ haiku/rag/graph/common/__init__.py,sha256=nqxh6QViWuUw-cq1E8CWfqWciAh17dbfufIABK1wPsw,127
29
+ haiku/rag/graph/common/models.py,sha256=Nwzw8TZ_J0aEdenU5to14OIMyDROGYvAbBtVIlC4ZXM,1373
30
+ haiku/rag/graph/common/nodes.py,sha256=r9GxXPaGPAF_442pQuMrD6P12GI1ZRTNxGg43hFrfmk,9119
31
+ haiku/rag/graph/common/prompts.py,sha256=DTEk4QN1uRHUZRSPyAhGPJjQNLVASQOWkb4Rhc_gnv4,2276
32
+ haiku/rag/graph/common/utils.py,sha256=QoOIkgIRxIJ8nwFrcbHGzJC7MlzzUb8hfVZlyzHa7dY,1458
33
+ haiku/rag/graph/deep_qa/__init__.py,sha256=BajDKA9m47hoc-alGzQjhOPFirnl6z3vtJod8iYSLQg,56
34
+ haiku/rag/graph/deep_qa/dependencies.py,sha256=Shdj7z9Q1iHpGsuZbiFXVMHjx5_lZA4agHHMOHd__Lk,937
35
+ haiku/rag/graph/deep_qa/graph.py,sha256=2PpJgHQHsgZ4nsVWuG3ytGPs4tEiDRsWMXlh1y1NjIQ,8017
36
+ haiku/rag/graph/deep_qa/models.py,sha256=siZMQXD21_3nk8kaLCv0BCuD9TydLYo-yC4-9CxQy3E,683
37
+ haiku/rag/graph/deep_qa/prompts.py,sha256=XtESQvlAvMpJdE2TX9OZYY55yMFmsFT1h6V6QhnvTCA,2598
38
+ haiku/rag/graph/deep_qa/state.py,sha256=EPUGHbLFUWeJzfx43koQctL7HiB9EsMtO8hfw3t3JzY,1823
39
+ haiku/rag/graph/research/__init__.py,sha256=eNTG4ujgxnY9-7pTJ-fw7xcqOr4MHXQx-P_BH6cA15Q,220
40
+ haiku/rag/graph/research/common.py,sha256=3QtESionc7hxwaInAwk7dFnNpqAoG7h4briTdCf3gDk,3000
41
+ haiku/rag/graph/research/dependencies.py,sha256=6Swm-XJ37GBdJe8Ynd1ZwRjM4CJODmNSfNgrStC9yMo,6100
42
+ haiku/rag/graph/research/graph.py,sha256=llka6emUBAyRUTsBCUX5Jwj7_JUFaUDW4e2kbFH3rH8,10408
43
+ haiku/rag/graph/research/models.py,sha256=U68SdBKvNz8CSX9V3cj3PTevMyiShm6JyASUD0t2kCU,5375
44
+ haiku/rag/graph/research/prompts.py,sha256=opz4MXjoDHH1wjG6bPyiqT0LVzk3pBA6y_a9zpBW8yM,4834
45
+ haiku/rag/graph/research/state.py,sha256=fmuL30bNO5xY4YjZx8vmcr8N2DcoIBKJ6i5BDnO6MoU,2777
46
+ haiku/rag/qa/__init__.py,sha256=Q18B5cjgYSuOdzwsJkXDeqcclAI2pu3tBIcWLcMTT5M,949
47
+ haiku/rag/qa/agent.py,sha256=ReuvluxVzaH82PhrFLNAAM3rVrSj-sKHkhki266SsGI,3181
48
+ haiku/rag/qa/prompts.py,sha256=Lqwn3m4zCsu_CJiC4s9cLsuPNbb9nq6j2PqEF3lw1eA,3380
49
+ haiku/rag/reranking/__init__.py,sha256=cwkydVEJr7Tgs4uAWB057y9j5N3F1BDO-71YJNVkL-s,1900
50
+ haiku/rag/reranking/base.py,sha256=Yji15nAR8LyIJGqZvEZifTWmortNQ4k_7ZHst_5mRYk,408
51
+ haiku/rag/reranking/cohere.py,sha256=BhBPPnaSnDoVlkL_MHF74kegXQBrsZGKnWqC40ztiAk,1050
52
+ haiku/rag/reranking/mxbai.py,sha256=qR55dmpaBz15lSN_wXD3-Z6Kqr_bmNKU9q4Pwef_wB8,911
53
+ haiku/rag/reranking/vllm.py,sha256=Ip83qzV2RM7qXTj0mE2St66hvXykovoNW8Hu3AUebDc,1489
54
+ haiku/rag/reranking/zeroentropy.py,sha256=bVW5gcdSEz8A97xVSD0jhWGN1l4lUZ10I-5vufINGKE,1913
55
+ haiku/rag/store/__init__.py,sha256=R2IRcxtkFDxqa2sgMirqLq3l2-FPdWr6ydYStaqm5OQ,104
56
+ haiku/rag/store/engine.py,sha256=LTv2_QXqkTJqwHTOKIwzvEBodBZAax3zkW9MtJciMjo,11696
57
+ haiku/rag/store/models/__init__.py,sha256=kc7Ctf53Jr483tk4QTIrcgqBbXDz4ZoeYSkFXfPnpks,89
58
+ haiku/rag/store/models/chunk.py,sha256=3EuZav4QekJIeHBCub48EM8SjNX8HEJ6wVDXGot4PEQ,421
59
+ haiku/rag/store/models/document.py,sha256=cZXy_jEti-hnhq7FKhuhCfd99ccY9fIHMLovB_Thbb8,425
60
+ haiku/rag/store/repositories/__init__.py,sha256=Olv5dLfBQINRV3HrsfUpjzkZ7Qm7goEYyMNykgo_DaY,291
61
+ haiku/rag/store/repositories/chunk.py,sha256=wlC_D_Vu_CjHvr2dfXV6qG7lyQExERHSsOlJMtAwldk,15930
62
+ haiku/rag/store/repositories/document.py,sha256=JKpDUQmYgSqbc2eUKPYz9MX0x--oOHCdI0tNEib1Yqw,8704
63
+ haiku/rag/store/repositories/settings.py,sha256=15gS7Xj7cG4qetv_ioxZO_r31by7GuSqtpowOsMkHmc,6129
64
+ haiku/rag/store/upgrades/__init__.py,sha256=RQ8A6rEXBASLb5PD9vdDnEas_m_GgRzzdVu4B88Snqc,1975
65
+ haiku/rag/store/upgrades/v0_10_1.py,sha256=qNGnxj6hoHaHJ1rKTiALfw0c9NQOi0KAK-VZCD_073A,1959
66
+ haiku/rag/store/upgrades/v0_9_3.py,sha256=NrjNilQSgDtFWRbL3ZUtzQzJ8tf9u0dDRJtnDFwwbdw,3322
67
+ haiku_rag_slim-0.16.0.dist-info/METADATA,sha256=7BjfptrvrZgWin4NuyVLmZUGMwzIpeNfw5-_CakZJk4,4192
68
+ haiku_rag_slim-0.16.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
69
+ haiku_rag_slim-0.16.0.dist-info/entry_points.txt,sha256=G1U3nAkNd5YDYd4v0tuYFbriz0i-JheCsFuT9kIoGCI,48
70
+ haiku_rag_slim-0.16.0.dist-info/licenses/LICENSE,sha256=eXZrWjSk9PwYFNK9yUczl3oPl95Z4V9UXH7bPN46iPo,1065
71
+ haiku_rag_slim-0.16.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.27.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ haiku-rag = haiku.rag.cli:cli
@@ -0,0 +1,7 @@
1
+ Copyright 2025 Yiorgis Gozadinos
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.