agenta 0.2.0__py3-none-any.whl → 0.2.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.

Potentially problematic release.


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

agenta/client/client.py CHANGED
@@ -134,7 +134,9 @@ def send_docker_tar(
134
134
  with tar_path.open("rb") as tar_file:
135
135
  response = requests.post(
136
136
  f"{host}/{BACKEND_URL_SUFFIX}/containers/build_image/?app_name={app_name}&variant_name={variant_name}",
137
- files={"tar_file": tar_file,},
137
+ files={
138
+ "tar_file": tar_file,
139
+ },
138
140
  timeout=1200,
139
141
  )
140
142
 
@@ -106,7 +106,8 @@ def build_and_upload_docker_image(
106
106
  # TODO: Later do this in the temp dir
107
107
  dockerfile_path = create_dockerfile(folder)
108
108
  shutil.copytree(
109
- Path(__file__).parent.parent / "sdk", folder / "agenta",
109
+ Path(__file__).parent.parent / "sdk",
110
+ folder / "agenta",
110
111
  )
111
112
  shutil.copy(Path(__file__).parent / "docker-assets" / "main.py", folder)
112
113
  shutil.copy(Path(__file__).parent / "docker-assets" / "entrypoint.sh", folder)
agenta/sdk/agenta.py CHANGED
@@ -83,7 +83,8 @@ def ingest(func: Callable[..., Any]):
83
83
  traceback.format_exception(None, e, e.__traceback__)
84
84
  )
85
85
  return JSONResponse(
86
- status_code=500, content={"error": str(e), "traceback": traceback_str},
86
+ status_code=500,
87
+ content={"error": str(e), "traceback": traceback_str},
87
88
  )
88
89
 
89
90
  new_params = []
@@ -127,7 +128,9 @@ def ingest(func: Callable[..., Any]):
127
128
  if name in app_params:
128
129
  # For optional parameters, we add them as options
129
130
  parser.add_argument(
130
- f"--{name}", type=type(param.default), default=param.default,
131
+ f"--{name}",
132
+ type=type(param.default),
133
+ default=param.default,
131
134
  )
132
135
  elif name in ingestible_files:
133
136
  parser.add_argument(name, type=str)
@@ -177,7 +180,8 @@ def post(func: Callable[..., Any]):
177
180
  traceback.format_exception(e, value=e, tb=e.__traceback__)
178
181
  )
179
182
  return JSONResponse(
180
- status_code=500, content={"error": str(e), "traceback": traceback_str},
183
+ status_code=500,
184
+ content={"error": str(e), "traceback": traceback_str},
181
185
  )
182
186
 
183
187
  new_params = []
@@ -230,7 +234,9 @@ def post(func: Callable[..., Any]):
230
234
  )
231
235
  else:
232
236
  parser.add_argument(
233
- f"--{name}", type=type(param.default), default=param.default,
237
+ f"--{name}",
238
+ type=type(param.default),
239
+ default=param.default,
234
240
  )
235
241
  else:
236
242
  # For required parameters, we add them as arguments
agenta/sdk/types.py CHANGED
@@ -39,7 +39,12 @@ class IntParam(int):
39
39
  @classmethod
40
40
  def __modify_schema__(cls, field_schema):
41
41
  field_schema.update(
42
- {"x-parameter": "int", "type": "integer", "minimum": 1, "maximum": 10,}
42
+ {
43
+ "x-parameter": "int",
44
+ "type": "integer",
45
+ "minimum": 1,
46
+ "maximum": 10,
47
+ }
43
48
  )
44
49
 
45
50
 
@@ -53,7 +58,12 @@ class FloatParam(float):
53
58
  @classmethod
54
59
  def __modify_schema__(cls, field_schema):
55
60
  field_schema.update(
56
- {"x-parameter": "float", "type": "number", "minimum": 0.0, "maximum": 1.0,}
61
+ {
62
+ "x-parameter": "float",
63
+ "type": "number",
64
+ "minimum": 0.0,
65
+ "maximum": 1.0,
66
+ }
57
67
  )
58
68
 
59
69
 
@@ -79,7 +89,11 @@ class MultipleChoiceParam(str):
79
89
  @classmethod
80
90
  def __modify_schema__(cls, field_schema: dict[str, Any]):
81
91
  field_schema.update(
82
- {"x-parameter": "choice", "type": "string", "enum": [],}
92
+ {
93
+ "x-parameter": "choice",
94
+ "type": "string",
95
+ "enum": [],
96
+ }
83
97
  )
84
98
 
85
99
 
@@ -13,7 +13,10 @@ def generate(
13
13
  prompt_template: ag.TextParam = default_prompt,
14
14
  ) -> str:
15
15
  llm = OpenAI(temperature=temperature)
16
- prompt = PromptTemplate(input_variables=["product"], template=prompt_template,)
16
+ prompt = PromptTemplate(
17
+ input_variables=["product"],
18
+ template=prompt_template,
19
+ )
17
20
  chain = LLMChain(llm=llm, prompt=prompt)
18
21
  output = chain.run(product=product)
