agenta 0.2.0__tar.gz → 0.2.2__tar.gz

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.

Files changed (29) hide show
  1. {agenta-0.2.0 → agenta-0.2.2}/PKG-INFO +1 -1
  2. {agenta-0.2.0 → agenta-0.2.2}/agenta/client/client.py +3 -1
  3. {agenta-0.2.0 → agenta-0.2.2}/agenta/docker/docker_utils.py +2 -1
  4. {agenta-0.2.0 → agenta-0.2.2}/agenta/sdk/agenta.py +10 -4
  5. {agenta-0.2.0 → agenta-0.2.2}/agenta/sdk/types.py +17 -3
  6. {agenta-0.2.0 → agenta-0.2.2}/agenta/templates/simple_prompt/app.py +4 -1
  7. {agenta-0.2.0 → agenta-0.2.2}/pyproject.toml +1 -1
  8. {agenta-0.2.0 → agenta-0.2.2}/README.md +0 -0
  9. {agenta-0.2.0 → agenta-0.2.2}/agenta/__init__.py +0 -0
  10. {agenta-0.2.0 → agenta-0.2.2}/agenta/cli/helper.py +0 -0
  11. {agenta-0.2.0 → agenta-0.2.2}/agenta/cli/main.py +0 -0
  12. {agenta-0.2.0 → agenta-0.2.2}/agenta/cli/variant_commands.py +0 -0
  13. {agenta-0.2.0 → agenta-0.2.2}/agenta/client/Readme.md +0 -0
  14. {agenta-0.2.0 → agenta-0.2.2}/agenta/client/__init__.py +0 -0
  15. {agenta-0.2.0 → agenta-0.2.2}/agenta/client/api_models.py +0 -0
  16. {agenta-0.2.0 → agenta-0.2.2}/agenta/config.py +0 -0
  17. {agenta-0.2.0 → agenta-0.2.2}/agenta/config.toml +0 -0
  18. {agenta-0.2.0 → agenta-0.2.2}/agenta/docker/docker-assets/Dockerfile.template +0 -0
  19. {agenta-0.2.0 → agenta-0.2.2}/agenta/docker/docker-assets/README.md +0 -0
  20. {agenta-0.2.0 → agenta-0.2.2}/agenta/docker/docker-assets/entrypoint.sh +0 -0
  21. {agenta-0.2.0 → agenta-0.2.2}/agenta/docker/docker-assets/main.py +0 -0
  22. {agenta-0.2.0 → agenta-0.2.2}/agenta/sdk/__init__.py +0 -0
  23. {agenta-0.2.0 → agenta-0.2.2}/agenta/sdk/context.py +0 -0
  24. {agenta-0.2.0 → agenta-0.2.2}/agenta/sdk/init.py +0 -0
  25. {agenta-0.2.0 → agenta-0.2.2}/agenta/sdk/router.py +0 -0
  26. {agenta-0.2.0 → agenta-0.2.2}/agenta/templates/simple_prompt/README.md +0 -0
  27. {agenta-0.2.0 → agenta-0.2.2}/agenta/templates/simple_prompt/env.example +0 -0
  28. {agenta-0.2.0 → agenta-0.2.2}/agenta/templates/simple_prompt/requirements.txt +0 -0
  29. {agenta-0.2.0 → agenta-0.2.2}/agenta/templates/simple_prompt/template.toml +0 -0
@@ -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
@@ -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)
@@ -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
@@ -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
  [tool.poetry]
2
2
  name = "agenta"
3
- version = "0.2.0"
3
+ version = "0.2.2"
4
4
  description = "Code for the SDK and CLI for the Agenta Lab platform"
5
5
  authors = ["Mahmoud Mabrouk <mahmoudmabrouk.mail@gmail.com>"]
6
6
  readme = "README.md"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes