pygeai 0.5.0__py3-none-any.whl → 0.6.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.
Files changed (79) hide show
  1. pygeai/__init__.py +1 -1
  2. pygeai/auth/__init__.py +0 -0
  3. pygeai/auth/clients.py +55 -0
  4. pygeai/auth/endpoints.py +2 -0
  5. pygeai/cli/__init__.py +0 -1
  6. pygeai/cli/commands/auth.py +123 -0
  7. pygeai/cli/commands/base.py +22 -1
  8. pygeai/cli/commands/docs.py +105 -0
  9. pygeai/cli/texts/help.py +157 -24
  10. pygeai/core/files/responses.py +4 -3
  11. pygeai/lab/clients.py +3 -3
  12. pygeai/lab/tools/clients.py +4 -4
  13. pygeai/tests/admin/test_clients.py +143 -0
  14. pygeai/tests/auth/__init__.py +0 -0
  15. pygeai/tests/auth/test_clients.py +105 -0
  16. pygeai/tests/cli/commands/lab/test_ai_lab.py +41 -35
  17. pygeai/tests/cli/commands/lab/test_spec.py +24 -56
  18. pygeai/tests/cli/commands/test_chat.py +21 -3
  19. pygeai/tests/cli/commands/test_evaluation.py +649 -0
  20. pygeai/tests/cli/commands/test_secrets.py +171 -0
  21. pygeai/tests/core/base/data/models.py +7 -0
  22. pygeai/tests/core/base/test_mappers.py +43 -11
  23. pygeai/tests/core/base/test_models.py +3 -1
  24. pygeai/tests/core/base/test_responses.py +53 -0
  25. pygeai/tests/core/common/test_config.py +2 -3
  26. pygeai/tests/core/files/test_mappers.py +137 -0
  27. pygeai/tests/core/plugins/__init__.py +0 -0
  28. pygeai/tests/core/plugins/test_clients.py +64 -0
  29. pygeai/tests/evaluation/__init__.py +0 -0
  30. pygeai/tests/evaluation/dataset/__init__.py +0 -0
  31. pygeai/tests/evaluation/dataset/test_clients.py +263 -0
  32. pygeai/tests/evaluation/plan/__init__.py +0 -0
  33. pygeai/tests/evaluation/plan/test_clients.py +193 -0
  34. pygeai/tests/evaluation/result/__init__.py +0 -0
  35. pygeai/tests/evaluation/result/test_clients.py +64 -0
  36. pygeai/tests/integration/assistants/rag/test_create_rag.py +1 -1
  37. pygeai/tests/integration/chat/test_generate_image.py +1 -1
  38. pygeai/tests/integration/lab/agents/test_agents_list.py +1 -1
  39. pygeai/tests/integration/lab/agents/test_create_agent.py +3 -3
  40. pygeai/tests/integration/lab/agents/test_create_sharing_link.py +1 -1
  41. pygeai/tests/integration/lab/agents/test_delete_agent.py +2 -2
  42. pygeai/tests/integration/lab/agents/test_get_agent.py +1 -1
  43. pygeai/tests/integration/lab/agents/test_publish_agent_revision.py +2 -2
  44. pygeai/tests/integration/lab/agents/test_update_agent.py +3 -3
  45. pygeai/tests/integration/lab/processes/test_create_process.py +1 -1
  46. pygeai/tests/integration/lab/processes/test_create_task.py +211 -0
  47. pygeai/tests/integration/lab/processes/test_delete_process.py +111 -0
  48. pygeai/tests/integration/lab/processes/test_get_process.py +1 -1
  49. pygeai/tests/integration/lab/processes/test_list_process_instances.py +91 -0
  50. pygeai/tests/integration/lab/processes/test_list_processes.py +138 -0
  51. pygeai/tests/integration/lab/processes/test_publish_process_revision.py +232 -0
  52. pygeai/tests/integration/lab/processes/test_update_process.py +1 -1
  53. pygeai/tests/integration/lab/reasoning_strategies/test_get_reasoning_strategy.py +1 -1
  54. pygeai/tests/integration/lab/reasoning_strategies/test_list_reasoning_strategies.py +1 -1
  55. pygeai/tests/integration/lab/reasoning_strategies/test_update_reasoning_strategy.py +1 -1
  56. pygeai/tests/integration/lab/tools/test_create_tool.py +1 -1
  57. pygeai/tests/integration/lab/tools/test_delete_tool.py +1 -1
  58. pygeai/tests/integration/lab/tools/test_get_parameter.py +1 -1
  59. pygeai/tests/integration/lab/tools/test_get_tool.py +1 -1
  60. pygeai/tests/integration/lab/tools/test_list_tools.py +1 -1
  61. pygeai/tests/integration/lab/tools/test_publish_tool_revision.py +1 -1
  62. pygeai/tests/integration/lab/tools/test_set_parameter.py +1 -1
  63. pygeai/tests/integration/lab/tools/test_update_tool.py +1 -1
  64. pygeai/tests/lab/agents/test_clients.py +17 -34
  65. pygeai/tests/lab/processes/test_clients.py +30 -93
  66. pygeai/tests/lab/processes/test_mappers.py +12 -71
  67. pygeai/tests/lab/strategies/test_clients.py +63 -63
  68. pygeai/tests/lab/test_managers.py +3 -6
  69. pygeai/tests/lab/test_models.py +9 -8
  70. pygeai/tests/lab/tools/test_clients.py +22 -45
  71. pygeai/tests/migration/test_strategies.py +16 -16
  72. pygeai/tests/organization/test_mappers.py +11 -4
  73. pygeai/tests/organization/test_responses.py +137 -0
  74. {pygeai-0.5.0.dist-info → pygeai-0.6.0b3.dist-info}/METADATA +1 -1
  75. {pygeai-0.5.0.dist-info → pygeai-0.6.0b3.dist-info}/RECORD +79 -53
  76. {pygeai-0.5.0.dist-info → pygeai-0.6.0b3.dist-info}/WHEEL +0 -0
  77. {pygeai-0.5.0.dist-info → pygeai-0.6.0b3.dist-info}/entry_points.txt +0 -0
  78. {pygeai-0.5.0.dist-info → pygeai-0.6.0b3.dist-info}/licenses/LICENSE +0 -0
  79. {pygeai-0.5.0.dist-info → pygeai-0.6.0b3.dist-info}/top_level.txt +0 -0
