cocoindex 0.1.47__cp312-cp312-win_amd64.whl → 0.1.49__cp312-cp312-win_amd64.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=nSiTI9ShleldB0TOz4F1gZp83_p63K3Or2p0gMD7icI,10040
2
- cocoindex-0.1.47.dist-info/WHEEL,sha256=YpU2aDuTyBIvwRZn8idqScP-vkQ8DUGkCILtYmMfnFY,96
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=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
1
+ cocoindex-0.1.49.dist-info/METADATA,sha256=s1ZnlhLjOHMMNUyZGTdr7vQG55ffcZpBqihwwA-bvS0,10040
2
+ cocoindex-0.1.49.dist-info/WHEEL,sha256=YpU2aDuTyBIvwRZn8idqScP-vkQ8DUGkCILtYmMfnFY,96
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=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
5
5
  cocoindex/__init__.py,sha256=M_Iy0BCuceR537ZLz4dunGq8KYT060LF0N48sDnyIwM,835
6
- cocoindex/_engine.cp312-win_amd64.pyd,sha256=S71bQ4LSKQrxdayf6zjR_P6CmKqU4pQw7RMqYbUmIow,61458432
6
+ cocoindex/_engine.cp312-win_amd64.pyd,sha256=EO56SJz0YcXaT4ok9dHtK8baUvbUq2HVTY1Nt12c4v8,61498880
7
7
  cocoindex/auth_registry.py,sha256=LojDKoX0ccO-G3bboFMlAti50_t5GK9BS0ouPJZfyUs,745
8
8
  cocoindex/cli.py,sha256=zhSK6eDLn2UlKWrVTg2xZ89S-xB1XEH4pYWcz1xGS-Y,18411
9
9
  cocoindex/convert.py,sha256=Jc9hKaudlN4rOgXyXNs5O965xBqm7SURvjzpuVrutrY,7528
10
10
  cocoindex/flow.py,sha256=ElTNrp9cxUZiKSvLMRwjU9rNQUn2d9zxryJzCxCFx4I,30985
11
- cocoindex/functions.py,sha256=tVP-sCe5m0PdUjEPPLQE9dxh0dBmj6QsYb-Wt84a8YI,2036
11
+ cocoindex/functions.py,sha256=iJWfznAFu3COgA5027JNL-d-yNL4G3opdzbzBGOj7CM,2370
12
12
  cocoindex/index.py,sha256=GrqTm1rLwICQ8hadtNvJAxVg7GWMvtMmFcbiNtNzmP0,569
13
13
  cocoindex/lib.py,sha256=NsAhzFeAbBNWBZqDe9oUsjHa2IV0LSvq8CGqSbS0C1Q,3061
14
14
  cocoindex/llm.py,sha256=sI46pXpTmOLOBOBpqCB2pnwDHz4PdVyEPBKZuIxObpU,372
@@ -19,9 +19,9 @@ cocoindex/runtime.py,sha256=saKEZntVwUVQNASRhiO9bHRVIFmQccemq2f9mo4mo1A,1090
19
19
  cocoindex/setting.py,sha256=AY4oAUgUXqUWshhrOHZUY0sdprfOQDmRTLewyMcoJhQ,3541
20
20
  cocoindex/setup.py,sha256=nqJAEGQH-5yTulEy3aCAa9khbuiaqD81ZZUdeM3K_lo,799
21
21
  cocoindex/sources.py,sha256=4hxsntuyClp_jKH4oZbx3iE3UM4P2bZTpWy28dqdyFY,1375
22
- cocoindex/storages.py,sha256=FBtgs4W10-p1iNQHXSxTcfNok1Xo576mWQa8K0zxXIM,2920
22
+ cocoindex/storages.py,sha256=WrfpGcOImFXH0DTEdBPRmL4GwyO62lfANMd6rTejxuQ,2939
23
23
  cocoindex/tests/__init__.py,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
24
24
  cocoindex/tests/test_convert.py,sha256=-8DI7B2nKneeBVLzovAhngbMjHi9vYJ1TCixl-XosYQ,17634
25
25
  cocoindex/typing.py,sha256=_Hj79DiYZ5LOkkPqu-uScup9Qy_035fb2QOVNL-44KY,9780
26
26
  cocoindex/utils.py,sha256=RLyawj_M4ZDL-gwJ16e5p2AcFYIL50DlMkfZyKaNB2o,520
27
- cocoindex-0.1.47.dist-info/RECORD,,
27
+ cocoindex-0.1.49.dist-info/RECORD,,