pygeai 0.2.7b53__py3-none-any.whl → 0.2.7b54__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.
@@ -1,10 +1,8 @@
1
- import json
2
-
3
1
  from pygeai import logger
4
2
  from pygeai.cli.commands import Command, Option, ArgumentsEnum
5
3
  from pygeai.cli.commands.builders import build_help_text
6
4
  from pygeai.cli.texts.help import SPEC_HELP_TEXT
7
- from pygeai.core.common.exceptions import MissingRequirementException, WrongArgumentError
5
+ from pygeai.core.common.exceptions import MissingRequirementException
8
6
 
9
7
  from pygeai.core.utils.console import Console
10
8
  from pygeai.lab.managers import AILabManager
@@ -21,38 +19,31 @@ def show_help():
21
19
 
22
20
 
23
21
  def load_agent(option_list: list):
24
- project_id = None
25
22
  file = None
26
23
  automatic_publish = False
27
24
 
28
25
  for option_flag, option_arg in option_list:
29
- if option_flag.name == "project_id":
30
- project_id = option_arg
31
26
  if option_flag.name == "file":
32
27
  file = option_arg
33
28
  if option_flag.name == "automatic_publish":
34
29
  automatic_publish = option_arg
35
30
 
36
- if not project_id:
37
- raise MissingRequirementException("Project ID must be defined.")
38
-
39
31
  if not file:
40
32
  raise MissingRequirementException("Cannot load agent definition without specifying path to JSON file.")
41
33
 
42
34
  agent_data = JSONLoader.load_data(file_path=file)
43
35
  if isinstance(agent_data, dict):
44
36
  agent = AgentParser.get_agent(agent_data)
45
- create_agent(project_id, agent, automatic_publish)
37
+ create_agent(agent, automatic_publish)
46
38
  elif isinstance(agent_data, list):
47
39
  for agent_spec in agent_data:
48
40
  agent = AgentParser.get_agent(agent_spec)
49
- create_agent(project_id, agent, automatic_publish)
41
+ create_agent(agent, automatic_publish)
50
42
 
51
43
 
52
- def create_agent(project_id, agent, automatic_publish):
44
+ def create_agent(agent, automatic_publish):
53
45
  try:
54
46
  created_agent = AILabManager().create_agent(
55
- project_id=project_id,
56
47
  agent=agent,
57
48
  automatic_publish=automatic_publish
58
49
  )
@@ -64,12 +55,6 @@ def create_agent(project_id, agent, automatic_publish):
64
55
 
65
56
 
