Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
292 lines (261 loc) · 7.13 KB
/
Copy pathpyproject.toml
File metadata and controls
292 lines (261 loc) · 7.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
[build-system]
requires = ["setuptools>=45", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "chonkie"
version = "1.7.0"
description = "🦛 CHONK your texts with Chonkie ✨ - The no-nonsense chunking library"
readme = "README.md"
requires-python = ">=3.10"
license = { file = "LICENSE" }
keywords = [
"chunking",
"rag",
"retrieval-augmented-generation",
"nlp",
"natural-language-processing",
"text-processing",
"text-analysis",
"text-chunking",
"artificial-intelligence",
"machine-learning",
]
authors = [
{ name = "Bhavnick Minhas", email = "bhavnick@chonkie.ai" },
{ name = "Shreyash Nigam", email = "shreyash@chonkie.ai" },
]
maintainers = [
{ name = "Bhavnick Minhas", email = "bhavnick@chonkie.ai" },
{ name = "Shreyash Nigam", email = "shreyash@chonkie.ai" },
{ name = "Hafedh Hichri", email = "lain@chonkie.ai" },
]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Intended Audience :: Information Technology",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Text Processing :: Linguistic",
]
dependencies = [
"tqdm>=4.64.0",
"numpy>=2.0.0",
"chonkie-core>=0.10.2",
"tenacity>=8.0.0",
"httpx>=0.28.1",
"tokie>=0.1.2",
]
[project.urls]
Homepage = "https://github.com/chonkie-inc/chonkie"
Documentation = "https://docs.chonkie.ai"
"Bug Tracker" = "https://github.com/chonkie-inc/chonkie/issues"
[project.scripts]
chonkie = "chonkie.cli:main"
[project.optional-dependencies]
# Optional dependencies for the utils
hub = ["huggingface-hub>=0.24.0", "jsonschema>=4.23.0"]
viz = ["rich>=13.0.0"]
cli = ["typer>=0.9.0"]
# Optional dependencies for the API server
api = [
"fastapi>=0.115.0",
"uvicorn[standard]>=0.30.0",
"sqlalchemy>=2.0.0",
"alembic>=1.13.0",
"aiosqlite>=0.20.0",
"huggingface-hub>=1.5.0",
"jsonschema>=4.23.0",
]
# Optional dependencies for table chef
table = ["pandas", "tabulate", "openpyxl", "lxml"]
# Legacy tokenizer extras (tokie is now the default, these are for backward compat)
tokenizers = ["tokenizers>=0.16.0"]
tiktoken = ["tiktoken>=0.5.0"]
# Optional dependencies for the chunkers
code = ["tree-sitter-language-pack>=1.8.0"]
neural = ["transformers>=4.0.0", "torch>=2.0.0, <3.0"]
# Optional dependencies for the embeddings
model2vec = ["tokenizers>=0.16.0", "model2vec>=0.7.0", "numpy>=2.0.0, <3.0"]
st = ["tokenizers>=0.16.0", "sentence-transformers>=3.0.0", "accelerate>=1.6.0"]
openai = ["tiktoken>=0.5.0", "openai>=1.0.0", "pydantic>=2.0.0"]
semantic = ["tokenizers>=0.16.0", "model2vec>=0.3.0"]
teraflopai = ["teraflopai>=0.1.0"]
gemini = ["pydantic>=2.0.0", "google-genai>=1.0.0"]
azure-openai = [
"azure-identity>=1.23.0",
"tiktoken>=0.5.0",
"openai>=1.0.0",
"pydantic>=2.0.0",
]
groq = ["pydantic>=2.0.0", "groq>=0.4.0"]
cerebras = ["pydantic>=2.0.0", "cerebras-cloud-sdk>=1.0.0"]
voyageai = ["tokenizers>=0.16.0", "voyageai>=0.3.2"]
cohere = ["tokenizers>=0.16.0", "cohere>=5.13.0"]
jina = ["tokenizers>=0.16.0"]
catsu = ["catsu>=0.0.1"]
litellm = ["litellm>=1.0.0", "tiktoken>=0.5.0", "tokenizers>=0.16.0"]
# Optional dependencies for the friends
chroma = ["chromadb>=1.0.0"]
qdrant = ["qdrant-client>=1.0.0"]
tpuf = ["turbopuffer>=1,<3"]
pgvector = ["vecs>=0.4.0"]
weaviate = ["weaviate-client>=4.16.7"]
datasets = ["datasets>=4.0.0"]
pinecone = ["pinecone"]
mongodb = ["pymongo"]
elastic = ["elasticsearch>=8.0.0"]
milvus = ["pymilvus>=2.1.0"]
lancedb = ["lancedb>=0.4.0"]
# Optional dependencies for the vision module
mistral = ["mistralai>=2.4.0"]
liteparse = ["liteparse>=0.2.0"]
# Optional dependencies for the genie
genie = ["pydantic>=2.0.0", "google-genai>=1.0.0"]
# Group extras
chunkers = [
"chonkie[code]",
"chonkie[neural]",
"chonkie[semantic]",
"chonkie[teraflopai]",
]
embeddings = [
"chonkie[model2vec]",
"chonkie[st]",
"chonkie[openai]",
"chonkie[gemini]",
"chonkie[azure-openai]",
"chonkie[voyageai]",
"chonkie[cohere]",
"chonkie[jina]",
"chonkie[catsu]",
"chonkie[litellm]",
]
handshakes = [
"chonkie[chroma]",
"chonkie[qdrant]",
"chonkie[tpuf]",
"chonkie[pgvector]",
"chonkie[weaviate]",
"chonkie[datasets]",
"chonkie[pinecone]",
"chonkie[mongodb]",
"chonkie[elastic]",
"chonkie[milvus]",
"chonkie[lancedb]",
]
genies = [
"chonkie[genie]",
"chonkie[openai]",
"chonkie[azure-openai]",
"chonkie[groq]",
"chonkie[cerebras]",
]
chefs = [
"chonkie[table]",
"chonkie[mistral]",
"chonkie[liteparse]",
]
# All dependencies
all = [
"chonkie[hub]",
"chonkie[viz]",
"chonkie[cli]",
"chonkie[api]",
"chonkie[tokenizers]",
"chonkie[tiktoken]",
"chonkie[chunkers]",
"chonkie[embeddings]",
"chonkie[handshakes]",
"chonkie[genies]",
"chonkie[chefs]",
]
# Dependency group for development
dev = [
"chonkie[all]",
"datasets>=1.14.0",
"transformers>=4.0.0",
"pytest>=6.2.0",
"pytest-cov>=4.0.0",
"pytest-xdist>=2.5.0",
"pytest-asyncio>=0.26.0",
"coverage",
"ruff>=0.13.3",
"ty",
"pandas",
"tabulate",
"openpyxl",
"uv>=0.9.18",
"requests-cache>=1.2.1",
]
[dependency-groups]
dev = [
"ruff>=0.15.19",
"ty>=0.0.53",
]
# Jupyter notebooks group, accessible via `uv sync --group jupyter`
# not part of `all` since these dependencies can be quite heavy
jupyter = [
"chonkie[all]",
"jupyterlab>=4.5.7",
"ipython>=8.0.0",
"notebook>=6.0.0",
"nbformat>=5.0.0",
"nbconvert>=6.0.0",
"ipywidgets>=7.0.0",
"ruff>=0.15.19",
"ty>=0.0.53",
]
[tool.pytest.ini_options]
pythonpath = "src"
asyncio_mode = "strict"
asyncio_default_fixture_loop_scope = "function"
testpaths = ["tests"]
[tool.setuptools]
package-dir = { "" = "src" }
packages = [
"chonkie",
"chonkie.chunker",
"chonkie.types",
"chonkie.embeddings",
"chonkie.utils",
"chonkie.refinery",
"chonkie.genie",
"chonkie.handshakes",
"chonkie.porters",
"chonkie.cloud",
"chonkie.cloud.chunker",
"chonkie.cloud.refineries",
"chonkie.experimental",
"chonkie.fetcher",
"chonkie.chef",
"chonkie.pipeline",
"chonkie.cli",
"chonkie.api",
"chonkie.api.routes",
"chonkie.api.models",
]
[tool.setuptools.package-data]
"chonkie.chunker.c_extensions" = ["*.pyx", "*.pxd", "*.c", "*.so"]
[tool.ruff]
line-length = 99
exclude = ["*.ipynb"]
lint.select = ["B904", "F", "I", "D"]
lint.ignore = ["D211", "D213", "D203"]
lint.per-file-ignores = { "tests/**" = ["D100", "D102", "D103", "D104"] }
[tool.ruff.format]
preview = true
indent-style = "space"
[tool.coverage.run]
omit = ["*/chonkie/api/migrations/*"]
[tool.coverage.report]
omit = ["*/chonkie/api/migrations/*"]
[tool.uv]
constraint-dependencies = ["onnxruntime<1.24; python_version < '3.11'"]
[tool.ty.environment]
root = ["src"]