19
22
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: agenta
3
- Version: 0.2.0
3
+ Version: 0.2.2
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
@@ -5,26 +5,26 @@ agenta/cli/variant_commands.py,sha256=Rw45rhEOWMar7qnPrb_yAiDtRIsCgHOf8Y-FVNxsYv
5
5
  agenta/client/Readme.md,sha256=umhMce1Gq_der9pH4M_pP4NQ8rHa3MENJLM9OrdUZ50,131
6
6
  agenta/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  agenta/client/api_models.py,sha256=gqIIZay_A7kg2d451gO9QTgaKxGuAk3YKtWtArIzMNw,325
8
- agenta/client/client.py,sha256=OAeTERiYjC5-snjfyI52gZYKjO45Ikx60_mIT1XYQ3Y,5416
8
+ agenta/client/client.py,sha256=iFQKVq2zZ0sw7Ph246byZdwY0GhKXFM0NaQfF07i0CI,5446
9
9
  agenta/config.py,sha256=toEpBx8PjBC6P_22vLRlyMn0gu-P4CR0qPTgrUMFoiw,630
10
10
  agenta/config.toml,sha256=un4IS3NUcJczZS2LrjPCOShx8W9aw0XIoabZKfqZAWw,198
11
11
  agenta/docker/docker-assets/Dockerfile.template,sha256=hIEfOD58RdQ56GbyNZGu3vsDSAknbA44lQWxWLRVMbo,282
12
12
  agenta/docker/docker-assets/README.md,sha256=XHxwh2ks_ozrtAU7SLbL3J14SB2holG6buoTxwmMiZM,102
13
13
  agenta/docker/docker-assets/entrypoint.sh,sha256=29XK8VQjQsx4hN2j-4JDy-6kQb5y4LCqZEa7PD4eqCQ,74
14
14
  agenta/docker/docker-assets/main.py,sha256=BbmbFByRQ8MzL8402pJryEF34t6ba1i_JrMtWMAQDQ4,327
15
- agenta/docker/docker_utils.py,sha256=3jr1EiDX2wyN6--9h2zwyDdWMxH68-L14RIiv6fZ_Qc,4949
15
+ agenta/docker/docker_utils.py,sha256=N-tmbHp6XpH1azevJanxf8qVEOE7wm4F5cZs4-5zoH4,4961
16
16
  agenta/sdk/__init__.py,sha256=L1gRP0s2LPgCokt1NSg80pY8nTClQvBH0Fv6FCIo2wc,316
17
- agenta/sdk/agenta.py,sha256=MHiYeir0-QeRoWa5Xn5geLu2LD6wEF2vif42wWWk-zQ,10630
17
+ agenta/sdk/agenta.py,sha256=6cx5aJQyxlQqvmeoLqeJ3-tforqL1ItFTo5jDAEj3eg,10750
18
18
  agenta/sdk/context.py,sha256=q-PxL05-I84puunUAs9LGsffEXcYhDxhQxjuOz2vK90,901
19
19
  agenta/sdk/init.py,sha256=0CuErDz4uFEWN8Av_yIIGltHR4KpWbnHMucMZ7uSgRk,87
20
20
  agenta/sdk/router.py,sha256=zBuwaFCNDnTltzK_edrb19BeZfLad1smCiB2zIBOd5U,202
21
- agenta/sdk/types.py,sha256=mXLkt5CqD2Nn-e3GedLnRG313Meox4WlubRGwZ2t2y8,2860
21
+ agenta/sdk/types.py,sha256=79vEANLaygI6PtXoNWnC1Y4ieT8qXDoRdTaE-fZeypQ,3078
22
22
  agenta/templates/simple_prompt/README.md,sha256=ss7vZPpI1Hg0VmYtFliwq_r5LnqbCy_S5OQDXg8UoIA,308
23
- agenta/templates/simple_prompt/app.py,sha256=Z7pjNxDoP2xbzM8FRpMXf5Ha_nmDhIdqbrD1oQTLLo0,586
23
+ agenta/templates/simple_prompt/app.py,sha256=0Q-h-GQ4gOU_uBKJnT7xo-j3EUAqb7rHaGinI-Wdh9I,608
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.2.0.dist-info/METADATA,sha256=7zXYqmQnepaFnZOaTIYaLDaE5h2GSwRMTGsbqWOWavE,1026
28
- agenta-0.2.0.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
29
- agenta-0.2.0.dist-info/entry_points.txt,sha256=PDiu8_8AsL7ibU9v4iNoOKR1S7F2rdxjlEprjM9QOgo,46
30
- agenta-0.2.0.dist-info/RECORD,,
27
+ agenta-0.2.2.dist-info/METADATA,sha256=Dp-P5rVQxs0Txi1wxeHEcjto90fZSoQ3UAdlkbl9XDM,1026
28
+ agenta-0.2.2.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
29
+ agenta-0.2.2.dist-info/entry_points.txt,sha256=PDiu8_8AsL7ibU9v4iNoOKR1S7F2rdxjlEprjM9QOgo,46
30
+ agenta-0.2.2.dist-info/RECORD,,
File without changes