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.
- {agenta-0.2.0 → agenta-0.2.2}/PKG-INFO +1 -1
- {agenta-0.2.0 → agenta-0.2.2}/agenta/client/client.py +3 -1
- {agenta-0.2.0 → agenta-0.2.2}/agenta/docker/docker_utils.py +2 -1
- {agenta-0.2.0 → agenta-0.2.2}/agenta/sdk/agenta.py +10 -4
- {agenta-0.2.0 → agenta-0.2.2}/agenta/sdk/types.py +17 -3
- {agenta-0.2.0 → agenta-0.2.2}/agenta/templates/simple_prompt/app.py +4 -1
- {agenta-0.2.0 → agenta-0.2.2}/pyproject.toml +1 -1
- {agenta-0.2.0 → agenta-0.2.2}/README.md +0 -0
- {agenta-0.2.0 → agenta-0.2.2}/agenta/__init__.py +0 -0
- {agenta-0.2.0 → agenta-0.2.2}/agenta/cli/helper.py +0 -0
- {agenta-0.2.0 → agenta-0.2.2}/agenta/cli/main.py +0 -0
- {agenta-0.2.0 → agenta-0.2.2}/agenta/cli/variant_commands.py +0 -0
- {agenta-0.2.0 → agenta-0.2.2}/agenta/client/Readme.md +0 -0
- {agenta-0.2.0 → agenta-0.2.2}/agenta/client/__init__.py +0 -0
- {agenta-0.2.0 → agenta-0.2.2}/agenta/client/api_models.py +0 -0
- {agenta-0.2.0 → agenta-0.2.2}/agenta/config.py +0 -0
- {agenta-0.2.0 → agenta-0.2.2}/agenta/config.toml +0 -0
- {agenta-0.2.0 → agenta-0.2.2}/agenta/docker/docker-assets/Dockerfile.template +0 -0
- {agenta-0.2.0 → agenta-0.2.2}/agenta/docker/docker-assets/README.md +0 -0
- {agenta-0.2.0 → agenta-0.2.2}/agenta/docker/docker-assets/entrypoint.sh +0 -0
- {agenta-0.2.0 → agenta-0.2.2}/agenta/docker/docker-assets/main.py +0 -0
- {agenta-0.2.0 → agenta-0.2.2}/agenta/sdk/__init__.py +0 -0
- {agenta-0.2.0 → agenta-0.2.2}/agenta/sdk/context.py +0 -0
- {agenta-0.2.0 → agenta-0.2.2}/agenta/sdk/init.py +0 -0
- {agenta-0.2.0 → agenta-0.2.2}/agenta/sdk/router.py +0 -0
- {agenta-0.2.0 → agenta-0.2.2}/agenta/templates/simple_prompt/README.md +0 -0
- {agenta-0.2.0 → agenta-0.2.2}/agenta/templates/simple_prompt/env.example +0 -0
- {agenta-0.2.0 → agenta-0.2.2}/agenta/templates/simple_prompt/requirements.txt +0 -0
- {agenta-0.2.0 → agenta-0.2.2}/agenta/templates/simple_prompt/template.toml +0 -0
|
@@ -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={
|
|
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",
|
|
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,
|
|
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}",
|
|
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,
|
|
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}",
|
|
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
|
-
{
|
|
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
|
-
{
|
|
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
|
-
{
|
|
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(
|
|
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
|
|
|
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
|
|
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
|