indexify 0.0.16__tar.gz → 0.0.17__tar.gz
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.
- {indexify-0.0.16 → indexify-0.0.17}/PKG-INFO +1 -1
- {indexify-0.0.16 → indexify-0.0.17}/indexify/client.py +5 -5
- indexify-0.0.17/indexify/settings.py +2 -0
- {indexify-0.0.16 → indexify-0.0.17}/pyproject.toml +1 -1
- indexify-0.0.16/indexify/settings.py +0 -1
- {indexify-0.0.16 → indexify-0.0.17}/LICENSE.txt +0 -0
- {indexify-0.0.16 → indexify-0.0.17}/README.md +0 -0
- {indexify-0.0.16 → indexify-0.0.17}/indexify/__init__.py +0 -0
- {indexify-0.0.16 → indexify-0.0.17}/indexify/data_containers.py +0 -0
- {indexify-0.0.16 → indexify-0.0.17}/indexify/exceptions.py +0 -0
- {indexify-0.0.16 → indexify-0.0.17}/indexify/extraction_policy.py +0 -0
- {indexify-0.0.16 → indexify-0.0.17}/indexify/extractor.py +0 -0
- {indexify-0.0.16 → indexify-0.0.17}/indexify/index.py +0 -0
- {indexify-0.0.16 → indexify-0.0.17}/indexify/utils.py +0 -0
@@ -45,7 +45,7 @@ class IndexifyClient:
|
|
45
45
|
|
46
46
|
def __init__(
|
47
47
|
self,
|
48
|
-
service_url: str = DEFAULT_SERVICE_URL,
|
48
|
+
service_url: str = DEFAULT_SERVICE_URL, # switch this to DEFAULT_SERVICE_URL_HTTPS for TLS
|
49
49
|
namespace: str = "default",
|
50
50
|
config_path: Optional[str] = None,
|
51
51
|
*args,
|
@@ -489,7 +489,7 @@ class IndexifyClient:
|
|
489
489
|
response.raise_for_status()
|
490
490
|
return response.json().get("metadata",[])
|
491
491
|
|
492
|
-
def search_index(self, name: str, query: str, top_k: int, filters: List[str] =
|
492
|
+
def search_index(self, name: str, query: str, top_k: int, filters: List[str] = []) -> list[TextChunk]:
|
493
493
|
"""
|
494
494
|
Search index in the current namespace.
|
495
495
|
|
@@ -499,8 +499,6 @@ class IndexifyClient:
|
|
499
499
|
- top_k (int): top k nearest neighbors to be returned
|
500
500
|
- filters (List[str]): list of filters to apply
|
501
501
|
"""
|
502
|
-
if filters is None:
|
503
|
-
filters = []
|
504
502
|
req = {"index": name, "query": query, "k": top_k, "filters": filters}
|
505
503
|
response = self.post(
|
506
504
|
f"namespaces/{self.namespace}/search",
|
@@ -510,7 +508,7 @@ class IndexifyClient:
|
|
510
508
|
response.raise_for_status()
|
511
509
|
return response.json()["results"]
|
512
510
|
|
513
|
-
def upload_file(self, path: str, id=None, labels: dict = {}):
|
511
|
+
def upload_file(self, path: str, id=None, labels: dict = {}) -> str:
|
514
512
|
"""
|
515
513
|
Upload a file.
|
516
514
|
|
@@ -530,6 +528,8 @@ class IndexifyClient:
|
|
530
528
|
timeout=None,
|
531
529
|
)
|
532
530
|
response.raise_for_status()
|
531
|
+
response_json = response.json()
|
532
|
+
return response_json["content_id"]
|
533
533
|
|
534
534
|
def list_schemas(self) -> List[str]:
|
535
535
|
"""
|
@@ -1 +0,0 @@
|
|
1
|
-
DEFAULT_SERVICE_URL = "http://localhost:8900"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|