pygeai/__init__.py CHANGED
@@ -4,7 +4,7 @@ import sys
4
4
  from pathlib import Path
5
5
 
6
6
  __author__ = 'Globant'
7
- __version__ = '0.5.0'
7
+ __version__ = '0.6.0'
8
8
 
9
9
  # Add vendor directory to Python path
10
10
  package_root = Path(__file__).parent
File without changes
pygeai/auth/clients.py ADDED
@@ -0,0 +1,55 @@
1
+ from json import JSONDecodeError
2
+
3
+ from pygeai import logger
4
+ from pygeai.auth.endpoints import GET_USER_PROFILE_INFO, GET_OAUTH2_ACCESS_TOKEN
5
+ from pygeai.core.base.clients import BaseClient
6
+ from pygeai.core.common.exceptions import InvalidAPIResponseException
7
+
8
+
9
+ class AuthClient(BaseClient):
10
+
11
+ def get_oauth2_access_token(
12
+ self,
13
+ client_id: str,
14
+ username: str,
15
+ password: str,
16
+ scope: str = "gam_user_data gam_user_roles"
17
+ ) -> dict:
18
+ """
19
+ Retrieves the list of projects that the user is authorized to access within a specific organization.
20
+
21
+ :param client_id: str - The client identifier provided by Globant
22
+ :param username: str - Username for authentication
23
+ :param password: str - Password for authentication
24
+ :param scope: str - Space-separated list of requested scopes
25
+ :return: dict - The API response containing the list of authorized projects in JSON format.
26
+ """
27
+ response = self.api_service.get(
28
+ endpoint=GET_OAUTH2_ACCESS_TOKEN,
29
+ params={
30
+ "client_id": client_id,
31
+ "scope": scope,
32
+ "username": username,
33
+ "password": password
34
+ }
35
+ )
36
+ try:
37
+ return response.json()
38
+ except JSONDecodeError as e:
39
+ logger.error(f"Unable to obtain Oauth2 access token: JSON parsing error (status {response.status_code}): {e}. Response: {response.text}")
40
+ raise InvalidAPIResponseException(f"Unable to obtain Oauth2 access token: {response.text}")
41
+
42
+ def get_user_profile_information(self, access_token: str) -> dict:
43
+ """
44
+ Get user profile information
45
+
46
+ :param access_token: str - Token obtained in the POST to /oauth/access_token
47
+ :return: dict - The API response containing the user profile information
48
+ """
49
+ self.api_service.token = access_token
50
+ response = self.api_service.get(endpoint=GET_USER_PROFILE_INFO)
51
+ try:
52
+ return response.json()
53
+ except JSONDecodeError as e:
54
+ logger.error(f"Unable to retrieve user profile information: JSON parsing error (status {response.status_code}): {e}. Response: {response.text}")
55
+ raise InvalidAPIResponseException(f"Unable to retrieve user profile information: {response.text}")
@@ -0,0 +1,2 @@
1
+ GET_OAUTH2_ACCESS_TOKEN = "/oauth/access_token" # POST -> Obtain an OAuth 2.0 access token
2
+ GET_USER_PROFILE_INFO = "/openid/userinfo" # GET -> Retrieve user profile information
pygeai/cli/__init__.py CHANGED
@@ -4,5 +4,4 @@ GEAI - ClI
4
4
  Command line interface to interact with Globant Enterprise AI.
