pygeai 0.6.1__py3-none-any.whl → 0.7.0b3__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.
- pygeai/__init__.py +1 -1
- pygeai/cli/commands/base.py +167 -6
- pygeai/cli/commands/migrate.py +2 -3
- pygeai/cli/geai.py +15 -7
- pygeai/cli/texts/help.py +26 -1
- pygeai/core/utils/console.py +69 -5
- pygeai/lab/models.py +1 -1
- pygeai/migration/strategies.py +6 -14
- {pygeai-0.6.1.dist-info → pygeai-0.7.0b3.dist-info}/METADATA +1 -1
- {pygeai-0.6.1.dist-info → pygeai-0.7.0b3.dist-info}/RECORD +14 -14
- {pygeai-0.6.1.dist-info → pygeai-0.7.0b3.dist-info}/WHEEL +1 -1
- {pygeai-0.6.1.dist-info → pygeai-0.7.0b3.dist-info}/entry_points.txt +0 -0
- {pygeai-0.6.1.dist-info → pygeai-0.7.0b3.dist-info}/licenses/LICENSE +0 -0
- {pygeai-0.6.1.dist-info → pygeai-0.7.0b3.dist-info}/top_level.txt +0 -0
pygeai/__init__.py
CHANGED
pygeai/cli/commands/base.py
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import signal
|
|
2
|
+
import sys
|
|
3
|
+
import time
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
from typing import Optional
|
|
6
|
+
|
|
1
7
|
from pygeai.cli.commands import ArgumentsEnum, Command, Option
|
|
2
8
|
from pygeai.cli.commands.admin import admin_commands
|
|
3
9
|
from pygeai.cli.commands.analytics import analytics_commands
|
|
@@ -53,12 +59,142 @@ def check_for_updates():
|
|
|
53
59
|
Console.write_stdout(f"{version_status}")
|
|
54
60
|
|
|
55
61
|
|
|
56
|
-
def check_api_status():
|
|
62
|
+
def check_api_status(option_list: list = None):
|
|
57
63
|
"""
|
|
58
|
-
Checks API status
|
|
64
|
+
Checks API status with optional monitoring capabilities
|
|
65
|
+
|
|
66
|
+
:param option_list: List of tuples (option, value) including monitor, file, interval, and count
|
|
59
67
|
"""
|
|
60
|
-
|
|
61
|
-
|
|
68
|
+
if option_list is None or not any(option_list):
|
|
69
|
+
api_status = HealthClient().check_api_status()
|
|
70
|
+
Console.write_stdout(f"API Status: {api_status}")
|
|
71
|
+
return
|
|
72
|
+
|
|
73
|
+
options_dict = {opt.name: arg for opt, arg in option_list}
|
|
74
|
+
|
|
75
|
+
monitor = 'monitor' in options_dict
|
|
76
|
+
file_path = options_dict.get('file')
|
|
77
|
+
interval = int(options_dict.get('interval', 5)) if 'interval' in options_dict else 5
|
|
78
|
+
count = int(options_dict.get('count', 0)) if 'count' in options_dict else 0
|
|
79
|
+
|
|
80
|
+
if not monitor:
|
|
81
|
+
api_status = HealthClient().check_api_status()
|
|
82
|
+
Console.write_stdout(f"API Status: {api_status}")
|
|
83
|
+
return
|
|
84
|
+
|
|
85
|
+
health_client = HealthClient()
|
|
86
|
+
check_count = 0
|
|
87
|
+
success_count = 0
|
|
88
|
+
failure_count = 0
|
|
89
|
+
downtime_periods = []
|
|
90
|
+
current_downtime_start = None
|
|
91
|
+
interrupted = False
|
|
92
|
+
|
|
93
|
+
file_handle = None
|
|
94
|
+
if file_path:
|
|
95
|
+
try:
|
|
96
|
+
file_handle = open(file_path, 'w')
|
|
97
|
+
file_handle.write("Timestamp,Status,Running,Version,Error\n")
|
|
98
|
+
except Exception as e:
|
|
99
|
+
Console.write_stdout(f"Warning: Could not open file {file_path}: {e}")
|
|
100
|
+
file_handle = None
|
|
101
|
+
|
|
102
|
+
def signal_handler(sig, frame):
|
|
103
|
+
nonlocal interrupted
|
|
104
|
+
interrupted = True
|
|
105
|
+
|
|
106
|
+
signal.signal(signal.SIGINT, signal_handler)
|
|
107
|
+
|
|
108
|
+
Console.write_stdout(f"Monitoring API status every {interval} seconds. Press Ctrl+C to stop...")
|
|
109
|
+
Console.write_stdout("")
|
|
110
|
+
|
|
111
|
+
try:
|
|
112
|
+
while True:
|
|
113
|
+
timestamp = datetime.now()
|
|
114
|
+
timestamp_str = timestamp.strftime("%Y-%m-%d %H:%M:%S")
|
|
115
|
+
|
|
116
|
+
try:
|
|
117
|
+
api_status = health_client.check_api_status()
|
|
118
|
+
check_count += 1
|
|
119
|
+
|
|
120
|
+
running = api_status.get('running', False)
|
|
121
|
+
version = api_status.get('version', 'N/A')
|
|
122
|
+
|
|
123
|
+
if running:
|
|
124
|
+
success_count += 1
|
|
125
|
+
status = "✓ UP"
|
|
126
|
+
if current_downtime_start:
|
|
127
|
+
downtime_end = timestamp
|
|
128
|
+
downtime_periods.append((current_downtime_start, downtime_end))
|
|
129
|
+
current_downtime_start = None
|
|
130
|
+
else:
|
|
131
|
+
failure_count += 1
|
|
132
|
+
status = "✗ DOWN"
|
|
133
|
+
if not current_downtime_start:
|
|
134
|
+
current_downtime_start = timestamp
|
|
135
|
+
|
|
136
|
+
Console.write_stdout(f"[{timestamp_str}] {status} - Version: {version}")
|
|
137
|
+
|
|
138
|
+
if file_handle:
|
|
139
|
+
file_handle.write(f"{timestamp_str},{'UP' if running else 'DOWN'},{running},{version},\n")
|
|
140
|
+
file_handle.flush()
|
|
141
|
+
|
|
142
|
+
except Exception as e:
|
|
143
|
+
check_count += 1
|
|
144
|
+
failure_count += 1
|
|
145
|
+
status = "✗ ERROR"
|
|
146
|
+
error_msg = str(e)
|
|
147
|
+
|
|
148
|
+
Console.write_stdout(f"[{timestamp_str}] {status} - {error_msg}")
|
|
149
|
+
|
|
150
|
+
if not current_downtime_start:
|
|
151
|
+
current_downtime_start = timestamp
|
|
152
|
+
|
|
153
|
+
if file_handle:
|
|
154
|
+
file_handle.write(f"{timestamp_str},ERROR,False,N/A,{error_msg}\n")
|
|
155
|
+
file_handle.flush()
|
|
156
|
+
|
|
157
|
+
if count > 0 and check_count >= count:
|
|
158
|
+
break
|
|
159
|
+
|
|
160
|
+
if interrupted:
|
|
161
|
+
Console.write_stdout("\nMonitoring stopped by user.")
|
|
162
|
+
break
|
|
163
|
+
|
|
164
|
+
time.sleep(interval)
|
|
165
|
+
|
|
166
|
+
finally:
|
|
167
|
+
if current_downtime_start:
|
|
168
|
+
downtime_periods.append((current_downtime_start, datetime.now()))
|
|
169
|
+
|
|
170
|
+
if file_handle:
|
|
171
|
+
file_handle.close()
|
|
172
|
+
|
|
173
|
+
Console.write_stdout("")
|
|
174
|
+
Console.write_stdout("=" * 60)
|
|
175
|
+
Console.write_stdout("MONITORING SUMMARY")
|
|
176
|
+
Console.write_stdout("=" * 60)
|
|
177
|
+
Console.write_stdout(f"Total checks performed: {check_count}")
|
|
178
|
+
Console.write_stdout(f"Successful checks: {success_count}")
|
|
179
|
+
Console.write_stdout(f"Failed checks: {failure_count}")
|
|
180
|
+
|
|
181
|
+
if success_count > 0:
|
|
182
|
+
uptime_percentage = (success_count / check_count) * 100
|
|
183
|
+
Console.write_stdout(f"Uptime: {uptime_percentage:.2f}%")
|
|
184
|
+
|
|
185
|
+
if downtime_periods:
|
|
186
|
+
total_downtime = sum(
|
|
187
|
+
(end - start).total_seconds()
|
|
188
|
+
for start, end in downtime_periods
|
|
189
|
+
)
|
|
190
|
+
Console.write_stdout(f"Estimated total downtime: {total_downtime:.2f} seconds ({total_downtime/60:.2f} minutes)")
|
|
191
|
+
Console.write_stdout(f"Number of downtime incidents: {len(downtime_periods)}")
|
|
192
|
+
else:
|
|
193
|
+
Console.write_stdout("No downtime detected during monitoring period")
|
|
194
|
+
|
|
195
|
+
if file_path:
|
|
196
|
+
Console.write_stdout(f"Results saved to: {file_path}")
|
|
197
|
+
Console.write_stdout("=" * 60)
|
|
62
198
|
|
|
63
199
|
|
|
64
200
|
"""
|
|
@@ -99,9 +235,34 @@ base_commands = [
|
|
|
99
235
|
["status", "s"],
|
|
100
236
|
"Check API status for Globant Enterprise AI instance",
|
|
101
237
|
check_api_status,
|
|
102
|
-
ArgumentsEnum.
|
|
238
|
+
ArgumentsEnum.OPTIONAL,
|
|
103
239
|
[],
|
|
104
|
-
[
|
|
240
|
+
[
|
|
241
|
+
Option(
|
|
242
|
+
"monitor",
|
|
243
|
+
["--monitor", "-m"],
|
|
244
|
+
"Enable continuous monitoring mode",
|
|
245
|
+
False
|
|
246
|
+
),
|
|
247
|
+
Option(
|
|
248
|
+
"file",
|
|
249
|
+
["--file", "-f"],
|
|
250
|
+
"Log status checks to specified file",
|
|
251
|
+
True
|
|
252
|
+
),
|
|
253
|
+
Option(
|
|
254
|
+
"interval",
|
|
255
|
+
["--interval", "-i"],
|
|
256
|
+
"Interval in seconds between checks (default: 5)",
|
|
257
|
+
True
|
|
258
|
+
),
|
|
259
|
+
Option(
|
|
260
|
+
"count",
|
|
261
|
+
["--count", "-c"],
|
|
262
|
+
"Number of times to check before stopping (default: infinite)",
|
|
263
|
+
True
|
|
264
|
+
),
|
|
265
|
+
]
|
|
105
266
|
),
|
|
106
267
|
Command(
|
|
107
268
|
"configure",
|
pygeai/cli/commands/migrate.py
CHANGED
|
@@ -703,7 +703,6 @@ def clone_project(option_list: list) -> None:
|
|
|
703
703
|
logger.debug(f" - to_organization_api_key exists: {to_organization_api_key is not None}")
|
|
704
704
|
logger.debug(f" - from_organization_api_key exists: {from_organization_api_key is not None}")
|
|
705
705
|
logger.debug(f" - Using key (first 20 chars): {org_key_to_use[:20] if org_key_to_use else 'None'}...")
|
|
706
|
-
Console.write_stderr(f"DEBUG: Using org key for project creation (first 20 chars): {org_key_to_use[:20] if org_key_to_use else 'None'}...")
|
|
707
706
|
|
|
708
707
|
project_strategy = ProjectMigrationStrategy(
|
|
709
708
|
from_api_key=from_organization_api_key,
|
|
@@ -993,7 +992,7 @@ clone_project_options = [
|
|
|
993
992
|
),
|
|
994
993
|
Option(
|
|
995
994
|
"from_organization_api_key",
|
|
996
|
-
["--from-org-key", "--from-organization-key"],
|
|
995
|
+
["--from-org-key", "--from-organization-key", "--from-organization-api-key"],
|
|
997
996
|
"Source instance organization scope API key (optional, for project creation)",
|
|
998
997
|
True
|
|
999
998
|
),
|
|
@@ -1023,7 +1022,7 @@ clone_project_options = [
|
|
|
1023
1022
|
),
|
|
1024
1023
|
Option(
|
|
1025
1024
|
"to_organization_api_key",
|
|
1026
|
-
["--to-org-key", "--to-organization-key"],
|
|
1025
|
+
["--to-org-key", "--to-organization-key", "--to-organization-api-key"],
|
|
1027
1026
|
"Destination instance organization scope API key (optional, for project creation)",
|
|
1028
1027
|
True
|
|
1029
1028
|
),
|
pygeai/cli/geai.py
CHANGED
|
@@ -107,10 +107,14 @@ class CLIDriver:
|
|
|
107
107
|
elif "--alias" in arguments:
|
|
108
108
|
alias_index = arguments.index("--alias")
|
|
109
109
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
110
|
+
try:
|
|
111
|
+
_ = arguments.pop(alias_index)
|
|
112
|
+
alias = arguments.pop(alias_index)
|
|
113
|
+
return alias
|
|
114
|
+
except IndexError as e:
|
|
115
|
+
Console.write_stderr("-a/--alias option requires an alias. Please provide a valid alias after the option")
|
|
116
|
+
raise MissingRequirementException("Couldn't find a valid alias in parameter list.")
|
|
117
|
+
|
|
114
118
|
def _get_credentials_file(self, arguments: List[str]) -> str:
|
|
115
119
|
"""
|
|
116
120
|
Retrieves and removes credentials file path and flag from argument list.
|
|
@@ -126,9 +130,13 @@ class CLIDriver:
|
|
|
126
130
|
elif "--creds" in arguments:
|
|
127
131
|
creds_index = arguments.index("--creds")
|
|
128
132
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
133
|
+
try:
|
|
134
|
+
_ = arguments.pop(creds_index)
|
|
135
|
+
credentials_file = arguments.pop(creds_index)
|
|
136
|
+
return credentials_file
|
|
137
|
+
except IndexError as e:
|
|
138
|
+
Console.write_stderr("--creds/--credentials option requires a file path. Please provide a valid path after the option.")
|
|
139
|
+
raise MissingRequirementException("Couldn't find a valid path in parameter list.")
|
|
132
140
|
|
|
133
141
|
def main(self, args: Optional[List[str]] = None) -> int:
|
|
134
142
|
"""
|
pygeai/cli/texts/help.py
CHANGED
|
@@ -107,7 +107,32 @@ EXAMPLES
|
|
|
107
107
|
will help you setup the required environment variables to work with GEAI.
|
|
108
108
|
|
|
109
109
|
The command:
|
|
110
|
-
|
|
110
|
+
geai version
|
|
111
|
+
displays the current version of the GEAI CLI utility.
|
|
112
|
+
|
|
113
|
+
The command:
|
|
114
|
+
geai check-updates
|
|
115
|
+
checks if there are new versions of the GEAI package available.
|
|
116
|
+
|
|
117
|
+
The command:
|
|
118
|
+
geai status
|
|
119
|
+
checks the current API status of the Globant Enterprise AI instance.
|
|
120
|
+
|
|
121
|
+
The command:
|
|
122
|
+
geai status -m -i 10
|
|
123
|
+
monitors the API status every 10 seconds until stopped with Ctrl+C.
|
|
124
|
+
|
|
125
|
+
The command:
|
|
126
|
+
geai admin validate-token
|
|
127
|
+
validates your API token and displays organization and project information.
|
|
128
|
+
|
|
129
|
+
The command:
|
|
130
|
+
geai llm list-providers
|
|
131
|
+
lists all available LLM providers in GEAI.
|
|
132
|
+
|
|
133
|
+
The command:
|
|
134
|
+
geai emb generate -i "Hello world" -m "openai/text-embedding-3-small"
|
|
135
|
+
generates embeddings for the provided text using the specified model
|
|
111
136
|
|
|
112
137
|
INSTALL MAN PAGES
|
|
113
138
|
To install the manual pages, run:
|
pygeai/core/utils/console.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import os
|
|
1
2
|
import sys
|
|
2
3
|
from abc import ABC, abstractmethod
|
|
3
4
|
|
|
@@ -11,10 +12,19 @@ class StreamWriter(ABC):
|
|
|
11
12
|
def write_stdout(self, message: str = "", end: str = "\n"):
|
|
12
13
|
pass
|
|
13
14
|
|
|
15
|
+
@abstractmethod
|
|
16
|
+
def write_success(self, message: str = "", end: str = "\n"):
|
|
17
|
+
pass
|
|
18
|
+
|
|
19
|
+
@abstractmethod
|
|
20
|
+
def write_warning(self, message: str = "", end: str = "\n"):
|
|
21
|
+
pass
|
|
22
|
+
|
|
14
23
|
@abstractmethod
|
|
15
24
|
def write_stderr(self, message: str = "", end: str = "\n"):
|
|
16
25
|
pass
|
|
17
26
|
|
|
27
|
+
|
|
18
28
|
class ConsoleMeta(type):
|
|
19
29
|
def __getattr__(cls, name):
|
|
20
30
|
writer = cls._writer
|
|
@@ -26,6 +36,7 @@ class ConsoleMeta(type):
|
|
|
26
36
|
pass
|
|
27
37
|
return noop
|
|
28
38
|
|
|
39
|
+
|
|
29
40
|
class Console(metaclass=ConsoleMeta):
|
|
30
41
|
"""
|
|
31
42
|
A utility class for writing messages to standard output and standard error streams.
|
|
@@ -39,14 +50,45 @@ class Console(metaclass=ConsoleMeta):
|
|
|
39
50
|
"""
|
|
40
51
|
class DefaultStreamWriter(StreamWriter):
|
|
41
52
|
"""
|
|
42
|
-
Default StreamWriter that writes to sys.stdout and sys.stderr.
|
|
53
|
+
Default StreamWriter that writes to sys.stdout and sys.stderr with color support.
|
|
43
54
|
"""
|
|
55
|
+
|
|
56
|
+
# ANSI color codes
|
|
57
|
+
GREEN = "\033[32m"
|
|
58
|
+
YELLOW = "\033[33m"
|
|
59
|
+
RED = "\033[31m"
|
|
60
|
+
RESET = "\033[0m"
|
|
61
|
+
|
|
62
|
+
@staticmethod
|
|
63
|
+
def _should_use_color(stream) -> bool:
|
|
64
|
+
"""Check if colors should be used based on terminal support and environment."""
|
|
65
|
+
if os.getenv("NO_COLOR"):
|
|
66
|
+
return False
|
|
67
|
+
return hasattr(stream, "isatty") and stream.isatty()
|
|
68
|
+
|
|
44
69
|
def write_stdout(self, message: str = "", end: str = "\n"):
|
|
45
70
|
sys.stdout.write(f"{message}{end}")
|
|
46
71
|
sys.stdout.flush()
|
|
47
72
|
|
|
73
|
+
def write_success(self, message: str = "", end: str = "\n"):
|
|
74
|
+
if self._should_use_color(sys.stdout):
|
|
75
|
+
sys.stdout.write(f"{self.GREEN}{message}{self.RESET}{end}")
|
|
76
|
+
else:
|
|
77
|
+
sys.stdout.write(f"{message}{end}")
|
|
78
|
+
sys.stdout.flush()
|
|
79
|
+
|
|
80
|
+
def write_warning(self, message: str = "", end: str = "\n"):
|
|
81
|
+
if self._should_use_color(sys.stderr):
|
|
82
|
+
sys.stderr.write(f"{self.YELLOW}{message}{self.RESET}{end}")
|
|
83
|
+
else:
|
|
84
|
+
sys.stderr.write(f"{message}{end}")
|
|
85
|
+
sys.stderr.flush()
|
|
86
|
+
|
|
48
87
|
def write_stderr(self, message: str = "", end: str = "\n"):
|
|
49
|
-
sys.stderr
|
|
88
|
+
if self._should_use_color(sys.stderr):
|
|
89
|
+
sys.stderr.write(f"{self.RED}{message}{self.RESET}{end}")
|
|
90
|
+
else:
|
|
91
|
+
sys.stderr.write(f"{message}{end}")
|
|
50
92
|
sys.stderr.flush()
|
|
51
93
|
|
|
52
94
|
_writer: StreamWriter = DefaultStreamWriter()
|
|
@@ -57,18 +99,40 @@ class Console(metaclass=ConsoleMeta):
|
|
|
57
99
|
Writes a message to the standard output stream (sys.stdout).
|
|
58
100
|
|
|
59
101
|
:param message: str - The message to write. Defaults to an empty string.
|
|
60
|
-
:param end: str - The string to append after the message. Defaults to a newline ('
|
|
102
|
+
:param end: str - The string to append after the message. Defaults to a newline ('\\n').
|
|
61
103
|
:return: None - No return value; output is written to sys.stdout.
|
|
62
104
|
"""
|
|
63
105
|
Console._writer.write_stdout(message, end)
|
|
64
106
|
|
|
107
|
+
@staticmethod
|
|
108
|
+
def write_success(message: str = "", end: str = "\n"):
|
|
109
|
+
"""
|
|
110
|
+
Writes a success message to the standard output stream (sys.stdout) in green.
|
|
111
|
+
|
|
112
|
+
:param message: str - The message to write. Defaults to an empty string.
|
|
113
|
+
:param end: str - The string to append after the message. Defaults to a newline ('\\n').
|
|
114
|
+
:return: None - No return value; output is written to sys.stdout.
|
|
115
|
+
"""
|
|
116
|
+
Console._writer.write_success(message, end)
|
|
117
|
+
|
|
118
|
+
@staticmethod
|
|
119
|
+
def write_warning(message: str = "", end: str = "\n"):
|
|
120
|
+
"""
|
|
121
|
+
Writes a warning message to the standard error stream (sys.stderr) in yellow.
|
|
122
|
+
|
|
123
|
+
:param message: str - The message to write. Defaults to an empty string.
|
|
124
|
+
:param end: str - The string to append after the message. Defaults to a newline ('\\n').
|
|
125
|
+
:return: None - No return value; output is written to sys.stderr.
|
|
126
|
+
"""
|
|
127
|
+
Console._writer.write_warning(message, end)
|
|
128
|
+
|
|
65
129
|
@staticmethod
|
|
66
130
|
def write_stderr(message: str = "", end: str = "\n"):
|
|
67
131
|
"""
|
|
68
|
-
Writes a message to the standard error stream (sys.stderr).
|
|
132
|
+
Writes a message to the standard error stream (sys.stderr) in red.
|
|
69
133
|
|
|
70
134
|
:param message: str - The message to write. Defaults to an empty string.
|
|
71
|
-
:param end: str - The string to append after the message. Defaults to a newline ('
|
|
135
|
+
:param end: str - The string to append after the message. Defaults to a newline ('\\n').
|
|
72
136
|
:return: None - No return value; output is written to sys.stderr.
|
|
73
137
|
"""
|
|
74
138
|
Console._writer.write_stderr(message, end)
|
pygeai/lab/models.py
CHANGED
|
@@ -427,7 +427,7 @@ class AgentData(CustomBaseModel):
|
|
|
427
427
|
:param resource_pools: Optional[List[ResourcePool]] - List of resource pools organizing tools and helper agents.
|
|
428
428
|
"""
|
|
429
429
|
prompt: Prompt = Field(..., alias="prompt")
|
|
430
|
-
llm_config: LlmConfig = Field(
|
|
430
|
+
llm_config: LlmConfig = Field(None, alias="llmConfig")
|
|
431
431
|
strategy_name: Optional[str] = Field("Dynamic Prompting", alias="strategyName")
|
|
432
432
|
models: Optional[Union[ModelList, List[Model]]] = Field(None, alias="models")
|
|
433
433
|
resource_pools: Optional[ResourcePoolList] = Field(None, alias="resourcePools", description="List of resource pools organizing tools and helper agents")
|
pygeai/migration/strategies.py
CHANGED
|
@@ -124,9 +124,9 @@ class ProjectMigrationStrategy(MigrationStrategy):
|
|
|
124
124
|
logger.error(" - Operation: Create project")
|
|
125
125
|
logger.error(f" - Base URL: {self.to_instance}")
|
|
126
126
|
logger.error(f" - API Key used (first 20 chars): {self.to_api_key[:20] if self.to_api_key else 'None'}...")
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
127
|
+
logger.error("\nDEBUG: Operation failed: Create project")
|
|
128
|
+
logger.error(f"DEBUG: Base URL: {self.to_instance}")
|
|
129
|
+
logger.error(f"DEBUG: API Key used (first 20 chars): {self.to_api_key[:20] if self.to_api_key else 'None'}...")
|
|
130
130
|
raise ValueError(error_msg) from e
|
|
131
131
|
|
|
132
132
|
if isinstance(response, ErrorListResponse):
|
|
@@ -135,9 +135,9 @@ class ProjectMigrationStrategy(MigrationStrategy):
|
|
|
135
135
|
logger.error(" - Operation: Create project")
|
|
136
136
|
logger.error(f" - Base URL: {self.to_instance}")
|
|
137
137
|
logger.error(f" - API Key used (first 20 chars): {self.to_api_key[:20] if self.to_api_key else 'None'}...")
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
138
|
+
logger.error("\nDEBUG: Operation failed: Create project")
|
|
139
|
+
logger.error(f"DEBUG: Base URL: {self.to_instance}")
|
|
140
|
+
logger.error(f"DEBUG: API Key used (first 20 chars): {self.to_api_key[:20] if self.to_api_key else 'None'}...")
|
|
141
141
|
raise ValueError(f"Failed to create project: {error_detail}")
|
|
142
142
|
|
|
143
143
|
if not response or not hasattr(response, "project"):
|
|
@@ -145,14 +145,6 @@ class ProjectMigrationStrategy(MigrationStrategy):
|
|
|
145
145
|
|
|
146
146
|
return response.project
|
|
147
147
|
|
|
148
|
-
def _migrate_assistants(self, new_project: Project):
|
|
149
|
-
"""
|
|
150
|
-
Migrate assistants associated with the project.
|
|
151
|
-
|
|
152
|
-
:param new_project: The newly created project to migrate assistants to
|
|
153
|
-
"""
|
|
154
|
-
pass
|
|
155
|
-
|
|
156
148
|
|
|
157
149
|
class _LabResourceMigrationStrategy(MigrationStrategy):
|
|
158
150
|
"""
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
pygeai/__init__.py,sha256=
|
|
1
|
+
pygeai/__init__.py,sha256=br3VHHdnuTBtz6iEvsqEnUVxZoPuDS3BV2HohBZcUZE,492
|
|
2
2
|
pygeai/_docs/Makefile,sha256=4zv3TVkTACm6JBaKgTES3ZI9cETXgM6ULbZkXZP1as8,638
|
|
3
3
|
pygeai/_docs/make.bat,sha256=L4I5T7uDUIjwGyMRJ-y9FoT61sxIyCuaYuJyLt8c-nA,804
|
|
4
4
|
pygeai/_docs/source/conf.py,sha256=H6XjfAFdBZ5H4aqxy88TzUQBfUYeVZSxIFbOACqLlUM,3591
|
|
@@ -174,7 +174,7 @@ pygeai/chat/ui.py,sha256=-xvjCzBwWlvyq-C0kN2YPczl4Q0alyJamXULOlGjKRA,34595
|
|
|
174
174
|
pygeai/cli/__init__.py,sha256=P7_xZm3j6DdYnVTanQClJjfyW5co5ovNoiizgd0NMLo,95
|
|
175
175
|
pygeai/cli/__main__.py,sha256=2RkQaX48mS2keTpv3-9rxk5dw35PL_deqxcKUUNhp6E,154
|
|
176
176
|
pygeai/cli/error_handler.py,sha256=Lw28yRk0mBvwMpuYrfbYV87g_AHoiidZo9SakoOZva4,5745
|
|
177
|
-
pygeai/cli/geai.py,sha256=
|
|
177
|
+
pygeai/cli/geai.py,sha256=w0vr-EgPgSKQq0QN6LoO6JeM57f-BlIsLXYEHM8UmDE,11112
|
|
178
178
|
pygeai/cli/geai_proxy.py,sha256=vZwI2MlM_2Ejgvk_AW1FpsEGBbYzgi4VtGS6aQC7xzk,13359
|
|
179
179
|
pygeai/cli/install_man.py,sha256=lk1QOk6CWc2azd90OCd8M4wlu4T4EKCagecj6088WNs,3793
|
|
180
180
|
pygeai/cli/parsers.py,sha256=l5YGa-QIQA9c1mxx8ofYAkxVfwuZpr1af5-af7jZTVo,4667
|
|
@@ -183,7 +183,7 @@ pygeai/cli/commands/admin.py,sha256=rPKsqMXn5p1WwKVbvZH9lHW8XsPMcgipvLt3xbx1JCU,
|
|
|
183
183
|
pygeai/cli/commands/analytics.py,sha256=6ww2LS6Go3tRUlwgMGHxKz-Y_fAee8Xg9OOq8BXZyL4,18702
|
|
184
184
|
pygeai/cli/commands/assistant.py,sha256=MCcsNaE3BiYjumqtefwIbLFyDmLrtdf40ITY8K8Y1as,16778
|
|
185
185
|
pygeai/cli/commands/auth.py,sha256=K2bVr3G8v3A59BV8bEr-u1MhimiCEcjBUoVOx8Q2-vE,7552
|
|
186
|
-
pygeai/cli/commands/base.py,sha256=
|
|
186
|
+
pygeai/cli/commands/base.py,sha256=GSfb4nak-JaanC1kUBQPBpsHw1WqVV13b5rQxwhG6dQ,13652
|
|
187
187
|
pygeai/cli/commands/builders.py,sha256=xXk1F4phSQxHN3NiQltl_KEZdCwwJiKLmVqQsft2OC4,1130
|
|
188
188
|
pygeai/cli/commands/chat.py,sha256=v7SGjGRHZ0GvGiPDAGejgV-C3xnWIVZZEapU2OLB-xU,33606
|
|
189
189
|
pygeai/cli/commands/common.py,sha256=xwr4GSgP9SK4fcU7iwwNahk0bDhzqU974Gvu_DmZZYM,16546
|
|
@@ -195,7 +195,7 @@ pygeai/cli/commands/feedback.py,sha256=SnuSlQyw9L51DNK2glhp-RyQy88lVViNLOrl9ri_0
|
|
|
195
195
|
pygeai/cli/commands/files.py,sha256=2YOo1W41iFEQ7c2tgqUl86ASred2UfiFihyTcJjFLYg,6960
|
|
196
196
|
pygeai/cli/commands/gam.py,sha256=TS6h4ocGz9Vn6EH4UJSLCxFTeJms4Zk-5MizS2iOu58,8441
|
|
197
197
|
pygeai/cli/commands/llm.py,sha256=U0lL2BOfZoV6EqEKF-DkJfGgZkacAbBqPIB6L54dxio,3819
|
|
198
|
-
pygeai/cli/commands/migrate.py,sha256=
|
|
198
|
+
pygeai/cli/commands/migrate.py,sha256=eaq91PxghJ7fPnaG1Ay4Kxo0qi5cs3MUxZ0PiNUmeMk,46512
|
|
199
199
|
pygeai/cli/commands/options.py,sha256=oVDJF-SsE80vi-W4d0n2cNo1BeeU_jqDs_TtMPkz-1I,1804
|
|
200
200
|
pygeai/cli/commands/organization.py,sha256=0P09MbpG6g_qMxmbU9LnGgwBNClmvqiaJ0AagVgWoys,25134
|
|
201
201
|
pygeai/cli/commands/rag.py,sha256=z2L3u6ckqvDxQS7VyaE3EoYu6KAWu7IEajOgB098FPk,36329
|
|
@@ -212,7 +212,7 @@ pygeai/cli/commands/lab/options.py,sha256=T13Vi97zochr0cU4yjyvvwWRPENILFDYpvqpU4
|
|
|
212
212
|
pygeai/cli/commands/lab/spec.py,sha256=7uBauh23i9TjXdT8ISQJeIH9IOfuniqvo5cPmMUlIPY,7841
|
|
213
213
|
pygeai/cli/commands/lab/utils.py,sha256=uxhgHvCRrV6WYRxR2qd3nED_hhXcxJ1tAU8MlzoshEg,456
|
|
214
214
|
pygeai/cli/texts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
215
|
-
pygeai/cli/texts/help.py,sha256=
|
|
215
|
+
pygeai/cli/texts/help.py,sha256=gZAqxuS6g_t1QqRjoi9Gm0YuIJBWD5k1EZXeBxIw24Q,25459
|
|
216
216
|
pygeai/core/__init__.py,sha256=bbNktFp7t2dOBIvWto-uGVBW8acaKIe8EKcfuLV-HmA,189
|
|
217
217
|
pygeai/core/handlers.py,sha256=la1QcQbLwfiNd-xDQ3jtWRHmeEm6E93Rfx5c-5bkLmw,934
|
|
218
218
|
pygeai/core/models.py,sha256=XLdoqekExCsLTMhF_4UsuzzvlaemPNZdH11hleSIrW8,27443
|
|
@@ -270,7 +270,7 @@ pygeai/core/services/llm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
|
|
|
270
270
|
pygeai/core/services/llm/model.py,sha256=dv0vH2uGQDzyXh63A_nr_bmMukr6Q9nO7LuiWgvclnY,9065
|
|
271
271
|
pygeai/core/services/llm/providers.py,sha256=CS1v4qSiibuL51fQlgcARiyPoXxSnCeV5RXwNc1nmgA,293
|
|
272
272
|
pygeai/core/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
273
|
-
pygeai/core/utils/console.py,sha256=
|
|
273
|
+
pygeai/core/utils/console.py,sha256=wsrKxisnawwqz3w0JkvkgjZqEsrQ1twyDe_WGn1QMzM,5321
|
|
274
274
|
pygeai/core/utils/parsers.py,sha256=783HSQX7CDRKHU7WQQ9o_sS_ucMrYNDXvC_pKw1F-P4,1303
|
|
275
275
|
pygeai/core/utils/validators.py,sha256=LoDrO5z0K8_axMdoMHGZZHlxdIFQWnzC9L7RbEQFITg,328
|
|
276
276
|
pygeai/dbg/__init__.py,sha256=yVJAWK9z9CGKRH5Mw8ZYQ0w5qOw86nXeqtRVqt_zu64,147
|
|
@@ -299,7 +299,7 @@ pygeai/lab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
299
299
|
pygeai/lab/clients.py,sha256=ZpJUnyOYLRMEU1dfbJD4yokTU2m_mnR-lj4JbiO0OFA,1167
|
|
300
300
|
pygeai/lab/constants.py,sha256=ddgDnXP4GD0woi-FUJaJXzaWS3H6zmDN0B-v8utM95Q,170
|
|
301
301
|
pygeai/lab/managers.py,sha256=9ZN03FVEmKHo9khHnBJL_zaCW8X0dEdWSN4__DVbnY8,70706
|
|
302
|
-
pygeai/lab/models.py,sha256=
|
|
302
|
+
pygeai/lab/models.py,sha256=WUdbrYou64IoTiHd41kr61vbjRN7mcxVj4gUO8bg-X8,74904
|
|
303
303
|
pygeai/lab/runners.py,sha256=-uaCPHpFyiKtVOxlEjPjAc9h-onSdGAcYJ5IAZPqlb0,4147
|
|
304
304
|
pygeai/lab/agents/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
305
305
|
pygeai/lab/agents/clients.py,sha256=cJut_ftGFSX6ZMJlodiE7P7p_OXJre1asC-NlEQcdvs,19091
|
|
@@ -325,7 +325,7 @@ pygeai/man/man1/__init__.py,sha256=CFvES6cP_sbhgpm-I-QSbPC1f7Bw7cFsMW2-sxm4FtM,5
|
|
|
325
325
|
pygeai/man/man1/geai-proxy.1,sha256=N5jtjzS5dB3JjAkG0Rw8EBzhC6Jgoy6zbS7XDgcE4EA,6735
|
|
326
326
|
pygeai/man/man1/geai.1,sha256=dRJjqXLu4PRr5tELX-TveOrvp-J085rTV0NbqL5I30Q,51162
|
|
327
327
|
pygeai/migration/__init__.py,sha256=sZb6bHOjiOhjHTvU1fYbD8ubSwaitn4jyQrj59Cf8ao,843
|
|
328
|
-
pygeai/migration/strategies.py,sha256=
|
|
328
|
+
pygeai/migration/strategies.py,sha256=QBy_VIdI6JoqzvHN_rn1zJU-BsuprnnEiqKg0P4I90c,22507
|
|
329
329
|
pygeai/migration/tools.py,sha256=QiXjGBZiWeaRMjwlLCaNi3uZNVl_IAEKFtk2ww2EF98,6191
|
|
330
330
|
pygeai/organization/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
331
331
|
pygeai/organization/clients.py,sha256=IEGsVR21yI3MIpAVAHGU3Zifn3l6wQ4iYjKYTsofOA0,22925
|
|
@@ -798,9 +798,9 @@ pygeai/vendor/a2a/utils/helpers.py,sha256=6Tbd8SVfXvdNEk6WYmLOjrAxkzFf1aIg8dkFfB
|
|
|
798
798
|
pygeai/vendor/a2a/utils/message.py,sha256=gc_EKO69CJ4HkR76IFgsy-kENJz1dn7CfSgWJWvt-gs,2197
|
|
799
799
|
pygeai/vendor/a2a/utils/task.py,sha256=BYRA_L1HpoUGJAVlyHML0lCM9Awhf2Ovjj7oPFXKbh0,1647
|
|
800
800
|
pygeai/vendor/a2a/utils/telemetry.py,sha256=VvSp1Ztqaobkmq9-3sNhhPEilJS32-JTSfKzegkj6FU,10861
|
|
801
|
-
pygeai-0.
|
|
802
|
-
pygeai-0.
|
|
803
|
-
pygeai-0.
|
|
804
|
-
pygeai-0.
|
|
805
|
-
pygeai-0.
|
|
806
|
-
pygeai-0.
|
|
801
|
+
pygeai-0.7.0b3.dist-info/licenses/LICENSE,sha256=eHfqo7-AWS8cMq0cg03lq7owsLeCmZA-xS5L0kuHnl8,1474
|
|
802
|
+
pygeai-0.7.0b3.dist-info/METADATA,sha256=elYIOCtPtIsTa_Mu9SL02gE-wjR5UJgNHvQP0SpRyIY,8710
|
|
803
|
+
pygeai-0.7.0b3.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
|
|
804
|
+
pygeai-0.7.0b3.dist-info/entry_points.txt,sha256=OAmwuXVCQBTCE3HeVegVd37hbhCcp9TPahvdrCuMYWw,178
|
|
805
|
+
pygeai-0.7.0b3.dist-info/top_level.txt,sha256=bJFwp2tURmCfB94yXDF7ylvdSJXFDDJsyUOb-7PJgwc,7
|
|
806
|
+
pygeai-0.7.0b3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|