cocoindex 0.1.47__cp313-cp313-macosx_11_0_arm64.whl → 0.1.49__cp313-cp313-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."""
cocoindex/storages.py CHANGED
@@ -20,7 +20,7 @@ class Postgres(op.StorageSpec):
20
20
  class QdrantConnection:
21
21
  """Connection spec for Qdrant."""
22
22
 
23
- url: str
23
+ grpc_url: str
24
24
  api_key: str | None = None
25
25
 
26
26
 
@@ -28,8 +28,8 @@ class QdrantConnection:
28
28
  class Qdrant(op.StorageSpec):
29
29
  """Storage powered by Qdrant - https://qdrant.tech/."""
30
30
 
31
- connection: AuthEntryReference[QdrantConnection]
32
31
  collection_name: str
32
+ connection: AuthEntryReference[QdrantConnection] | None = None
33
33
 
34
34
 
35
35
  @dataclass
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cocoindex
3
- Version: 0.1.47
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.47.dist-info/METADATA,sha256=rhs8X_m1ooEGMMXNFRfRh-3mZ4uICYsJYzqgu9uCod4,9875
2
- cocoindex-0.1.47.dist-info/WHEEL,sha256=UPfJ7S-gMCqCJ6cj5sliE010L87pWgiShNoxmys5TN4,104
3
- cocoindex-0.1.47.dist-info/entry_points.txt,sha256=_NretjYVzBdNTn7dK-zgwr7YfG2afz1u1uSE-5bZXF8,46
4
- cocoindex-0.1.47.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=UPfJ7S-gMCqCJ6cj5sliE010L87pWgiShNoxmys5TN4,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-313-darwin.so,sha256=mEzFkvPgDR5BMzBBMkPHJQaTA1g5GPyqEwyURZDelvI,57387184
6
+ cocoindex/_engine.cpython-313-darwin.so,sha256=00SS7-6SZ8fe7pRYgDVeD3hybBnd4a1_4B1ATxK9Wzo,57406928
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
@@ -19,9 +19,9 @@ cocoindex/runtime.py,sha256=bAdHYaXFWiiUWyAgzmKTeaAaRR0D_AmaqVCIdPO-v00,1056
19
19
  cocoindex/setting.py,sha256=ePqHw1i95rVtqYYRVqzVwtBifRO4SfH1rlMW_AG3Zek,3418
20
20
  cocoindex/setup.py,sha256=u5dYZFKfz4yZLiGHD0guNaR0s4zY9JAoZWrWHpAHw_0,773
21
21
  cocoindex/sources.py,sha256=JCnOhv1w4o28e03i7yvo4ESicWYAhckkBg5bQlxNH4U,1330
22
- cocoindex/storages.py,sha256=SIauVzGok9pDJf4Je9vOPrKxyHuuTOsaT5vdJUO3N9w,2785
22
+ cocoindex/storages.py,sha256=i9cPzj5LbLJVHjskEWyltUXF9kqCyc6ftMEqll6FDwI,2804
23
23
  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.47.dist-info/RECORD,,
27
+ cocoindex-0.1.49.dist-info/RECORD,,