5
5
  """
6
6
 
7
- __version__ = '0.5.0'
8
7
 
@@ -0,0 +1,123 @@
1
+ from pygeai.auth.clients import AuthClient
2
+ from pygeai.cli.commands import Command, Option, ArgumentsEnum
3
+ from pygeai.cli.commands.builders import build_help_text
4
+ from pygeai.cli.texts.help import AUTH_HELP_TEXT
5
+ from pygeai.core.common.exceptions import MissingRequirementException, WrongArgumentError
6
+ from pygeai.core.utils.console import Console
7
+
8
+
9
+ def show_help():
10
+ """
11
+ Displays help text in stdout
12
+ """
13
+ help_text = build_help_text(auth_commands, AUTH_HELP_TEXT)
14
+ Console.write_stdout(help_text)
15
+
16
+
17
+ def get_oauth2_access_token(option_list: list):
18
+ client_id = None
19
+ username = None
20
+ password = None
21
+ scope = "gam_user_data gam_user_roles"
22
+ for option_flag, option_arg in option_list:
23
+ if option_flag.name == "client_id":
24
+ client_id = option_arg
25
+ if option_flag.name == "username":
26
+ username = option_arg
27
+ if option_flag.name == "password":
28
+ password = option_arg
29
+ if option_flag.name == "scope":
30
+ scope = option_arg
31
+
32
+ if not (client_id and username and password):
33
+ raise MissingRequirementException("Cannot obtain Oauth2 access token without client_id, username and password")
34
+
35
+ client = AuthClient()
36
+ result = client.get_oauth2_access_token(
37
+ client_id=client_id,
38
+ username=username,
39
+ password=password,
40
+ scope=scope
41
+ )
42
+ Console.write_stdout(f"Authorized projects detail: \n{result}")
43
+
44
+
45
+ get_oauth2_access_token_options = [
46
+ Option(
47
+ "client_id",
48
+ ["--client-id", "--cid"],
49
+ "The client identifier provided by Globant.",
50
+ True
51
+ ),
52
+ Option(
53
+ "username",
54
+ ["--username", "-u"],
55
+ "Username for authentication.",
56
+ True
57
+ ),
58
+ Option(
59
+ "password",
60
+ ["--password", "-p"],
61
+ "Password for authentication.",
62
+ True
63
+ ),
64
+ Option(
65
+ "scope",
66
+ ["--scope", "-s"],
67
+ "Space-separated list of requested scopes. (Optional)",
68
+ True
69
+ ),
70
+
71
+ ]
72
+
73
+
74
+ def get_user_profile_information(option_list: list):
75
+ access_token = None
76
+ for option_flag, option_arg in option_list:
77
+ if option_flag.name == "access_token":
78
+ access_token = option_arg
79
+
80
+ client = AuthClient()
81
+ result = client.get_user_profile_information(access_token=access_token)
82
+ Console.write_stdout(f"User profile information: \n{result}")
83
+
84
+
85
+ get_user_profile_information_options = [
86
+ Option(
87
+ "access_token",
88
+ ["--access-token", "--token"],
89
+ "Token obtained with the --get-access-token option",
90
+ True
91
+ ),
92
+ ]
93
+
94
+
95
+ auth_commands = [
96
+ Command(
97
+ "help",
98
+ ["help", "h"],
99
+ "Display help text",
100
+ show_help,
101
+ ArgumentsEnum.NOT_AVAILABLE,
102
+ [],
103
+ []
104
+ ),
105
+ Command(
106
+ "get_oauth2_access_token",
107
+ ["get-access-token", "gat"],
108
+ "Get Oauth acess token for Globant Enterprise AI instance",
109
+ get_oauth2_access_token,
110
+ ArgumentsEnum.REQUIRED,
111
+ [],
112
+ get_oauth2_access_token_options
113
+ ),
114
+ Command(
115
+ "get_user_profile_information_options",
116
+ ["get-user-information", "get-user-info", "gui"],
117
+ "Retrieve user profile information",
118
+ get_user_profile_information_options,
119
+ ArgumentsEnum.REQUIRED,
120
+ [],
121
+ get_user_profile_information_options
122
+ ),
123
+ ]
@@ -1,9 +1,11 @@
1
1
  from pygeai.cli.commands import ArgumentsEnum, Command, Option
2
2
  from pygeai.cli.commands.admin import admin_commands
3
3
  from pygeai.cli.commands.assistant import assistant_commands
4
+ from pygeai.cli.commands.auth import auth_commands
4
5
  from pygeai.cli.commands.builders import build_help_text
5
6
  from pygeai.cli.commands.chat import chat_commands
6
7
  from pygeai.cli.commands.configuration import configure, configuration_options
8
+ from pygeai.cli.commands.docs import docs_commands
7
9
  from pygeai.cli.commands.embeddings import embeddings_commands
8
10
  from pygeai.cli.commands.evaluation import evaluation_commands
9
11
  from pygeai.cli.commands.feedback import feedback_commands
@@ -20,7 +22,7 @@ from pygeai.cli.commands.secrets import secrets_commands
20
22
  from pygeai.cli.commands.usage_limits import usage_limit_commands
21
23
  from pygeai.cli.commands.version import check_new_version
22
24
  from pygeai.cli.texts.help import HELP_TEXT
23
- from pygeai.cli import __version__ as cli_version
25
+ from pygeai import __version__ as cli_version
24
26
  from pygeai.core.utils.console import Console
25
27
  from pygeai.health.clients import HealthClient
26
28
 
@@ -155,6 +157,16 @@ base_commands = [
155
157
  admin_commands,
156
158
  []
157
159
  ),
160
+ Command(
161
+ "auth",
162
+ ["auth"],
163
+ "Invoke auth endpoints for token generation",
164
+ None,
165
+ ArgumentsEnum.REQUIRED,
166
+ auth_commands,
167
+ []
168
+ ),
169
+
158
170
  Command(
159
171
  "llm",
160
172
  ["llm"],
@@ -263,6 +275,15 @@ base_commands = [
263
275
  migrate_commands,
264
276
  []
265
277
  ),
278
+ Command(
279
+ "docs",
280
+ ["docs"],
281
+ "View PyGEAI SDK documentation",
282
+ None,
283
+ ArgumentsEnum.NOT_AVAILABLE,
284
+ docs_commands,
285
+ []
286
+ ),
266
287
 
267
288
  ]
268
289
 
@@ -0,0 +1,105 @@
1
+ import os
2
+ import subprocess
3
+ import webbrowser
4
+ from pathlib import Path
5
+
6
+ from pygeai.cli.commands import Command, ArgumentsEnum
7
+ from pygeai.cli.commands.builders import build_help_text
8
+ from pygeai.cli.texts.help import DOCS_HELP_TEXT
9
+ from pygeai.core.utils.console import Console
10
+
11
+
12
+ def show_help():
13
+ help_text = build_help_text(docs_commands, DOCS_HELP_TEXT)
14
+ Console.write_stdout(help_text)
15
+
16
+
17
+ def open_documentation():
18
+ try:
19
+ import sphinx
20
+ except ImportError:
21
+ Console.write_stdout(
22
+ "Documentation dependencies (sphinx, sphinx-rtd-theme) are not installed.\n"
23
+ "Would you like to install them now? [Y/n]: "
24
+ )
25
+ response = input().strip().lower()
26
+
27
+ if response in ['', 'y', 'yes']:
28
+ Console.write_stdout("Installing documentation dependencies...")
29
+ try:
30
+ subprocess.run(
31
+ ["pip", "install", "pygeai[docs]"],
32
+ check=True,
33
+ text=True
34
+ )
35
+ Console.write_stdout("Documentation dependencies installed successfully.")
36
+ except subprocess.CalledProcessError as e:
37
+ Console.write_stderr(f"ERROR: Failed to install dependencies.\n{e}")
38
+ return
39
+ except FileNotFoundError:
40
+ Console.write_stderr("ERROR: pip command not found.")
41
+ return
42
+ else:
43
+ Console.write_stdout("Installation cancelled. Documentation dependencies are required.")
44
+ return
45
+
46
+ package_root = Path(__file__).parent.parent.parent.parent
47
+ docs_dir = package_root / "docs"
48
+ build_dir = docs_dir / "build" / "html"
49
+ index_file = build_dir / "index.html"
50
+
51
+ if not index_file.exists():
52
+ Console.write_stdout("Documentation not found. Building documentation (this may take a minute)...")
53
+ source_dir = docs_dir / "source"
54
+
55
+ try:
56
+ result = subprocess.run(
57
+ ["sphinx-build", "-b", "html", str(source_dir), str(build_dir)],
58
+ check=True,
59
+ capture_output=True,
60
+ text=True,
61
+ timeout=300
62
+ )
63
+ Console.write_stdout("Documentation built successfully.")
64
+ except subprocess.CalledProcessError as e:
65
+ Console.write_stderr(f"ERROR: Failed to build documentation.\n{e.stderr}")
66
+ return
67
+ except subprocess.TimeoutExpired:
68
+ Console.write_stderr("ERROR: Documentation build timed out after 5 minutes.")
69
+ return
70
+ except FileNotFoundError:
71
+ Console.write_stderr(
72
+ "ERROR: sphinx-build command not found.\n"
73
+ "Install documentation dependencies: pip install pygeai[docs]"
74
+ )
75
+ return
76
+
77
+ doc_url = f"file://{index_file.absolute()}"
78
+ Console.write_stdout(f"Opening documentation at: {doc_url}")
79
+
80
+ try:
81
+ webbrowser.open(doc_url)
82
+ except Exception as e:
83
+ Console.write_stderr(f"ERROR: Failed to open browser.\n{e}")
84
+
85
+
86
+ docs_commands = [
87
+ Command(
88
+ "open",
89
+ ["open", "o"],
90
+ "Open documentation in web browser",
91
+ open_documentation,
92
+ ArgumentsEnum.NOT_AVAILABLE,
93
+ [],
94
+ []
95
+ ),
96
+ Command(
97
+ "help",
98
+ ["help", "h"],
99
+ "Display help text",
100
+ show_help,
101
+ ArgumentsEnum.NOT_AVAILABLE,
102
+ [],
103
+ []
104
+ ),
105
+ ]
pygeai/cli/texts/help.py CHANGED
@@ -1,6 +1,6 @@
1
1
  AUTHORS_SECTION = """
