hammad-python 0.0.26__py3-none-any.whl → 0.0.27__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.
@@ -222,7 +222,16 @@ def create_collection(
222
222
  distance_metric: "DistanceMetric" = "dot",
223
223
  settings: Optional["QdrantCollectionIndexSettings"] = None,
224
224
  query_settings: Optional["QdrantCollectionIndexQuerySettings"] = None,
225
- embedding_function: Optional[Callable[[Any], List[float]]] = None,
225
+ embedding_model: Optional[
226
+ "EmbeddingModelName"
227
+ ] = "openai/text-embedding-3-small",
228
+ embedding_dimensions: Optional[int] = None,
229
+ embedding_api_key: Optional[str] = None,
230
+ embedding_base_url: Optional[str] = None,
231
+ # Rerank-specific parameters
232
+ rerank_model: Optional[str] = None,
233
+ rerank_api_key: Optional[str] = None,
234
+ rerank_base_url: Optional[str] = None,
226
235
  ) -> "QdrantCollectionIndex": ...
227
236
 
228
237
 
@@ -247,7 +256,16 @@ def create_collection(
247
256
  ] = None,
248
257
  # Vector/Qdrant-specific parameters
249
258
  distance_metric: "DistanceMetric" = "dot",
250
- embedding_function: Optional[Callable[[Any], List[float]]] = None,
259
+ embedding_model: Optional[
260
+ "EmbeddingModelName"
261
+ ] = "openai/text-embedding-3-small",
262
+ embedding_dimensions: Optional[int] = None,
263
+ embedding_api_key: Optional[str] = None,
264
+ embedding_base_url: Optional[str] = None,
265
+ # Rerank-specific parameters
266
+ rerank_model: Optional[str] = None,
267
+ rerank_api_key: Optional[str] = None,
268
+ rerank_base_url: Optional[str] = None,
251
269
  ) -> Union["TantivyCollectionIndex", "QdrantCollectionIndex"]:
252
270
  """
253
271
  Create a data collection of the specified type. Collections are a unified
@@ -275,6 +293,11 @@ def create_collection(
275
293
  embedding_api_key: API key for the embedding service
276
294
  embedding_base_url: Base URL for the embedding service
277
295
 
296
+ # Rerank parameters (for vector collections):
297
+ rerank_model: The rerank model to use (e.g., 'cohere/rerank-english-v3.0')
298
+ rerank_api_key: API key for the rerank service
299
+ rerank_base_url: Base URL for the rerank service
300
+
278
301
  Returns:
279
302
  A TantivyCollectionIndex or QdrantCollectionIndex instance
280
303
  """
@@ -289,5 +312,11 @@ def create_collection(
289
312
  settings=settings,
290
313
  query_settings=query_settings,
291
314
  distance_metric=distance_metric,
292
- embedding_function=embedding_function,
315
+ embedding_model=embedding_model,
316
+ embedding_dimensions=embedding_dimensions,
317
+ embedding_api_key=embedding_api_key,
318
+ embedding_base_url=embedding_base_url,
319
+ rerank_model=rerank_model,
320
+ rerank_api_key=rerank_api_key,
321
+ rerank_base_url=rerank_base_url,
293
322
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hammad-python
3
- Version: 0.0.26
3
+ Version: 0.0.27
4
4
  Author-email: Hammad Saeed <hammadaidev@gmail.com>
5
5
  License: MIT License
6
6
 
@@ -18,7 +18,7 @@ hammad/cli/styles/types.py,sha256=vNIeQY_23m10K8qVT7Iy-PMwosGL-La-UAZKszHJjEE,79
18
18
  hammad/cli/styles/utils.py,sha256=zzi0JdH1X7O8XWRlMVfJP2jB-OWt7zkpm_LeCHoSKVY,28287
19
19
  hammad/data/__init__.py,sha256=rga828Od--N3QeGlnOSweADD1WsRLjSTqkaZVk1VhW0,2232
20
20
  hammad/data/collections/__init__.py,sha256=xEORHnjoV75Fa6LFDMyFw90oDaJ0e9VmISLFV3mOsIQ,1110
21
- hammad/data/collections/collection.py,sha256=fi7jyT2GmXiGLNajjegBJMbefzggL0PIMHf-81ov7Bo,10833
21
+ hammad/data/collections/collection.py,sha256=SvmZY0B5_VDMQGX72TxLs9BMeDs8kASmROQca_F3534,11989
22
22
  hammad/data/collections/indexes/__init__.py,sha256=RmXKWKq2sbtA1swz5vamKKWut-eKfc-Q2tUnij-E-IU,960
23
23
  hammad/data/collections/indexes/qdrant/__init__.py,sha256=KU89TIJkYmJPnVxWKHfXntkIYwhn86ejXtWG30hCyHg,49
24
24
  hammad/data/collections/indexes/qdrant/index.py,sha256=UzhW64i5Yq5AXyGZjkW4dljgQxwKUbjF6vhzendbjko,25634
@@ -129,7 +129,7 @@ hammad/web/openapi/__init__.py,sha256=JhJQ6_laBmB2djIYFc0vgGha2GsdUe4FP1LDdZCQ5J
129
129
  hammad/web/openapi/client.py,sha256=1pXz7KAO_0pN4kQZoWKWskXDYGiJ535TsPO1GGCiC0E,26816
130
130
  hammad/web/search/__init__.py,sha256=e9A6znPIiZCz-4secyHbUs0uUGf5yAqW6wGacgx961U,24
131
131
  hammad/web/search/client.py,sha256=LIx2MsHhn6cRTuq5i1mWowRTdIhPobY4GQV3S3bk9lk,36694
132
- hammad_python-0.0.26.dist-info/METADATA,sha256=u04KMVnt5FBw6dPi0fP19OdhLXU2UlT7CU8kaXtP-RY,6785
133
- hammad_python-0.0.26.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
134
- hammad_python-0.0.26.dist-info/licenses/LICENSE,sha256=h74yFUWjbBaodcWG5wNmm30npjl8obVcxD-1nQfUp2I,1069
135
- hammad_python-0.0.26.dist-info/RECORD,,
132
+ hammad_python-0.0.27.dist-info/METADATA,sha256=WfL-hAEfVrPhAwRn3cBaEdm0EfaVIv3RYfz54OkLv08,6785
133
+ hammad_python-0.0.27.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
134
+ hammad_python-0.0.27.dist-info/licenses/LICENSE,sha256=h74yFUWjbBaodcWG5wNmm30npjl8obVcxD-1nQfUp2I,1069
135
+ hammad_python-0.0.27.dist-info/RECORD,,