simplex 1.2.77__py3-none-any.whl → 1.2.80__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/__init__.py +2 -2
- simplex/simplex.py +28 -3
- {simplex-1.2.77.dist-info → simplex-1.2.80.dist-info}/METADATA +1 -1
- simplex-1.2.80.dist-info/RECORD +11 -0
- simplex-1.2.77.dist-info/RECORD +0 -11
- {simplex-1.2.77.dist-info → simplex-1.2.80.dist-info}/LICENSE +0 -0
- {simplex-1.2.77.dist-info → simplex-1.2.80.dist-info}/WHEEL +0 -0
- {simplex-1.2.77.dist-info → simplex-1.2.80.dist-info}/entry_points.txt +0 -0
- {simplex-1.2.77.dist-info → simplex-1.2.80.dist-info}/top_level.txt +0 -0
simplex/__init__.py
CHANGED
simplex/simplex.py
CHANGED
|
@@ -24,7 +24,6 @@ except ImportError:
|
|
|
24
24
|
ImportWarning
|
|
25
25
|
)
|
|
26
26
|
|
|
27
|
-
# BASE_URL = "https://simplex-dev-shreya--api-server-and-container-service-fas-bba69e.modal.run"
|
|
28
27
|
# BASE_URL = "https://simplex-dev--api-server-and-container-service-fastapi-app.modal.run"
|
|
29
28
|
BASE_URL = "https://api.simplex.sh"
|
|
30
29
|
|
|
@@ -262,7 +261,32 @@ class Simplex:
|
|
|
262
261
|
return response.json()['captcha_solved']
|
|
263
262
|
else:
|
|
264
263
|
raise ValueError(f"Failed to wait for captcha: {response.json()['error']}")
|
|
264
|
+
|
|
265
|
+
def agentic(self, task: str, max_steps: Optional[int] = 10):
|
|
266
|
+
if not self.session_id:
|
|
267
|
+
raise ValueError(f"Must call create_session before calling action agentic with task='{task}'")
|
|
265
268
|
|
|
269
|
+
data = {
|
|
270
|
+
'task': task,
|
|
271
|
+
'session_id': self.session_id,
|
|
272
|
+
'max_steps': max_steps
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
response = requests.post(
|
|
276
|
+
f"{BASE_URL}/agentic",
|
|
277
|
+
headers={
|
|
278
|
+
'x-api-key': self.api_key
|
|
279
|
+
},
|
|
280
|
+
data=data
|
|
281
|
+
)
|
|
282
|
+
|
|
283
|
+
if 'succeeded' not in response.json():
|
|
284
|
+
raise ValueError(f"It looks like the agentic action failed to return a response. Did you set your api_key when creating the Simplex class?")
|
|
285
|
+
if response.json()['succeeded']:
|
|
286
|
+
return
|
|
287
|
+
else:
|
|
288
|
+
raise ValueError(f"Failed to complete agentic task: {response.json()['error']}")
|
|
289
|
+
|
|
266
290
|
def click(self, element_description: str, dropdown_option: bool = False, override_fail_state: bool = False):
|
|
267
291
|
if not element_description or not element_description.strip():
|
|
268
292
|
raise ValueError("element_description cannot be empty")
|
|
@@ -399,7 +423,7 @@ class Simplex:
|
|
|
399
423
|
else:
|
|
400
424
|
raise ValueError(f"Failed to hover: {response.json()['error']}")
|
|
401
425
|
|
|
402
|
-
def type(self, text: str, override_fail_state: bool = False):
|
|
426
|
+
def type(self, text: str, is_password: bool = False, override_fail_state: bool = False):
|
|
403
427
|
if not text or not text.strip():
|
|
404
428
|
raise ValueError("text cannot be empty")
|
|
405
429
|
if not self.session_id:
|
|
@@ -408,7 +432,8 @@ class Simplex:
|
|
|
408
432
|
data = {
|
|
409
433
|
'text': text,
|
|
410
434
|
'session_id': self.session_id,
|
|
411
|
-
'override_fail_state': override_fail_state
|
|
435
|
+
'override_fail_state': override_fail_state,
|
|
436
|
+
'is_password': is_password
|
|
412
437
|
}
|
|
413
438
|
|
|
414
439
|
response = requests.post(
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
simplex/__init__.py,sha256=GDLe-j8I1LGm6oWr-4pZtUpatdH3aGAqiUYH42p0CXA,97
|
|
2
|
+
simplex/cli.py,sha256=0K_pzoVdF7vfTJPUONhFzzTvjZk2M7FZPpEONjZWJC8,2268
|
|
3
|
+
simplex/simplex.py,sha256=YR_Ib_xTcTjAxY3xsBxNiOh-0Ob8BL4Xe2Yh7znK5zM,40471
|
|
4
|
+
simplex/deploy/__init__.py,sha256=_JQ81F_Nu7hSAfMA691gzs6a4-8oZ-buJ9h3Au12BKw,96
|
|
5
|
+
simplex/deploy/push.py,sha256=hRAbtFZaECKnBljaOLQ5nzJ6hk7tZgc1c7QdgxKQFoY,6123
|
|
6
|
+
simplex-1.2.80.dist-info/LICENSE,sha256=Xh0SJjYZfNI71pCNMB40aKlBLLuOB0blx5xkTtufFNQ,1075
|
|
7
|
+
simplex-1.2.80.dist-info/METADATA,sha256=pfpiWaKa-RzknUYE4SWFYj1c7xpnDIkZm2qY0DnquME,1055
|
|
8
|
+
simplex-1.2.80.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
9
|
+
simplex-1.2.80.dist-info/entry_points.txt,sha256=3veL2w3c5vxb3dm8I_M8Fs-370n1ZnvD8uu1nSsL7z8,45
|
|
10
|
+
simplex-1.2.80.dist-info/top_level.txt,sha256=cbMH1bYpN0A3gP-ecibPRHasHoqB-01T_2BUFS8p0CE,8
|
|
11
|
+
simplex-1.2.80.dist-info/RECORD,,
|
simplex-1.2.77.dist-info/RECORD
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
simplex/__init__.py,sha256=L_5i__xt_ZDkr6e-Wx9cr84t9sXpioOT7j01NJYJCTE,75
|
|
2
|
-
simplex/cli.py,sha256=0K_pzoVdF7vfTJPUONhFzzTvjZk2M7FZPpEONjZWJC8,2268
|
|
3
|
-
simplex/simplex.py,sha256=8imu_aoSf2v5nfS1dfNwxRtVV9wPrnoEsiMewWpJkDE,39615
|
|
4
|
-
simplex/deploy/__init__.py,sha256=_JQ81F_Nu7hSAfMA691gzs6a4-8oZ-buJ9h3Au12BKw,96
|
|
5
|
-
simplex/deploy/push.py,sha256=hRAbtFZaECKnBljaOLQ5nzJ6hk7tZgc1c7QdgxKQFoY,6123
|
|
6
|
-
simplex-1.2.77.dist-info/LICENSE,sha256=Xh0SJjYZfNI71pCNMB40aKlBLLuOB0blx5xkTtufFNQ,1075
|
|
7
|
-
simplex-1.2.77.dist-info/METADATA,sha256=Iwc1GRQQ6Nmw2dRZjv2u8-bVxGCDuwuHW7vgn_Edkc4,1055
|
|
8
|
-
simplex-1.2.77.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
9
|
-
simplex-1.2.77.dist-info/entry_points.txt,sha256=3veL2w3c5vxb3dm8I_M8Fs-370n1ZnvD8uu1nSsL7z8,45
|
|
10
|
-
simplex-1.2.77.dist-info/top_level.txt,sha256=cbMH1bYpN0A3gP-ecibPRHasHoqB-01T_2BUFS8p0CE,8
|
|
11
|
-
simplex-1.2.77.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|