2
2
  AUTHORS
3
- Copyright 2025, Globant.
3
+ Copyright 2026, Globant.
4
4
 
5
5
  REPORTING BUGS
6
6
  To report any bug, request features or make any suggestions, the following email is available:
@@ -39,7 +39,7 @@ ERROR CODES
39
39
  Certain error descriptions can contain up to %n references specific to that error.
40
40
  These references are described with %1, %2,... ,%n.
41
41
 
42
- ErrorCode Description
42
+ ErrorCode Description
43
43
  1 Assistant Not Found
44
44
  2 Provider Type Not Found
45
45
  3 Request Not Found
@@ -136,15 +136,20 @@ DESCRIPTION
136
136
 
137
137
  EXAMPLES
138
138
  The command:
139
- geai c
140
- starts an interactive tool to configure API KEY and BASE URL to work with GEAI.
139
+ geai org list-projects
140
+ lists available projects in your organization.
141
141
 
142
142
  The command:
143
- geai organization list-projects
144
- list available projects. For this, an organization API KEY is required.
143
+ geai org list-projects -d full
144
+ lists all projects with full details.
145
145
 
146
146
  The command:
147
- ...
147
+ geai org create-project -n "SDKTest" -e "admin@example.com" -d "Test project for SDK"
148
+ creates a new project with specified name, email and description.
149
+
150
+ The command:
151
+ geai org get-tokens --id <PROJECT_UUID>
152
+ retrieves API tokens for a specific project
148
153
 
