cocoindex 0.1.48__cp312-cp312-macosx_11_0_arm64.whl → 0.1.49__cp312-cp312-macosx_11_0_arm64.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.
Binary file
cocoindex/functions.py CHANGED
@@ -1,6 +1,7 @@
1
1
  """All builtin functions."""
2
2
 
3
3
  from typing import Annotated, Any, TYPE_CHECKING
4
+ import dataclasses
4
5
 
5
6
  from .typing import Float32, Vector, TypeAttr
6
7
  from . import op, llm
@@ -14,9 +15,20 @@ class ParseJson(op.FunctionSpec):
14
15
  """Parse a text into a JSON object."""
15
16
 
16
17
 
18
+ @dataclasses.dataclass
19
+ class CustomLanguageSpec:
20
+ """Custom language specification."""
21
+
22
+ language_name: str
23
+ separators_regex: list[str]
24
+ aliases: list[str] = dataclasses.field(default_factory=list)
25
+
26
+
17
27
  class SplitRecursively(op.FunctionSpec):
18
28
  """Split a document (in string) recursively."""
19
29
 
30
+ custom_languages: list[CustomLanguageSpec] = dataclasses.field(default_factory=list)
31
+
20
32
 
21
33
  class ExtractByLlm(op.FunctionSpec):
22
34
  """Extract information from a text using a LLM."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cocoindex
3
- Version: 0.1.48
3
+ Version: 0.1.49
4
4
  Requires-Dist: sentence-transformers>=3.3.1
5
5
  Requires-Dist: click>=8.1.8
6
6
  Requires-Dist: rich>=14.0.0
@@ -1,14 +1,14 @@
1
- cocoindex-0.1.48.dist-info/METADATA,sha256=LCS0wMXqBT0I-jjwC3tYs4f2wzkS1-H4TbCEaVNAYl8,9875
2
- cocoindex-0.1.48.dist-info/WHEEL,sha256=ryp1uXCltaq3TPfjxhSWoam4EHMC40-Yabw-yvEW9gU,104
3
- cocoindex-0.1.48.dist-info/entry_points.txt,sha256=_NretjYVzBdNTn7dK-zgwr7YfG2afz1u1uSE-5bZXF8,46
4
- cocoindex-0.1.48.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
1
+ cocoindex-0.1.49.dist-info/METADATA,sha256=8Fow__E5M04be_uy0-Gz-ojEaokr4scBR4lQdRMEVGo,9875
2
+ cocoindex-0.1.49.dist-info/WHEEL,sha256=ryp1uXCltaq3TPfjxhSWoam4EHMC40-Yabw-yvEW9gU,104
3
+ cocoindex-0.1.49.dist-info/entry_points.txt,sha256=_NretjYVzBdNTn7dK-zgwr7YfG2afz1u1uSE-5bZXF8,46
4
+ cocoindex-0.1.49.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
5
5
  cocoindex/__init__.py,sha256=TkfOR-7upXpzETEvBQUhcnYVuI_A3sqjOdXYeTPAwO0,818
6
- cocoindex/_engine.cpython-312-darwin.so,sha256=tmOjUajCI57cb94ENu65HO7l999OWD3ufHq4x-IHbk8,57386688
6
+ cocoindex/_engine.cpython-312-darwin.so,sha256=ONPsIFmeqp4ez7FTgDuSJWSIrMc1FVxNTqaDSAqA_jI,57406784
7
7
  cocoindex/auth_registry.py,sha256=1XqO7ibjmBBd8i11XSJTvTgdz8p1ptW-ZpuSgo_5zzk,716
8
8
  cocoindex/cli.py,sha256=p92s-Ya6VpT4EY5xfbl-R0yyIJv8ySK-2eyxnwC8KqA,17853
9
9
  cocoindex/convert.py,sha256=CfsZDRs1kwMeNCeJ3-gifHQm_9GzyqySpUmZyCyWXMo,7316
10
10
  cocoindex/flow.py,sha256=sC7eg0L9MkZuo7MlvGA4eYe-mEReIyPjKIILFtkWm-Y,30017
11
- cocoindex/functions.py,sha256=rjULmc14tL8-eU-tSmgyc867C_nySS2hktyj8NgofI8,1972
11
+ cocoindex/functions.py,sha256=RnrYJFJCfj263wow3rEx89UBtff44ldQ_torgwArPEw,2294
12
12
  cocoindex/index.py,sha256=j93B9jEvvLXHtpzKWL88SY6wCGEoPgpsQhEGHlyYGFg,540
13
13
  cocoindex/lib.py,sha256=W3hPh0QQIjLRRe2tpyLCvL_6ajzXhGGSNJubikkS27s,2985
14
14
  cocoindex/llm.py,sha256=KO-R4mrAWtxXD82-Yv5ixpkKMVfkwpbdWwqPVZygLu4,352
@@ -24,4 +24,4 @@ cocoindex/tests/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
24
24
  cocoindex/tests/test_convert.py,sha256=tTsDveMCgflhcYmDq-fQq3MRGAmN2xlbtFIEDYlRpGw,17095
25
25
  cocoindex/typing.py,sha256=0WQ4F04kFhXwHphv9AHJqc1cThYmLe27eqqGEuGWHAU,9462
26
26
  cocoindex/utils.py,sha256=5a3ubVzDowJUJyUl8ecd75Th_OzON3G-MV2vXf0dQSk,503
27
- cocoindex-0.1.48.dist-info/RECORD,,
27
+ cocoindex-0.1.49.dist-info/RECORD,,