pygeai 0.6.0b13__py3-none-any.whl → 0.6.1__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 -2
- pygeai/_docs/source/content/api_reference/project.rst +392 -0
- pygeai/_docs/source/content/authentication.rst +130 -1
- pygeai/_docs/source/content/debugger.rst +327 -157
- pygeai/_docs/source/content/migration.rst +391 -7
- pygeai/_docs/source/pygeai.core.common.rst +8 -0
- pygeai/_docs/source/pygeai.tests.auth.rst +56 -0
- pygeai/_docs/source/pygeai.tests.cli.rst +8 -0
- pygeai/admin/clients.py +1 -3
- pygeai/analytics/clients.py +1 -1
- pygeai/assistant/clients.py +2 -7
- pygeai/assistant/data/clients.py +0 -8
- pygeai/assistant/data_analyst/clients.py +0 -2
- pygeai/assistant/managers.py +1 -1
- pygeai/assistant/rag/clients.py +0 -2
- pygeai/assistant/rag/mappers.py +9 -11
- pygeai/auth/clients.py +26 -7
- pygeai/auth/endpoints.py +2 -1
- pygeai/chat/clients.py +2 -2
- pygeai/chat/managers.py +1 -1
- pygeai/cli/commands/admin.py +13 -25
- pygeai/cli/commands/analytics.py +56 -88
- pygeai/cli/commands/assistant.py +84 -138
- pygeai/cli/commands/auth.py +23 -46
- pygeai/cli/commands/base.py +0 -1
- pygeai/cli/commands/chat.py +218 -209
- pygeai/cli/commands/common.py +5 -5
- pygeai/cli/commands/configuration.py +79 -29
- pygeai/cli/commands/docs.py +3 -4
- pygeai/cli/commands/embeddings.py +13 -19
- pygeai/cli/commands/evaluation.py +133 -344
- pygeai/cli/commands/feedback.py +7 -15
- pygeai/cli/commands/files.py +26 -53
- pygeai/cli/commands/gam.py +28 -69
- pygeai/cli/commands/lab/ai_lab.py +96 -142
- pygeai/cli/commands/lab/common.py +1 -1
- pygeai/cli/commands/lab/spec.py +12 -32
- pygeai/cli/commands/llm.py +9 -18
- pygeai/cli/commands/migrate.py +43 -99
- pygeai/cli/commands/organization.py +223 -196
- pygeai/cli/commands/rag.py +35 -58
- pygeai/cli/commands/rerank.py +21 -25
- pygeai/cli/commands/secrets.py +39 -67
- pygeai/cli/commands/usage_limits.py +50 -136
- pygeai/cli/commands/validators.py +1 -1
- pygeai/cli/geai.py +32 -3
- pygeai/cli/geai_proxy.py +6 -2
- pygeai/cli/install_man.py +1 -1
- pygeai/cli/parsers.py +1 -1
- pygeai/core/base/clients.py +90 -21
- pygeai/core/base/mappers.py +39 -55
- pygeai/core/base/session.py +134 -22
- pygeai/core/common/config.py +50 -13
- pygeai/core/common/constants.py +8 -0
- pygeai/core/common/exceptions.py +6 -0
- pygeai/core/embeddings/clients.py +0 -1
- pygeai/core/embeddings/managers.py +0 -1
- pygeai/core/feedback/clients.py +0 -2
- pygeai/core/feedback/models.py +1 -1
- pygeai/core/files/clients.py +0 -3
- pygeai/core/files/managers.py +1 -1
- pygeai/core/files/mappers.py +4 -5
- pygeai/core/llm/clients.py +0 -1
- pygeai/core/models.py +4 -4
- pygeai/core/plugins/clients.py +0 -3
- pygeai/core/plugins/models.py +2 -2
- pygeai/core/rerank/clients.py +0 -2
- pygeai/core/secrets/clients.py +0 -2
- pygeai/core/services/rest.py +80 -14
- pygeai/core/singleton.py +24 -0
- pygeai/dbg/__init__.py +2 -2
- pygeai/dbg/debugger.py +276 -38
- pygeai/evaluation/clients.py +2 -4
- pygeai/evaluation/dataset/clients.py +0 -1
- pygeai/evaluation/plan/clients.py +0 -2
- pygeai/evaluation/result/clients.py +0 -2
- pygeai/gam/clients.py +1 -3
- pygeai/health/clients.py +1 -3
- pygeai/lab/clients.py +0 -1
- pygeai/lab/managers.py +0 -1
- pygeai/lab/models.py +0 -1
- pygeai/lab/strategies/clients.py +1 -2
- pygeai/lab/tools/clients.py +2 -2
- pygeai/lab/tools/mappers.py +1 -1
- pygeai/migration/strategies.py +5 -6
- pygeai/migration/tools.py +1 -1
- pygeai/organization/clients.py +118 -12
- pygeai/organization/endpoints.py +1 -0
- pygeai/organization/limits/clients.py +4 -6
- pygeai/organization/limits/managers.py +1 -4
- pygeai/organization/managers.py +2 -2
- pygeai/proxy/config.py +1 -0
- pygeai/proxy/managers.py +6 -5
- pygeai/tests/admin/test_clients.py +11 -11
- pygeai/tests/assistants/rag/test_clients.py +1 -1
- pygeai/tests/assistants/rag/test_models.py +1 -2
- pygeai/tests/assistants/test_clients.py +1 -1
- pygeai/tests/assistants/test_managers.py +1 -3
- pygeai/tests/auth/test_cli_configuration.py +252 -0
- pygeai/tests/auth/test_client_initialization.py +411 -0
- pygeai/tests/auth/test_clients.py +29 -27
- pygeai/tests/auth/test_config_manager.py +305 -0
- pygeai/tests/auth/test_header_injection.py +294 -0
- pygeai/tests/auth/test_oauth.py +3 -1
- pygeai/tests/auth/test_session_logging.py +119 -0
- pygeai/tests/auth/test_session_validation.py +408 -0
- pygeai/tests/auth/test_singleton_reset.py +201 -0
- pygeai/tests/chat/test_clients.py +1 -1
- pygeai/tests/chat/test_iris.py +1 -1
- pygeai/tests/chat/test_ui.py +0 -2
- pygeai/tests/cli/commands/lab/test_ai_lab.py +1 -3
- pygeai/tests/cli/commands/lab/test_common.py +0 -1
- pygeai/tests/cli/commands/test_chat.py +1 -1
- pygeai/tests/cli/commands/test_common.py +0 -1
- pygeai/tests/cli/commands/test_embeddings.py +2 -2
- pygeai/tests/cli/commands/test_evaluation.py +1 -9
- pygeai/tests/cli/commands/test_llm.py +1 -1
- pygeai/tests/cli/commands/test_migrate.py +1 -1
- pygeai/tests/cli/commands/test_rerank.py +0 -1
- pygeai/tests/cli/commands/test_secrets.py +1 -1
- pygeai/tests/cli/commands/test_show_help.py +0 -1
- pygeai/tests/cli/commands/test_validators.py +0 -1
- pygeai/tests/cli/test_credentials_flag.py +312 -0
- pygeai/tests/cli/test_error_handler.py +0 -1
- pygeai/tests/core/base/test_mappers.py +2 -2
- pygeai/tests/core/base/test_models.py +4 -4
- pygeai/tests/core/common/test_config.py +2 -7
- pygeai/tests/core/common/test_decorators.py +0 -1
- pygeai/tests/core/embeddings/test_managers.py +1 -1
- pygeai/tests/core/feedback/test_clients.py +2 -2
- pygeai/tests/core/files/test_clients.py +6 -6
- pygeai/tests/core/files/test_models.py +0 -1
- pygeai/tests/core/files/test_responses.py +0 -1
- pygeai/tests/core/llm/test_clients.py +1 -1
- pygeai/tests/core/plugins/test_clients.py +4 -4
- pygeai/tests/core/rerank/test_mappers.py +1 -3
- pygeai/tests/core/secrets/test_clients.py +2 -3
- pygeai/tests/core/services/test_rest.py +10 -10
- pygeai/tests/core/utils/test_console.py +0 -1
- pygeai/tests/dbg/test_debugger.py +95 -8
- pygeai/tests/evaluation/dataset/test_clients.py +24 -27
- pygeai/tests/evaluation/plan/test_clients.py +16 -18
- pygeai/tests/evaluation/result/test_clients.py +4 -5
- pygeai/tests/health/test_clients.py +2 -2
- pygeai/tests/integration/lab/agents/test_create_agent.py +1 -3
- pygeai/tests/integration/lab/agents/test_get_agent.py +1 -1
- pygeai/tests/integration/lab/processes/test_create_process.py +2 -2
- pygeai/tests/integration/lab/processes/test_create_task.py +2 -3
- pygeai/tests/integration/lab/processes/test_delete_process.py +0 -1
- pygeai/tests/integration/lab/processes/test_get_process.py +2 -4
- pygeai/tests/integration/lab/processes/test_list_process_instances.py +1 -3
- pygeai/tests/integration/lab/processes/test_update_process.py +3 -9
- pygeai/tests/integration/lab/reasoning_strategies/test_update_reasoning_strategy.py +1 -2
- pygeai/tests/integration/lab/tools/test_delete_tool.py +1 -1
- pygeai/tests/integration/lab/tools/test_list_tools.py +1 -1
- pygeai/tests/integration/lab/tools/test_update_tool.py +1 -1
- pygeai/tests/lab/agents/test_clients.py +17 -17
- pygeai/tests/lab/processes/test_clients.py +67 -67
- pygeai/tests/lab/processes/test_mappers.py +23 -23
- pygeai/tests/lab/spec/test_loader.py +0 -2
- pygeai/tests/lab/spec/test_parsers.py +1 -2
- pygeai/tests/lab/strategies/test_clients.py +10 -10
- pygeai/tests/lab/test_managers.py +3 -5
- pygeai/tests/lab/test_mappers.py +1 -4
- pygeai/tests/lab/tools/test_clients.py +21 -21
- pygeai/tests/lab/tools/test_mappers.py +0 -1
- pygeai/tests/organization/limits/test_clients.py +33 -33
- pygeai/tests/organization/limits/test_managers.py +7 -7
- pygeai/tests/organization/test_clients.py +78 -60
- pygeai/tests/proxy/test_clients.py +1 -1
- pygeai/tests/proxy/test_integration.py +1 -4
- pygeai/tests/proxy/test_managers.py +1 -2
- pygeai/tests/proxy/test_servers.py +1 -2
- pygeai/tests/snippets/assistants/rag/delete_rag_assistant.py +0 -1
- pygeai/tests/snippets/assistants/rag/get_documents.py +0 -1
- pygeai/tests/snippets/assistants/rag/get_rag_assistant_data.py +0 -1
- pygeai/tests/snippets/chat/get_request_status.py +0 -1
- pygeai/tests/snippets/dbg/file_debugging.py +72 -0
- pygeai/tests/snippets/dbg/module_debugging.py +60 -0
- pygeai/tests/snippets/embeddings/cohere_example.py +2 -2
- pygeai/tests/snippets/embeddings/openai_base64_example.py +1 -1
- pygeai/tests/snippets/evaluation/dataset/complete_workflow_example.py +8 -8
- pygeai/tests/snippets/evaluation/plan/complete_workflow_example.py +5 -5
- pygeai/tests/snippets/evaluation/result/complete_workflow_example.py +3 -3
- pygeai/tests/snippets/lab/agentic_flow_example_1.py +1 -1
- pygeai/tests/snippets/lab/agentic_flow_example_2.py +3 -4
- pygeai/tests/snippets/lab/agents/create_agent_with_permissions.py +2 -2
- pygeai/tests/snippets/lab/agents/delete_agent.py +1 -2
- pygeai/tests/snippets/lab/agents/get_agent.py +1 -1
- pygeai/tests/snippets/lab/agents/get_agent_with_new_fields.py +10 -10
- pygeai/tests/snippets/lab/agents/get_sharing_link.py +0 -1
- pygeai/tests/snippets/lab/agents/list_agents.py +1 -1
- pygeai/tests/snippets/lab/agents/publish_agent_revision.py +0 -1
- pygeai/tests/snippets/lab/agents/update_agent_properties.py +1 -1
- pygeai/tests/snippets/lab/crud_ui.py +3 -5
- pygeai/tests/snippets/lab/processes/kbs/get_kb.py +0 -1
- pygeai/tests/snippets/lab/processes/kbs/list_kbs.py +0 -1
- pygeai/tests/snippets/lab/processes/list_processes.py +1 -1
- pygeai/tests/snippets/lab/samples/summarize_files.py +0 -3
- pygeai/tests/snippets/lab/strategies/get_reasoning_strategy.py +0 -1
- pygeai/tests/snippets/lab/strategies/list_reasoning_strategies.py +1 -1
- pygeai/tests/snippets/lab/tools/get_tool.py +1 -1
- pygeai/tests/snippets/lab/tools/publish_tool_revision.py +0 -1
- pygeai/tests/snippets/lab/tools/set_parameters.py +1 -2
- pygeai/tests/snippets/lab/use_cases/c_code_fixer_agent_flow.py +2 -3
- pygeai/tests/snippets/lab/use_cases/file_summarizer_example_2.py +1 -1
- pygeai/tests/snippets/lab/use_cases/update_cli_expert.py +0 -1
- pygeai/tests/snippets/lab/use_cases/update_lab_expert.py +0 -1
- pygeai/tests/snippets/lab/use_cases/update_web_designer.py +0 -1
- pygeai/tests/snippets/lab/use_cases/update_web_reader.py +0 -1
- pygeai/tests/snippets/migrate/orchestrator_examples.py +1 -1
- {pygeai-0.6.0b13.dist-info → pygeai-0.6.1.dist-info}/METADATA +32 -7
- {pygeai-0.6.0b13.dist-info → pygeai-0.6.1.dist-info}/RECORD +217 -206
- {pygeai-0.6.0b13.dist-info → pygeai-0.6.1.dist-info}/WHEEL +0 -0
- {pygeai-0.6.0b13.dist-info → pygeai-0.6.1.dist-info}/entry_points.txt +0 -0
- {pygeai-0.6.0b13.dist-info → pygeai-0.6.1.dist-info}/licenses/LICENSE +0 -0
- {pygeai-0.6.0b13.dist-info → pygeai-0.6.1.dist-info}/top_level.txt +0 -0
|
@@ -123,7 +123,7 @@ def main():
|
|
|
123
123
|
dataset_type="T",
|
|
124
124
|
dataset_active=True
|
|
125
125
|
)
|
|
126
|
-
print(
|
|
126
|
+
print("✓ Updated dataset description")
|
|
127
127
|
|
|
128
128
|
# Update a row
|
|
129
129
|
updated_row = client.update_dataset_row(
|
|
@@ -135,7 +135,7 @@ def main():
|
|
|
135
135
|
"dataSetRowContextDocument": "DL is particularly effective for image and speech recognition."
|
|
136
136
|
}
|
|
137
137
|
)
|
|
138
|
-
print(
|
|
138
|
+
print("✓ Updated row 2")
|
|
139
139
|
|
|
140
140
|
# Update expected source
|
|
141
141
|
updated_source = client.update_expected_source(
|
|
@@ -146,7 +146,7 @@ def main():
|
|
|
146
146
|
expected_source_value="Updated source content about Machine Learning.",
|
|
147
147
|
expected_source_extension="txt"
|
|
148
148
|
)
|
|
149
|
-
print(
|
|
149
|
+
print("✓ Updated expected source")
|
|
150
150
|
|
|
151
151
|
# Update filter variable
|
|
152
152
|
updated_filter = client.update_filter_variable(
|
|
@@ -158,7 +158,7 @@ def main():
|
|
|
158
158
|
filter_variable_value="intermediate",
|
|
159
159
|
filter_variable_operator="="
|
|
160
160
|
)
|
|
161
|
-
print(
|
|
161
|
+
print("✓ Updated filter variable")
|
|
162
162
|
|
|
163
163
|
# Step 7: Cleanup
|
|
164
164
|
print("\n[7/7] Cleaning up...")
|
|
@@ -166,20 +166,20 @@ def main():
|
|
|
166
166
|
# Delete filter variables
|
|
167
167
|
client.delete_filter_variable(dataset_id=dataset_id, dataset_row_id=row1_id, filter_variable_id=filter1_id)
|
|
168
168
|
client.delete_filter_variable(dataset_id=dataset_id, dataset_row_id=row1_id, filter_variable_id=filter2_id)
|
|
169
|
-
print(
|
|
169
|
+
print("✓ Deleted filter variables")
|
|
170
170
|
|
|
171
171
|
# Delete expected source
|
|
172
172
|
client.delete_expected_source(dataset_id=dataset_id, dataset_row_id=row1_id, expected_source_id=source1_id)
|
|
173
|
-
print(
|
|
173
|
+
print("✓ Deleted expected source")
|
|
174
174
|
|
|
175
175
|
# Delete rows
|
|
176
176
|
client.delete_dataset_row(dataset_id=dataset_id, dataset_row_id=row1_id)
|
|
177
177
|
client.delete_dataset_row(dataset_id=dataset_id, dataset_row_id=row2_id)
|
|
178
|
-
print(
|
|
178
|
+
print("✓ Deleted rows")
|
|
179
179
|
|
|
180
180
|
# Delete dataset
|
|
181
181
|
client.delete_dataset(dataset_id=dataset_id)
|
|
182
|
-
print(
|
|
182
|
+
print("✓ Deleted dataset")
|
|
183
183
|
|
|
184
184
|
print("\n" + "="*60)
|
|
185
185
|
print("Workflow completed successfully!")
|
|
@@ -83,7 +83,7 @@ def main():
|
|
|
83
83
|
system_metric_id="accuracy",
|
|
84
84
|
system_metric_weight=0.8
|
|
85
85
|
)
|
|
86
|
-
print(
|
|
86
|
+
print("✓ Updated metric weight")
|
|
87
87
|
|
|
88
88
|
# Get specific metric details
|
|
89
89
|
metric_detail = client.get_evaluation_plan_system_metric(
|
|
@@ -99,12 +99,12 @@ def main():
|
|
|
99
99
|
name="Updated Performance Test",
|
|
100
100
|
assistant_revision="2.0"
|
|
101
101
|
)
|
|
102
|
-
print(
|
|
102
|
+
print("✓ Updated plan")
|
|
103
103
|
|
|
104
104
|
# Execute the evaluation plan
|
|
105
105
|
print("\n[EXECUTE] Running evaluation plan...")
|
|
106
106
|
execution = client.execute_evaluation_plan(evaluation_plan_id=plan_id)
|
|
107
|
-
print(
|
|
107
|
+
print("✓ Execution started")
|
|
108
108
|
print(f" Execution ID: {execution.get('executionId')}")
|
|
109
109
|
print(f" Status: {execution.get('status')}")
|
|
110
110
|
|
|
@@ -116,11 +116,11 @@ def main():
|
|
|
116
116
|
evaluation_plan_id=plan_id,
|
|
117
117
|
system_metric_id="relevance"
|
|
118
118
|
)
|
|
119
|
-
print(
|
|
119
|
+
print("✓ Deleted added metric")
|
|
120
120
|
|
|
121
121
|
# Delete the plan
|
|
122
122
|
client.delete_evaluation_plan(evaluation_plan_id=plan_id)
|
|
123
|
-
print(
|
|
123
|
+
print("✓ Deleted evaluation plan")
|
|
124
124
|
|
|
125
125
|
print("\n" + "="*60)
|
|
126
126
|
print("Workflow completed successfully!")
|
|
@@ -98,7 +98,7 @@ def main():
|
|
|
98
98
|
|
|
99
99
|
# Show sample row
|
|
100
100
|
if rows:
|
|
101
|
-
print(
|
|
101
|
+
print("\n Sample Row:")
|
|
102
102
|
sample_row = rows[0]
|
|
103
103
|
print(f" Dataset Row ID: {sample_row.get('dataSetRowId')}")
|
|
104
104
|
print(f" Status: {sample_row.get('evaluationResultRowStatus')}")
|
|
@@ -108,7 +108,7 @@ def main():
|
|
|
108
108
|
|
|
109
109
|
output = sample_row.get('evaluationResultRowOutput', '')
|
|
110
110
|
if output:
|
|
111
|
-
print(
|
|
111
|
+
print(" Output (first 200 chars):")
|
|
112
112
|
print(f" {output[:200]}...")
|
|
113
113
|
|
|
114
114
|
# Step 4: Display aggregated analytics
|
|
@@ -122,7 +122,7 @@ def main():
|
|
|
122
122
|
print(f"Average Cost per Evaluation: ${total_cost/len(results):.4f}")
|
|
123
123
|
print(f"Average Duration per Evaluation: {total_duration/len(results):.0f}ms")
|
|
124
124
|
|
|
125
|
-
print(
|
|
125
|
+
print("\nStatus Distribution:")
|
|
126
126
|
for status, count in status_counts.items():
|
|
127
127
|
percentage = (count / len(results) * 100) if results else 0
|
|
128
128
|
print(f" {status}: {count} ({percentage:.1f}%)")
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
from pygeai.lab.managers import AILabManager
|
|
2
2
|
from pygeai.lab.models import (
|
|
3
|
-
Agent, AgentData, Prompt,
|
|
4
|
-
Tool,
|
|
5
|
-
Task,
|
|
3
|
+
Agent, AgentData, Prompt, PromptOutput, LlmConfig, Sampling, Model, ModelList,
|
|
4
|
+
Tool, Task,
|
|
6
5
|
AgenticProcess, KnowledgeBase, AgenticActivity, ArtifactSignal, UserSignal, Event, SequenceFlow,
|
|
7
|
-
|
|
6
|
+
ProcessInstance
|
|
8
7
|
)
|
|
9
8
|
|
|
10
9
|
manager = AILabManager()
|
|
@@ -30,10 +30,10 @@ print(f"Created agent: {result.name}")
|
|
|
30
30
|
print(f"Agent ID: {result.id}")
|
|
31
31
|
print(f"Sharing scope: {result.sharing_scope}")
|
|
32
32
|
if result.permissions:
|
|
33
|
-
print(
|
|
33
|
+
print("\nPermissions:")
|
|
34
34
|
print(f" - Allow chat sharing: {result.permissions.allow_chat_sharing}")
|
|
35
35
|
print(f" - Allow external execution: {result.permissions.allow_external_execution}")
|
|
36
36
|
if result.effective_permissions:
|
|
37
|
-
print(
|
|
37
|
+
print("\nEffective Permissions:")
|
|
38
38
|
print(f" - Allow chat sharing: {result.effective_permissions.allow_chat_sharing}")
|
|
39
39
|
print(f" - Allow external execution: {result.effective_permissions.allow_external_execution}")
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
from pygeai.core.base.responses import EmptyResponse
|
|
2
1
|
from pygeai.lab.managers import AILabManager
|
|
3
2
|
|
|
4
3
|
manager = AILabManager()
|
|
@@ -9,4 +8,4 @@ result = manager.delete_agent(
|
|
|
9
8
|
agent_id=agent_id
|
|
10
9
|
)
|
|
11
10
|
|
|
12
|
-
print(
|
|
11
|
+
print("Agent deleted successfully")
|
|
@@ -16,30 +16,30 @@ agent = manager.get_agent(agent_id)
|
|
|
16
16
|
print(f"Agent: {agent.name} (ID: {agent.id})")
|
|
17
17
|
print(f"Status: {agent.status}")
|
|
18
18
|
print(f"Is Draft: {agent.is_draft}")
|
|
19
|
-
print(
|
|
19
|
+
print("\n=== New Fields ===")
|
|
20
20
|
|
|
21
21
|
# Sharing scope
|
|
22
22
|
print(f"\nSharing Scope: {agent.sharing_scope}")
|
|
23
23
|
|
|
24
24
|
# Permissions
|
|
25
25
|
if agent.permissions:
|
|
26
|
-
print(
|
|
26
|
+
print("\nPermissions:")
|
|
27
27
|
print(f" - Allow chat sharing: {agent.permissions.allow_chat_sharing}")
|
|
28
28
|
print(f" - Allow external execution: {agent.permissions.allow_external_execution}")
|
|
29
29
|
else:
|
|
30
|
-
print(
|
|
30
|
+
print("\nPermissions: None")
|
|
31
31
|
|
|
32
32
|
# Effective permissions
|
|
33
33
|
if agent.effective_permissions:
|
|
34
|
-
print(
|
|
34
|
+
print("\nEffective Permissions:")
|
|
35
35
|
print(f" - Allow chat sharing: {agent.effective_permissions.allow_chat_sharing}")
|
|
36
36
|
print(f" - Allow external execution: {agent.effective_permissions.allow_external_execution}")
|
|
37
37
|
else:
|
|
38
|
-
print(
|
|
38
|
+
print("\nEffective Permissions: None")
|
|
39
39
|
|
|
40
40
|
# Agent data properties
|
|
41
41
|
if agent.agent_data:
|
|
42
|
-
print(
|
|
42
|
+
print("\nAgent Data:")
|
|
43
43
|
print(f" - Strategy Name: {agent.agent_data.strategy_name}")
|
|
44
44
|
|
|
45
45
|
if agent.agent_data.properties:
|
|
@@ -47,16 +47,16 @@ if agent.agent_data:
|
|
|
47
47
|
for prop in agent.agent_data.properties:
|
|
48
48
|
print(f" * {prop.key} ({prop.data_type}): {prop.value}")
|
|
49
49
|
else:
|
|
50
|
-
print(
|
|
50
|
+
print(" - Properties: None")
|
|
51
51
|
|
|
52
52
|
if agent.agent_data.models:
|
|
53
53
|
print(f" - Models: {len(agent.agent_data.models)} configured")
|
|
54
54
|
else:
|
|
55
|
-
print(
|
|
55
|
+
print(" - Models: None")
|
|
56
56
|
|
|
57
57
|
if agent.agent_data.resource_pools:
|
|
58
58
|
print(f" - Resource Pools: {len(agent.agent_data.resource_pools)} configured")
|
|
59
59
|
else:
|
|
60
|
-
print(
|
|
60
|
+
print(" - Resource Pools: None")
|
|
61
61
|
else:
|
|
62
|
-
print(
|
|
62
|
+
print("\nAgent Data: None")
|
|
@@ -37,7 +37,7 @@ if agent.agent_data:
|
|
|
37
37
|
# Update the agent
|
|
38
38
|
updated_agent = manager.update_agent(agent)
|
|
39
39
|
|
|
40
|
-
print(
|
|
40
|
+
print("\nAgent updated successfully!")
|
|
41
41
|
print(f"Agent ID: {updated_agent.id}")
|
|
42
42
|
|
|
43
43
|
if updated_agent.agent_data and updated_agent.agent_data.properties:
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import json
|
|
2
2
|
import streamlit as st
|
|
3
|
-
from typing import
|
|
3
|
+
from typing import Any
|
|
4
4
|
from pygeai.lab.managers import AILabManager
|
|
5
5
|
from pygeai.lab.models import (
|
|
6
|
-
Agent, AgentData, Prompt,
|
|
7
|
-
Tool, ToolParameter,
|
|
8
|
-
Task, AgenticProcess, KnowledgeBase, AgenticActivity, ArtifactSignal, UserSignal, Event, SequenceFlow,
|
|
9
|
-
Variable, VariableList, FilterSettings
|
|
6
|
+
Agent, AgentData, Prompt, LlmConfig, Sampling, Model, ModelList,
|
|
7
|
+
Tool, ToolParameter, Task, AgenticProcess, KnowledgeBase
|
|
10
8
|
)
|
|
11
9
|
|
|
12
10
|
# Initialize the manager
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from pygeai.lab.managers import AILabManager
|
|
2
|
-
from pygeai.lab.models import FilterSettings
|
|
2
|
+
from pygeai.lab.models import FilterSettings
|
|
3
3
|
|
|
4
4
|
manager = AILabManager()
|
|
5
5
|
filter_settings = FilterSettings(id="30a2ab8c-7503-4220-b6a0-77f3ee40d365", start="0", count="100", allow_drafts=True)
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import logging
|
|
2
|
-
import os
|
|
3
2
|
from uuid import uuid4
|
|
4
3
|
|
|
5
|
-
from dotenv import load_dotenv
|
|
6
|
-
from pydantic_settings import SettingsConfigDict
|
|
7
4
|
from pygeai.chat.managers import ChatManager
|
|
8
5
|
from pygeai.core.files.responses import UploadFileResponse
|
|
9
6
|
from pygeai.lab.managers import AILabManager
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
from pygeai.lab.managers import AILabManager
|
|
2
2
|
from pygeai.lab.models import (
|
|
3
3
|
Agent, AgentData, Prompt, PromptExample, PromptOutput, LlmConfig, Sampling, Model, ModelList,
|
|
4
|
-
Tool, ToolParameter,
|
|
5
|
-
|
|
6
|
-
AgenticProcess, KnowledgeBase, AgenticActivity, ArtifactSignal, UserSignal, Event, SequenceFlow,
|
|
4
|
+
Tool, ToolParameter, Task,
|
|
5
|
+
AgenticProcess, AgenticActivity, ArtifactSignal, Event, SequenceFlow,
|
|
7
6
|
Variable, ProcessInstance, VariableList
|
|
8
7
|
)
|
|
9
8
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
from pygeai.lab.managers import AILabManager
|
|
2
2
|
from pygeai.lab.models import Agent, AgentData, Prompt, LlmConfig, Model, Sampling, PromptExample, PromptOutput, ResourcePool, ResourcePoolTool, ResourcePoolList, ModelList
|
|
3
|
-
import uuid
|
|
4
3
|
import json
|
|
5
4
|
|
|
6
5
|
WEB_DESIGN_GUIDE = """
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
from pygeai.lab.managers import AILabManager
|
|
2
2
|
from pygeai.lab.models import Agent, AgentData, Prompt, LlmConfig, Model, Sampling, PromptExample, PromptOutput, ResourcePool, ResourcePoolTool, ResourcePoolList, ModelList
|
|
3
|
-
import uuid
|
|
4
3
|
import json
|
|
5
4
|
|
|
6
5
|
WEB_READING_GUIDE = """
|
|
@@ -63,7 +63,7 @@ def example_orchestrated_migration():
|
|
|
63
63
|
# Execute all strategies in order
|
|
64
64
|
results = orchestrator.execute()
|
|
65
65
|
|
|
66
|
-
print(
|
|
66
|
+
print("Migration completed:")
|
|
67
67
|
print(f" Total strategies: {results['total']}")
|
|
68
68
|
print(f" Successful: {results['completed']}")
|
|
69
69
|
print(f" Failed: {results['failed']}")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pygeai
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.1
|
|
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
|
|
@@ -48,35 +48,60 @@ By using the Python SDK to interact with Globant Enterprise AI, you agree with t
|
|
|
48
48
|
[Terms and Conditions](https://www.globant.com/enterprise-ai/terms-of-use)
|
|
49
49
|
|
|
50
50
|
## Compatibility
|
|
51
|
-
This package is compatible with the Globant Enterprise AI release from
|
|
51
|
+
This package is compatible with the Globant Enterprise AI release from January 2026.
|
|
52
52
|
|
|
53
53
|
## Configuration
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
The SDK supports two authentication methods: **API Key** authentication and **OAuth 2.0** authentication.
|
|
56
|
+
|
|
57
|
+
### API Key Authentication
|
|
58
|
+
|
|
59
|
+
Before using the SDK with API Key authentication, you need to define `GEAI_API_KEY` and `GEAI_API_BASE_URL`. You can achieve this in three ways:
|
|
56
60
|
|
|
57
61
|
* **Environment variables:** Set `GEAI_API_KEY` and `GEAI_API_BASE_URL` as environment variables in your operating system.
|
|
58
62
|
* **Credentials file:** Create a file named credentials in the `.geai` directory within your user home directory (`$USER_HOME/.geai/credentials`) and define `GEAI_API_KEY` and `GEAI_API_BASE_URL` within this file.
|
|
59
63
|
* **Client instantiation:** Specify the `api_key` and `base_url` parameters directly when creating an instance of a client class.
|
|
60
64
|
|
|
65
|
+
### OAuth 2.0 Authentication
|
|
66
|
+
|
|
67
|
+
For OAuth 2.0 authentication, you need to define:
|
|
68
|
+
|
|
69
|
+
* `GEAI_OAUTH_ACCESS_TOKEN` - Your OAuth 2.0 access token
|
|
70
|
+
* `GEAI_PROJECT_ID` - Your project ID (required with OAuth)
|
|
71
|
+
* `GEAI_API_BASE_URL` - Base URL for the API
|
|
72
|
+
* `GEAI_ORGANIZATION_ID` - (Optional) Your organization ID
|
|
73
|
+
|
|
74
|
+
These can be configured via environment variables, credentials file, or client instantiation.
|
|
75
|
+
|
|
61
76
|
**Note:** If you plan to use the [Evaluation Module](https://wiki.genexus.com/enterprise-ai/wiki?896,Evaluation), you must also define `GEAI_API_EVAL_URL`
|
|
62
77
|
|
|
63
78
|
### Credentials file
|
|
64
|
-
The credentials file is organized via profiles, so one can interact with different instances of Globant Enterprise AI by just
|
|
79
|
+
The credentials file is organized via profiles (aliases), so one can interact with different instances of Globant Enterprise AI by just
|
|
65
80
|
referencing which profile one wishes to use. This also applies to different levels of permissions.
|
|
66
81
|
|
|
67
82
|
The structure of the credentials file is as follows:
|
|
68
83
|
|
|
84
|
+
**API Key Authentication:**
|
|
85
|
+
|
|
69
86
|
```
|
|
70
87
|
[default]
|
|
71
88
|
geai_api_key = <API_TOKEN>
|
|
72
89
|
geai_api_base_url = <GEAI_BASE_URL>
|
|
73
|
-
|
|
90
|
+
geai_api_eval_url = <GEAI_EVALUATION_MODULE_URL>
|
|
74
91
|
|
|
75
|
-
[
|
|
92
|
+
[production]
|
|
76
93
|
geai_api_key = <API_TOKEN>
|
|
77
94
|
geai_api_base_url = <GEAI_BASE_URL>
|
|
78
|
-
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**OAuth 2.0 Authentication:**
|
|
79
98
|
|
|
99
|
+
```
|
|
100
|
+
[oauth-profile]
|
|
101
|
+
geai_oauth_access_token = <OAUTH_ACCESS_TOKEN>
|
|
102
|
+
geai_project_id = <PROJECT_ID>
|
|
103
|
+
geai_api_base_url = <GEAI_BASE_URL>
|
|
104
|
+
geai_organization_id = <ORGANIZATION_ID> # Optional
|
|
80
105
|
```
|
|
81
106
|
|
|
82
107
|
After setting the profiles, one can use them with the --alias option, for example:
|