149
154
  {AUTHORS_SECTION}
150
155
  """
@@ -167,10 +172,16 @@ DESCRIPTION
167
172
 
168
173
  EXAMPLES
169
174
  The command:
170
-
175
+ geai ast get-assistant --id <ASSISTANT_UUID>
176
+ retrieves detailed information about a specific assistant.
171
177
 
172
178
  The command:
173
- ...
179
+ geai ast create-assistant --type chat --name "MyAssistant" --prompt "You are a helpful assistant"
180
+ creates a new assistant with the specified type, name and prompt.
181
+
182
+ The command:
183
+ geai ast chat --name "MyAssistant" --msg '[{{{{"role": "user", "content": "Hello"}}}}]'
184
+ starts a chat session with the specified assistant
174
185
 
175
186
  {AUTHORS_SECTION}
176
187
  """
@@ -193,10 +204,16 @@ DESCRIPTION
193
204
 
194
205
  EXAMPLES
195
206
  The command:
196
-
207
+ geai rag list-assistants
208
+ lists all RAG assistants in the current project.
197
209
 
198
210
  The command:
199
- ...
211
+ geai rag get-assistant --name "MyRAG"
212
+ retrieves information about a specific RAG assistant.
213
+
214
+ The command:
215
+ geai rag upload-document --name "MyRAG" --file "document.pdf"
216
+ uploads a document to a RAG assistant's knowledge base
200
217
 
