simplex 1.2.5__py3-none-any.whl → 1.2.6__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.

Potentially problematic release.


This version of simplex might be problematic. Click here for more details.

simplex/simplex.py CHANGED
@@ -2,7 +2,8 @@ import os
2
2
  import requests
3
3
  import atexit
4
4
 
5
- BASE_URL = "https://api.simplex.sh"
5
+ # BASE_URL = "https://api.simplex.sh"
6
+ BASE_URL = "http://localhost:8000"
6
7
 
7
8
  class Simplex:
8
9
  def __init__(self, api_key: str):
@@ -193,11 +194,12 @@ class Simplex:
193
194
  )
194
195
  return response.json()
195
196
 
196
- def scroll(self, pixels: int, cdp_url: str = None):
197
+ def scroll(self, pixels: float, cdp_url: str = None):
197
198
  if not cdp_url and not self.session_id:
198
199
  raise ValueError(f"Must call create_session before calling action scroll with pixels={pixels}")
199
200
 
200
201
  data = {'pixels': pixels}
202
+ print(data)
201
203
 
202
204
  if cdp_url:
203
205
  data['cdp_url'] = cdp_url
@@ -231,4 +233,24 @@ class Simplex:
231
233
  },
232
234
  data=data
233
235
  )
234
- return response.json()
236
+ return response.json()
237
+
238
+ def run_agent(self, prompt: str, cdp_url: str = None):
239
+ if not cdp_url and not self.session_id:
240
+ raise ValueError(f"Must call create_session before calling action run_agent with and prompt='{prompt}'")
241
+
242
+ data = {'prompt': prompt}
243
+
244
+ if cdp_url:
245
+ data['cdp_url'] = cdp_url
246
+ else:
247
+ data['session_id'] = self.session_id
248
+
249
+ response = requests.post(
250
+ f"{BASE_URL}/run-agent",
251
+ headers={
252
+ 'x-api-key': self.api_key
253
+ },
254
+ data=data
255
+ )
256
+ return response.json()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: simplex
3
- Version: 1.2.5
3
+ Version: 1.2.6
4
4
  Summary: Official Python SDK for Simplex API
5
5
  Home-page: https://simplex.sh
6
6
  Author: Simplex Labs, Inc.
@@ -0,0 +1,11 @@
1
+ simplex/__init__.py,sha256=1mbM4XUk0FNW161WOkM4ayC1s_QSsaBEls6PZ0iBScY,74
2
+ simplex/cli.py,sha256=PkHt3sBKYfu0Smil4aCMoZUD-JbPw8xsBewpFcBYDKM,675
3
+ simplex/simplex.py,sha256=qZPxheNfSl8gL_CST2br7K5pqRsdVgct5TBJa5vjsYE,7650
4
+ simplex/deploy/__init__.py,sha256=_JQ81F_Nu7hSAfMA691gzs6a4-8oZ-buJ9h3Au12BKw,96
5
+ simplex/deploy/push.py,sha256=hRAbtFZaECKnBljaOLQ5nzJ6hk7tZgc1c7QdgxKQFoY,6123
6
+ simplex-1.2.6.dist-info/LICENSE,sha256=Xh0SJjYZfNI71pCNMB40aKlBLLuOB0blx5xkTtufFNQ,1075
7
+ simplex-1.2.6.dist-info/METADATA,sha256=HgZl9RcXCuKt9eY_6J_pZBBLisTjgtO02OSEA8NTubM,1349
8
+ simplex-1.2.6.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
9
+ simplex-1.2.6.dist-info/entry_points.txt,sha256=3veL2w3c5vxb3dm8I_M8Fs-370n1ZnvD8uu1nSsL7z8,45
10
+ simplex-1.2.6.dist-info/top_level.txt,sha256=cbMH1bYpN0A3gP-ecibPRHasHoqB-01T_2BUFS8p0CE,8
11
+ simplex-1.2.6.dist-info/RECORD,,
@@ -1,11 +0,0 @@
1
- simplex/__init__.py,sha256=1mbM4XUk0FNW161WOkM4ayC1s_QSsaBEls6PZ0iBScY,74
2
- simplex/cli.py,sha256=PkHt3sBKYfu0Smil4aCMoZUD-JbPw8xsBewpFcBYDKM,675
3
- simplex/simplex.py,sha256=BsAp0UMjgL2MKjdT8akEjDIBajaaf_VCWyvIiDn4i4g,6990
4
- simplex/deploy/__init__.py,sha256=_JQ81F_Nu7hSAfMA691gzs6a4-8oZ-buJ9h3Au12BKw,96
5
- simplex/deploy/push.py,sha256=hRAbtFZaECKnBljaOLQ5nzJ6hk7tZgc1c7QdgxKQFoY,6123
6
- simplex-1.2.5.dist-info/LICENSE,sha256=Xh0SJjYZfNI71pCNMB40aKlBLLuOB0blx5xkTtufFNQ,1075
7
- simplex-1.2.5.dist-info/METADATA,sha256=aTiiF2h8Tgs1g20UWYBuEF3jGSnvzjRYnEhaE2GCCRw,1349
8
- simplex-1.2.5.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
9
- simplex-1.2.5.dist-info/entry_points.txt,sha256=3veL2w3c5vxb3dm8I_M8Fs-370n1ZnvD8uu1nSsL7z8,45
10
- simplex-1.2.5.dist-info/top_level.txt,sha256=cbMH1bYpN0A3gP-ecibPRHasHoqB-01T_2BUFS8p0CE,8
11
- simplex-1.2.5.dist-info/RECORD,,