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.
@@ -7,15 +7,13 @@ class Search:
7
7
  self.base_url = base_url
8
8
  self.headers = headers
9
9
 
10
- def text(self, input, modality, input_type="text", filters=None, group_by_file=True, page=1, page_size=10):
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
- "input": input,
15
- "modality": modality,
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
- # def upload(self, file_path, filters=None, page=1, page_size=10):
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mixpeek
3
- Version: 0.11.1
3
+ Version: 0.11.2
4
4
  Summary: Mixpeek Python SDK
5
5
  Home-page: https://github.com/mixpeek/mixpeek-python
6
6
  Author: Ethan Steininger
@@ -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=u3onbss7Llx0AgcTSRtel6bGO5Ly3jvraXPcA26GzsY,2387
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.1.dist-info/METADATA,sha256=3iXFnyxPjpoLFvdmqsnFjrDY6qAIYzuLE7SrxztSOrs,12224
13
- mixpeek-0.11.1.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
14
- mixpeek-0.11.1.dist-info/top_level.txt,sha256=EJ8Jc4IhqyUwnUlBwKbs498Ju4O9a-IDh2kXc_lo6Vg,8
15
- mixpeek-0.11.1.dist-info/RECORD,,
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,,