201
218
  {AUTHORS_SECTION}
202
219
  """
@@ -232,9 +249,16 @@ DESCRIPTION
232
249
  EXAMPLES
233
250
  The command:
234
251
 
252
+ geai chat iris
253
+ starts an interactive chat session with Iris assistant.
235
254
 
236
255
  The command:
237
- ...
256
+ geai chat agent --name "MyAgent"
257
+ starts a chat session with a specific agent.
258
+
259
+ The command:
260
+ geai chat completion --model "saia:assistant:MyAssistant" --msg '[{{{{"role": "user", "content": "Hello"}}}}]' --stream 0
261
+ sends a completion request to the specified assistant
238
262
 
239
263
  {AUTHORS_SECTION}
240
264
  """
@@ -258,9 +282,12 @@ DESCRIPTION
258
282
  EXAMPLES
259
283
  The command:
260
284
 
285
+ geai gam get-access-token
286
+ retrieves the current GAM access token.
261
287
 
262
288
  The command:
263
- ...
289
+ geai gam get-user-info
290
+ retrieves user information from GAM
264
291
 
265
292
  {AUTHORS_SECTION}
266
293
  """
@@ -284,9 +311,12 @@ DESCRIPTION
284
311
  EXAMPLES
285
312
  The command:
286
313
 
314
+ geai secrets create-secret --name "API_KEY" --value "secret_value"
315
+ creates a new secret in the secrets manager.
287
316
 
288
317
  The command:
289
- ...
318
+ geai secrets list-secrets
319
+ lists all secrets stored in the project
290
320
 
291
321
  {AUTHORS_SECTION}
292
322
  """
