agenta 0.1.16__py3-none-any.whl → 0.1.18__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 agenta might be problematic. Click here for more details.

agenta/cli/main.py CHANGED
@@ -1,5 +1,6 @@
1
1
  import re
2
2
  import shutil
3
+ import sys
3
4
  from pathlib import Path
4
5
 
5
6
  import click
@@ -36,10 +37,13 @@ def init(app_name: str):
36
37
  if not app_name:
37
38
  while True:
38
39
  app_name = questionary.text('Please enter the app name').ask()
39
- if app_name and re.match('^[a-zA-Z0-9]+$', app_name):
40
+ if app_name and re.match('^[a-zA-Z0-9_]+$', app_name):
40
41
  break
41
42
  else:
42
- print("Invalid input. Please use only alphanumeric characters without spaces.")
43
+ if app_name is None: # User pressed Ctrl+C
44
+ sys.exit(0)
45
+ else:
46
+ print("Invalid input. Please use only alphanumeric characters without spaces.")
43
47
 
44
48
  where_question = questionary.select(
45
49
  "Are you running agenta locally?",
@@ -48,9 +52,11 @@ def init(app_name: str):
48
52
 
49
53
  if where_question == 'Yes':
50
54
  backend_host = "http://localhost"
51
- else:
55
+ elif where_question == 'No':
52
56
  backend_host = questionary.text(
53
57
  'Please provide the IP or URL of your remote host').ask()
58
+ elif where_question is None: # User pressed Ctrl+C
59
+ sys.exit(0)
54
60
  backend_host = backend_host if backend_host.startswith(
55
61
  'http://') or backend_host.startswith('https://') else 'http://'+backend_host
56
62
 
@@ -85,6 +91,8 @@ def init(app_name: str):
85
91
  for file in chosen_template_dir.glob("*"):
86
92
  if file.name != 'template.toml' and not file.is_dir():
87
93
  shutil.copy(file, current_dir / file.name)
94
+ elif init_option is None: # User pressed Ctrl+C
95
+ sys.exit(0)
88
96
  click.echo("App initialized successfully")
89
97
  if init_option == 'Start from template':
90
98
  click.echo("Please check the README.md for further instructions to setup the template.")
agenta/sdk/agenta.py CHANGED
@@ -66,7 +66,7 @@ def ingest(func: Callable[..., Any]):
66
66
  try:
67
67
  return func(*args, **kwargs)
68
68
  except Exception as e:
69
- traceback_str = ''.join(traceback.format_exception(etype=type(e), value=e, tb=e.__traceback__))
69
+ traceback_str = ''.join(traceback.format_exception(None, e, e.__traceback__))
70
70
  return JSONResponse(status_code=500, content={"error": str(e), "traceback": traceback_str})
71
71
 
72
72
  new_params = []
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: agenta
3
- Version: 0.1.16
3
+ Version: 0.1.18
4
4
  Summary: Code for the SDK and CLI for the Agenta Lab platform
5
5
  Author: Mahmoud Mabrouk
6
6
  Author-email: mahmoudmabrouk.mail@gmail.com
@@ -1,6 +1,6 @@
1
1
  agenta/__init__.py,sha256=TqCcA0MJb_SwAH7oX2NZUDAFmAMnpopR5wQZ-NCdaAc,167
2
2
  agenta/cli/helper.py,sha256=w5bVUN6N0JoiDHTC2yzbOAG8d_V8FKYZpgwlV5OeV1s,2445
3
- agenta/cli/main.py,sha256=mKiI0arELLzjRDg6VlDAx5Ex1Mt0Ikon6vQ_uw23HrQ,3452
3
+ agenta/cli/main.py,sha256=VRfkkJzr9Z_8uR-vdXabgKw5Te8d4j7NM5rHZ3iNVEE,3754
4
4
  agenta/cli/variant_commands.py,sha256=IVHQ-Zk6vXbgmabQ5GploO-W1q_26dwc7e6sFnYXhm0,9574
5
5
  agenta/client/Readme.md,sha256=umhMce1Gq_der9pH4M_pP4NQ8rHa3MENJLM9OrdUZ50,131
6
6
  agenta/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -14,7 +14,7 @@ agenta/docker/docker-assets/entrypoint.sh,sha256=609un15YyEIKZ2k06hXAQs1DpZAJ2Lk
14
14
  agenta/docker/docker-assets/main.py,sha256=6wFpQOgw_SrztJGc8uesnvYh-gjnFSWq1xK7hqGY5vw,326
15
15
  agenta/docker/docker_utils.py,sha256=nR37m71H31-Mp2mV1_Su__juXAyKroOjhpWjyuNC9D4,4344
16
16
  agenta/sdk/__init__.py,sha256=HSa94-ynZoEbH3dDn-owMkSmvk_AwjQwK9wKVJX1ZUM,241
17
- agenta/sdk/agenta.py,sha256=PVLoztZVQJiPbWFZWDtyfIaOMM0cB4Inu6IvOZIuAXg,7108
17
+ agenta/sdk/agenta.py,sha256=HSRoPAGmCtrJDwZsUz68ytBHsfYx4wNJRJFloPZqmvs,7090
18
18
  agenta/sdk/context.py,sha256=EI6g8mNdG26JoWTSeg6t5t9ThegoIZ3_rB5Qj-JQYEI,864
19
19
  agenta/sdk/init.py,sha256=0CuErDz4uFEWN8Av_yIIGltHR4KpWbnHMucMZ7uSgRk,87
20
20
  agenta/sdk/router.py,sha256=zBuwaFCNDnTltzK_edrb19BeZfLad1smCiB2zIBOd5U,202
@@ -24,7 +24,7 @@ agenta/templates/simple_prompt/app.py,sha256=uNRiM6vaI2yXPFmPP4Yd5iepZwuS3__Mw9b
24
24
  agenta/templates/simple_prompt/env.example,sha256=g9AE5bYcGPpxawXMJ96gh8oenEPCHTabsiOnfQo3c5k,70
25
25
  agenta/templates/simple_prompt/requirements.txt,sha256=ywRglRy7pPkw8bljmMEJJ4aOOQKrt9FGKULZ-DGkoBU,23
26
26
  agenta/templates/simple_prompt/template.toml,sha256=DQBtRrF4GU8LBEXOZ-GGuINXMQDKGTEG5y37tnvIUIE,60
27
- agenta-0.1.16.dist-info/METADATA,sha256=ZKmP0oByJY4HBWC8Z7O0sgXZ-tjYb4PeoomFVyooUlY,1027
28
- agenta-0.1.16.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
29
- agenta-0.1.16.dist-info/entry_points.txt,sha256=PDiu8_8AsL7ibU9v4iNoOKR1S7F2rdxjlEprjM9QOgo,46
30
- agenta-0.1.16.dist-info/RECORD,,
27
+ agenta-0.1.18.dist-info/METADATA,sha256=bgKydPC2Csp6g2Qg448Cphi60mLL5aVnXjNxT_pDH2s,1027
28
+ agenta-0.1.18.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
29
+ agenta-0.1.18.dist-info/entry_points.txt,sha256=PDiu8_8AsL7ibU9v4iNoOKR1S7F2rdxjlEprjM9QOgo,46
30
+ agenta-0.1.18.dist-info/RECORD,,