mixpeek 0.11.1__py3-none-any.whl → 0.11.2__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.
- mixpeek/endpoints/search.py +5 -28
- {mixpeek-0.11.1.dist-info → mixpeek-0.11.2.dist-info}/METADATA +1 -1
- {mixpeek-0.11.1.dist-info → mixpeek-0.11.2.dist-info}/RECORD +5 -5
- {mixpeek-0.11.1.dist-info → mixpeek-0.11.2.dist-info}/WHEEL +0 -0
- {mixpeek-0.11.1.dist-info → mixpeek-0.11.2.dist-info}/top_level.txt +0 -0
mixpeek/endpoints/search.py
CHANGED
@@ -7,15 +7,13 @@ class Search:
|
|
7
7
|
self.base_url = base_url
|
8
8
|
self.headers = headers
|
9
9
|
|
10
|
-
def text(self,
|
10
|
+
def text(self, query, model_id=None, filters=None, page=1, page_size=10):
|
11
11
|
try:
|
12
12
|
url = f"{self.base_url}search/text"
|
13
13
|
data = {
|
14
|
-
"
|
15
|
-
"
|
16
|
-
"input_type": input_type,
|
14
|
+
"query": query,
|
15
|
+
"model_id": model_id,
|
17
16
|
"filters": filters or {},
|
18
|
-
"group_by_file": group_by_file,
|
19
17
|
"pagination": {
|
20
18
|
"page": page,
|
21
19
|
"page_size": page_size
|
@@ -27,34 +25,13 @@ class Search:
|
|
27
25
|
except requests.RequestException as e:
|
28
26
|
return {"error": str(e)}
|
29
27
|
|
30
|
-
|
31
|
-
# try:
|
32
|
-
# url = f"{self.base_url}search/upload"
|
33
|
-
|
34
|
-
# filename = os.path.basename(file_path)
|
35
|
-
# files = {
|
36
|
-
# 'file': (filename, open(file_path, 'rb'), 'application/octet-stream')
|
37
|
-
# }
|
38
|
-
|
39
|
-
# payload = {
|
40
|
-
# 'filters': json.dumps(filters or {}),
|
41
|
-
# 'page': str(page),
|
42
|
-
# 'page_size': str(page_size)
|
43
|
-
# }
|
44
|
-
|
45
|
-
# response = requests.post(url, headers=self.headers, data=payload, files=files)
|
46
|
-
# response.raise_for_status()
|
47
|
-
# return response.json()
|
48
|
-
# except requests.RequestException as e:
|
49
|
-
# return {"error": str(e)}
|
50
|
-
|
51
|
-
def url(self, target_url, filters=None, modality="text", page=1, page_size=10):
|
28
|
+
def url(self, target_url, model_id=None, filters=None, page=1, page_size=10):
|
52
29
|
try:
|
53
30
|
url = f"{self.base_url}search/url"
|
54
31
|
data = {
|
55
32
|
"url": target_url,
|
33
|
+
"model_id": model_id,
|
56
34
|
"filters": filters or {},
|
57
|
-
"modality": modality,
|
58
35
|
"pagination": {
|
59
36
|
"page": page,
|
60
37
|
"page_size": page_size
|
@@ -6,10 +6,10 @@ mixpeek/endpoints/collections.py,sha256=-mxmI4Bs60OH6HRPzE03rr0XVnzqUxL_iHgF-_4R
|
|
6
6
|
mixpeek/endpoints/embed.py,sha256=k97P_juRmmsJQrcIssQokMOga8ikyMvDRrceDMJZsk4,2295
|
7
7
|
mixpeek/endpoints/index.py,sha256=MGwhQSkJqstu-TtlefwwREhu7dfA5kYam2MD2B69Rbc,2166
|
8
8
|
mixpeek/endpoints/register.py,sha256=ZVes4BPxQsPRNk70tGeVe_CYr4eVQKL-CTVmzpJAHM4,1314
|
9
|
-
mixpeek/endpoints/search.py,sha256=
|
9
|
+
mixpeek/endpoints/search.py,sha256=5NahMKO0RroJ53mehqVoK-HSH69LKAepCN1N6tIKYCs,1461
|
10
10
|
mixpeek/endpoints/tasks.py,sha256=GBkscCYVv46JkJ4MVOtM6tL__rymnM3bmt4PrdRK04Y,839
|
11
11
|
mixpeek/endpoints/tools.py,sha256=T8qb9zngY3V_vwtmBBrTqPvqZl1QIL8q3at3UGIj4bg,4709
|
12
|
-
mixpeek-0.11.
|
13
|
-
mixpeek-0.11.
|
14
|
-
mixpeek-0.11.
|
15
|
-
mixpeek-0.11.
|
12
|
+
mixpeek-0.11.2.dist-info/METADATA,sha256=wpj6gxtN1NVUytLrZ8Zc-ohv2dUVAAbpaf1-j_5lpgs,12224
|
13
|
+
mixpeek-0.11.2.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
14
|
+
mixpeek-0.11.2.dist-info/top_level.txt,sha256=EJ8Jc4IhqyUwnUlBwKbs498Ju4O9a-IDh2kXc_lo6Vg,8
|
15
|
+
mixpeek-0.11.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|