@@ -310,9 +340,12 @@ DESCRIPTION
310
340
  EXAMPLES
311
341
  The command:
312
342
 
343
+ geai migrate agent --agent-id "UUID" --target-project "TARGET_UUID"
344
+ migrates an agent to a different project.
313
345
 
314
346
  The command:
315
- ...
347
+ geai migrate process --process-id "UUID" --target-project "TARGET_UUID"
348
+ migrates an agentic process to another project
316
349
 
317
350
  {AUTHORS_SECTION}
318
351
  """
@@ -336,9 +369,12 @@ DESCRIPTION
336
369
  EXAMPLES
337
370
  The command:
338
371
 
372
+ geai rerank rerank-chunks --query "search term" --documents '["doc1", "doc2"]' --model "cohere/rerank-english-v3.0"
373
+ reranks the provided documents based on relevance to the query.
339
374
 
340
375
  The command:
341
- ...
376
+ geai rerank chunks -q "my query" -d "document text" --top-n 5
377
+ reranks chunks and returns top 5 results
342
378
 
343
379
  {AUTHORS_SECTION}
344
380
  """
@@ -363,9 +399,16 @@ DESCRIPTION
363
399
  EXAMPLES
364
400
  The command:
365
401
 
402
+ geai emb generate -i "Help me with Globant Enterprise AI" -m "openai/text-embedding-3-small"
403
+ generates embeddings for the provided text.
366
404
 
367
405
  The command:
368
- ...
406
+ geai emb generate -i "Help me with" -i "Globant Enterprise AI" -m "openai/text-embedding-3-small" --cache 1
407
+ generates embeddings with caching enabled for multiple inputs.
408
+
409
+ The command:
410
+ geai emb generate -i "text" -m "vertex_ai/text-embedding-004" --input-type "SEMANTIC_SIMILARITY"
411
+ generates embeddings with a specific input type
369
412
 
370
413
  {AUTHORS_SECTION}
371
414
  """
@@ -389,9 +432,12 @@ DESCRIPTION
389
432
  EXAMPLES
390
433
  The command:
391
434
 
435
+ geai feedback send --request-id "UUID" --rating 5 --comment "Great response"
436
+ sends positive feedback for an assistant response.
392
437
 
393
438
  The command:
394
- ...
439
+ geai feedback list --assistant-id "UUID"
440
+ lists all feedback for a specific assistant
395
441
 
396
442
  {AUTHORS_SECTION}
397
443
  """
@@ -511,9 +557,45 @@ DESCRIPTION
511
557
  EXAMPLES
512
558
  The command:
513
559
 
560
+ geai admin validate-token
561
+ validates the current API token.
514
562
 
515
563
  The command:
516
- ...
564
+ geai admin list-authorized-organizations
565
+ lists all organizations the current user has access to.
566
+
567
+ The command:
568
+ geai admin project-visibility --project-id "UUID"
569
+ retrieves visibility settings for a specific project
570
+
571
+ {AUTHORS_SECTION}
572
+ """
573
+
574
+ AUTH_HELP_TEXT = f"""
575
+ GEAI CLI - AUTH
576
+ -----------------------
577
+
578
+ NAME
579
+ geai - Command Line Interface for Globant Enterprise AI
580
+
581
+ SYNOPSIS
582
+ geai auth <subcommand> --[flag] [flag_arg]
583
+
584
+ DESCRIPTION
585
+ geai auth is a command from geai cli utility, developed to manage authentication access tokens instance of GEAI.
586
+
587
+ The options are as follows:
588
+ {{available_commands}}
589
+
590
+ EXAMPLES
591
+ The command:
592
+
593
+ geai auth get-access-token
594
+ retrieves an OAuth2 access token for authentication.
595
+
596
+ The command:
597
+ geai auth get-user-info
598
+ retrieves the current user's profile information
517
599
 