66
57
  load_agent_options = [
67
- Option(
68
- "project_id",
69
- ["--project-id", "--pid"],
70
- "ID of the project",
71
- True
72
- ),
73
58
  Option(
74
59
  "file",
75
60
  ["--file", "-f"],
@@ -86,38 +71,31 @@ load_agent_options = [
86
71
 
87
72
 
88
73
  def load_tool(option_list: list):
89
- project_id = None
90
74
  file = None
91
75
  automatic_publish = False
92
76
 
93
77
  for option_flag, option_arg in option_list:
94
- if option_flag.name == "project_id":
95
- project_id = option_arg
96
78
  if option_flag.name == "file":
97
79
  file = option_arg
98
80
  if option_flag.name == "automatic_publish":
99
81
  automatic_publish = option_arg
100
82
 
101
- if not project_id:
102
- raise MissingRequirementException("Project ID must be defined.")
103
-
104
83
  if not file:
105
84
  raise MissingRequirementException("Cannot load tool definition without specifying path to JSON file.")
106
85
 
107
86
  tool_data = JSONLoader.load_data(file_path=file)
108
87
  if isinstance(tool_data, dict):
109
88
  tool = ToolParser.get_tool(tool_data)
110
- create_tool(project_id, tool, automatic_publish)
89
+ create_tool(tool, automatic_publish)
111
90
  elif isinstance(tool_data, list):
112
91
  for tool_spec in tool_data:
113
92
  tool = ToolParser.get_tool(tool_spec)
114
- create_tool(project_id, tool, automatic_publish)
93
+ create_tool(tool, automatic_publish)
115
94
 
116
95
 
117
- def create_tool(project_id, tool, automatic_publish):
96
+ def create_tool(tool, automatic_publish):
118
97
  try:
119
98
  created_tool = AILabManager().create_tool(
120
- project_id=project_id,
121
99
  tool=tool,
122
100
  automatic_publish=automatic_publish
123
101
  )
@@ -128,12 +106,6 @@ def create_tool(project_id, tool, automatic_publish):
128
106
 
129
107
 
130
108
  load_tool_options = [
131
- Option(
132
- "project_id",
133
- ["--project-id", "--pid"],
134
- "ID of the project",
135
- True
136
- ),
137
109
  Option(
138
110
  "file",
139
111
  ["--file", "-f"],
@@ -150,38 +122,31 @@ load_tool_options = [
150
122
 
151
123
 
152
124
  def load_task(option_list: list):
153
- project_id = None
154
125
  file = None
155
126
  automatic_publish = False
156
127
 
157
128
  for option_flag, option_arg in option_list:
158
- if option_flag.name == "project_id":
159
- project_id = option_arg
160
129
  if option_flag.name == "file":
161
130
  file = option_arg
162
131
  if option_flag.name == "automatic_publish":
163
132
  automatic_publish = option_arg
164
133
 
165
- if not project_id:
166
- raise MissingRequirementException("Project ID must be defined.")
167
-
168
134
  if not file:
169
135
  raise MissingRequirementException("Cannot load task definition without specifying path to JSON file.")
170
136
 
171
137
  task_data = JSONLoader.load_data(file_path=file)
172
138
  if isinstance(task_data, dict):
173
139
  task = TaskParser.get_task(task_data)
174
- create_task(project_id, task, automatic_publish)
140
+ create_task(task, automatic_publish)
175
141
  elif isinstance(task_data, list):
176
142
  for task_spec in task_data:
177
143
  task = TaskParser.get_task(task_spec)
178
- create_task(project_id, task, automatic_publish)
144
+ create_task(task, automatic_publish)
179
145
 
180
146
 
181
- def create_task(project_id, task, automatic_publish):
147
+ def create_task(task, automatic_publish):
182
148
  try:
183
149
  created_task = AILabManager().create_task(
184
- project_id=project_id,
185
150
  task=task,
186
151
  automatic_publish=automatic_publish
187
152
  )
@@ -192,12 +157,6 @@ def create_task(project_id, task, automatic_publish):
192
157
 
193
158
 
194
159
  load_task_options = [
195
- Option(
196
- "project_id",
197
- ["--project-id", "--pid"],
198
- "ID of the project",
199
- True
200
- ),
201
160
  Option(
202
161
  "file",
203
162
  ["--file", "-f"],
@@ -214,20 +173,15 @@ load_task_options = [
214
173
 
215
174
 
216
175
  def load_agentic_process(option_list: list):
217
- project_id = None
218
176
  file = None
219
177
  automatic_publish = False
220
178
 
221
179
  for option_flag, option_arg in option_list:
222
- if option_flag.name == "project_id":
223
- project_id = option_arg
224
180
  if option_flag.name == "file":
225
181
  file = option_arg
226
182
  if option_flag.name == "automatic_publish":
227
183
  automatic_publish = option_arg
228
184
 
229
- if not project_id:
230
- raise MissingRequirementException("Project ID must be defined.")
231
185
 
232
186
  if not file:
233
187
  raise MissingRequirementException("Cannot load agentic process definition without specifying path to JSON file.")
@@ -235,17 +189,16 @@ def load_agentic_process(option_list: list):
235
189
  process_data = JSONLoader.load_data(file_path=file)
236
190
  if isinstance(process_data, dict):
237
191
  process = AgenticProcessParser.get_agentic_process(process_data)
238
- create_agentic_process(project_id, process, automatic_publish)
192
+ create_agentic_process(process, automatic_publish)
239
193
  elif isinstance(process_data, list):
240
194
  for process_spec in process_data:
241
195
  process = AgenticProcessParser.get_agentic_process(process_spec)
242
- create_agentic_process(project_id, process, automatic_publish)
196
+ create_agentic_process(process, automatic_publish)
243
197
 
244
198
 
245
- def create_agentic_process(project_id, process, automatic_publish):
199
+ def create_agentic_process(process, automatic_publish):
246
200
  try:
247
201
  created_process = AILabManager().create_process(
248
- project_id=project_id,
249
202
  process=process,
250
203
  automatic_publish=automatic_publish
251
204
  )
@@ -256,12 +209,6 @@ def create_agentic_process(project_id, process, automatic_publish):
256
209
 
257
210
 
258
211
  load_agentic_process_options = [
259
- Option(
260
- "project_id",
261
- ["--project-id", "--pid"],
262
- "ID of the project",
263
- True
264
- ),
265
212
  Option(
266
213
  "file",
267
214
  ["--file", "-f"],
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pygeai
3
- Version: 0.2.7b53
3
+ Version: 0.2.7b54
4
4
  Summary: Software Development Kit to interact with Globant Enterprise AI.
5
5
  Author-email: Globant <geai-sdk@globant.com>
6
6
  License-Expression: MIT
@@ -59,7 +59,7 @@ pygeai/cli/commands/flows/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
59
59
  pygeai/cli/commands/lab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
60
60
  pygeai/cli/commands/lab/ai_lab.py,sha256=oiCYN_1mLXwbOQ7rh-MXVp9xUcRFTy6b0hNHcS4ytg8,137440
61
61
  pygeai/cli/commands/lab/common.py,sha256=YBenPCVgK01Xaxgj1429bp_Ri1SN4beBxZk3dCLp7X0,6590
62
- pygeai/cli/commands/lab/spec.py,sha256=YX-u67PbKWOVyODCjK1CaGc3D1gsF7d41EeruzELzoA,9889
62
+ pygeai/cli/commands/lab/spec.py,sha256=EjNdEnljKpYPQyT4d4ViAPrM1g7oIitv6ddnWVkWXPk,8301
63
63
  pygeai/cli/texts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
64
64
  pygeai/cli/texts/help.py,sha256=IgifNjO22kbRB5bsuckFrzRvg7Q14y96IfxRnlJAUcw,15516
65
65
  pygeai/core/__init__.py,sha256=bbNktFp7t2dOBIvWto-uGVBW8acaKIe8EKcfuLV-HmA,189
@@ -482,9 +482,9 @@ pygeai/vendor/a2a/utils/helpers.py,sha256=6Tbd8SVfXvdNEk6WYmLOjrAxkzFf1aIg8dkFfB
482
482
  pygeai/vendor/a2a/utils/message.py,sha256=gc_EKO69CJ4HkR76IFgsy-kENJz1dn7CfSgWJWvt-gs,2197
483
483
  pygeai/vendor/a2a/utils/task.py,sha256=BYRA_L1HpoUGJAVlyHML0lCM9Awhf2Ovjj7oPFXKbh0,1647
484
484
  pygeai/vendor/a2a/utils/telemetry.py,sha256=VvSp1Ztqaobkmq9-3sNhhPEilJS32-JTSfKzegkj6FU,10861
485
- pygeai-0.2.7b53.dist-info/licenses/LICENSE,sha256=eHfqo7-AWS8cMq0cg03lq7owsLeCmZA-xS5L0kuHnl8,1474
486
- pygeai-0.2.7b53.dist-info/METADATA,sha256=ClrOc21XN_jYy_7P6tfFUZyEw3-BHiaA4stvsm0iiNY,6883
487
- pygeai-0.2.7b53.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
488
- pygeai-0.2.7b53.dist-info/entry_points.txt,sha256=OAmwuXVCQBTCE3HeVegVd37hbhCcp9TPahvdrCuMYWw,178
489
- pygeai-0.2.7b53.dist-info/top_level.txt,sha256=bJFwp2tURmCfB94yXDF7ylvdSJXFDDJsyUOb-7PJgwc,7
490
- pygeai-0.2.7b53.dist-info/RECORD,,
485
+ pygeai-0.2.7b54.dist-info/licenses/LICENSE,sha256=eHfqo7-AWS8cMq0cg03lq7owsLeCmZA-xS5L0kuHnl8,1474
486
+ pygeai-0.2.7b54.dist-info/METADATA,sha256=OLaMRFddxO94Gd9Njd8L_NxnbPYKTpPLeVUnSUm5DOs,6883
487
+ pygeai-0.2.7b54.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
488
+ pygeai-0.2.7b54.dist-info/entry_points.txt,sha256=OAmwuXVCQBTCE3HeVegVd37hbhCcp9TPahvdrCuMYWw,178
489
+ pygeai-0.2.7b54.dist-info/top_level.txt,sha256=bJFwp2tURmCfB94yXDF7ylvdSJXFDDJsyUOb-7PJgwc,7
490
+ pygeai-0.2.7b54.dist-info/RECORD,,