518
600
  {AUTHORS_SECTION}
519
601
  """
@@ -539,9 +621,12 @@ DESCRIPTION
539
621
  EXAMPLES
540
622
  The command:
541
623
 
624
+ geai llm list-models
625
+ lists all available LLM models in GEAI.
542
626
 
543
627
  The command:
544
- ...
628
+ geai llm list-providers
629
+ lists all available LLM providers
545
630
 
546
631
  {AUTHORS_SECTION}
547
632
  """
@@ -565,9 +650,12 @@ DESCRIPTION
565
650
  EXAMPLES
566
651
  The command:
567
652
 
653
+ geai files upload --file "document.pdf" --purpose "assistants"
654
+ uploads a file to GEAI for use with assistants.
568
655
 
569
656
  The command:
570
- ...
657
+ geai files list
658
+ lists all uploaded files in the project
571
659
 
572
660
  {AUTHORS_SECTION}
573
661
  """
@@ -591,9 +679,16 @@ DESCRIPTION
591
679
  EXAMPLES
592
680
  The command:
593
681
 
682
+ geai -a myorg usage-limit set-organization-limit --organization <ORG_UUID> --subscription-type Monthly --usage-unit Cost --soft-limit 1000 --hard-limit 5000 --renewal-status Renewable
683
+ sets usage limits for an organization.
594
684
 
595
685
  The command:
596
- ...
686
+ geai -a myorg usage-limit get-latest-org-lim --organization <ORG_UUID>
687
+ retrieves the latest usage limit for an organization.
688
+
689
+ The command:
690
+ geai -a myorg usage-limit up-org-lim --organization <ORG_UUID> --lid <LIMIT_UUID> --renewal-status Renewable --soft-limit 5000 --hard-limit 8000
691
+ updates an existing usage limit for an organization
597
692
 
598
693
  {AUTHORS_SECTION}
599
694
  """
@@ -617,9 +712,16 @@ DESCRIPTION
617
712
  EXAMPLES
618
713
  The command:
619
714
 
715
+ geai ai-lab create-agent --name "MyAgent" --instructions "You are a helpful agent"
716
+ creates a new agent in the AI Lab.
620
717
 
621
718
  The command:
622
- ...
719
+ geai ai-lab list-agents
720
+ lists all agents in the current project.
721
+
722
+ The command:
723
+ geai ai-lab create-process --name "MyProcess" --description "Automated workflow"
724
+ creates a new agentic process
623
725
 
624
726
  {AUTHORS_SECTION}
625
727
  """
@@ -643,9 +745,40 @@ DESCRIPTION
643
745
  EXAMPLES
644
746
  The command:
645
747
 
748
+ geai spec load-agent --file "agent_spec.json"
749
+ loads an agent from a JSON specification file.
646
750
 
647
751
  The command:
648
- ...
752
+ geai spec load-process --file "process_spec.json"
753
+ loads an agentic process from a JSON specification file
754
+
755
+ {AUTHORS_SECTION}
756
+ """
757
+
758
+ DOCS_HELP_TEXT = f"""
759
+ GEAI CLI - DOCS
760
+ ---------------
761
+
762
+ NAME
763
+ geai - Command Line Interface for Globant Enterprise AI
764
+
765
+ SYNOPSIS
766
+ geai docs <subcommand>
767
+
768
+ DESCRIPTION
769
+ geai docs is a command from geai cli utility to view the PyGEAI SDK documentation.
770
+
771
+ The options are as follows:
772
+ {{available_commands}}
773
+
774
+ EXAMPLES
775
+ The command:
776
+
777
+ geai docs
778
+ opens the HTML documentation in your web browser.
779
+
780
+ If documentation dependencies are not installed, you will be prompted to install them.
781
+ If the documentation is not built, it will be automatically generated.
649
782
 
650
783
  {AUTHORS_SECTION}
651
784
  """