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
|
@@ -109,6 +109,383 @@ The required API keys depend on whether you're creating a new project or migrati
|
|
|
109
109
|
.. warning::
|
|
110
110
|
When migrating to an existing project (using ``--to-project-id``), you MUST provide ``--to-api-key``. This is a project scope token that has write access to the destination project.
|
|
111
111
|
|
|
112
|
+
Interactive Mode
|
|
113
|
+
----------------
|
|
114
|
+
|
|
115
|
+
The migration tool provides an **interactive mode** that guides you through the migration process with step-by-step prompts. This mode is ideal when:
|
|
116
|
+
|
|
117
|
+
- You're new to the migration tool and want guidance
|
|
118
|
+
- You don't know the exact IDs of resources to migrate
|
|
119
|
+
- You want to browse and select resources interactively
|
|
120
|
+
- You prefer a wizard-style interface over command-line arguments
|
|
121
|
+
|
|
122
|
+
Invoking Interactive Mode
|
|
123
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
124
|
+
|
|
125
|
+
To start the interactive migration wizard, use the ``--interactive`` or ``-i`` flag:
|
|
126
|
+
|
|
127
|
+
.. code-block:: shell
|
|
128
|
+
|
|
129
|
+
geai migrate clone-project --interactive
|
|
130
|
+
|
|
131
|
+
or shorter:
|
|
132
|
+
|
|
133
|
+
.. code-block:: shell
|
|
134
|
+
|
|
135
|
+
geai migrate clone-project -i
|
|
136
|
+
|
|
137
|
+
Interactive Mode Walkthrough
|
|
138
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
139
|
+
|
|
140
|
+
When you launch interactive mode, the wizard will guide you through the following steps:
|
|
141
|
+
|
|
142
|
+
**Step 1: Migration Type Selection**
|
|
143
|
+
|
|
144
|
+
Choose whether you're migrating within the same instance or to a different instance:
|
|
145
|
+
|
|
146
|
+
.. code-block:: text
|
|
147
|
+
|
|
148
|
+
================================================================================
|
|
149
|
+
PROJECT MIGRATION ASSISTANT
|
|
150
|
+
================================================================================
|
|
151
|
+
|
|
152
|
+
Migration type (1=same instance, 2=cross instance):
|
|
153
|
+
|
|
154
|
+
- Option ``1``: Migrate within the same GEAI instance (destination instance will be same as source)
|
|
155
|
+
- Option ``2``: Migrate to a different GEAI instance (you'll provide separate destination credentials)
|
|
156
|
+
|
|
157
|
+
**Step 2: Source Configuration**
|
|
158
|
+
|
|
159
|
+
Provide your source project credentials:
|
|
160
|
+
|
|
161
|
+
.. code-block:: text
|
|
162
|
+
|
|
163
|
+
--- Source Configuration ---
|
|
164
|
+
Source API key: [enter your source API key]
|
|
165
|
+
Source instance URL: [enter source instance URL, e.g., https://api.dev.example.ai]
|
|
166
|
+
Source project ID: [enter source project ID]
|
|
167
|
+
|
|
168
|
+
The wizard will automatically retrieve your source organization ID from the API token.
|
|
169
|
+
|
|
170
|
+
**Step 3: Project Creation or Selection**
|
|
171
|
+
|
|
172
|
+
Decide whether to create a new destination project or use an existing one:
|
|
173
|
+
|
|
174
|
+
.. code-block:: text
|
|
175
|
+
|
|
176
|
+
Create new destination project? (y/n):
|
|
177
|
+
|
|
178
|
+
- If you choose ``y`` (yes): You'll provide organization API keys, project name, and admin email to create a new project
|
|
179
|
+
- If you choose ``n`` (no): You'll provide an existing destination project ID
|
|
180
|
+
|
|
181
|
+
**For new project creation:**
|
|
182
|
+
|
|
183
|
+
.. code-block:: text
|
|
184
|
+
|
|
185
|
+
Source organization API key: [enter organization scope API key]
|
|
186
|
+
Destination organization API key: [same as source for same instance, or enter different key]
|
|
187
|
+
New project name: [enter name for new project]
|
|
188
|
+
Admin email: [enter admin email for project]
|
|
189
|
+
|
|
190
|
+
**For existing project:**
|
|
191
|
+
|
|
192
|
+
.. code-block:: text
|
|
193
|
+
|
|
194
|
+
Destination project ID: [enter existing project ID]
|
|
195
|
+
|
|
196
|
+
**Step 4: Destination Configuration**
|
|
197
|
+
|
|
198
|
+
If you selected cross-instance migration (option 2) or using an existing project, provide destination details:
|
|
199
|
+
|
|
200
|
+
.. code-block:: text
|
|
201
|
+
|
|
202
|
+
--- Destination Configuration ---
|
|
203
|
+
Destination instance URL: [enter destination URL if cross-instance]
|
|
204
|
+
Destination API key: [enter project API key for destination]
|
|
205
|
+
|
|
206
|
+
**Step 5: Resource Type Selection**
|
|
207
|
+
|
|
208
|
+
Select which types of resources you want to migrate:
|
|
209
|
+
|
|
210
|
+
.. code-block:: text
|
|
211
|
+
|
|
212
|
+
--- Resource Type Selection ---
|
|
213
|
+
Which resource types do you want to migrate?
|
|
214
|
+
1. Agents
|
|
215
|
+
2. Tools
|
|
216
|
+
3. Agentic Processes
|
|
217
|
+
4. Tasks
|
|
218
|
+
5. RAG Assistants
|
|
219
|
+
6. Files
|
|
220
|
+
7. Usage Limits
|
|
221
|
+
8. Secrets
|
|
222
|
+
|
|
223
|
+
Select resource types (comma-separated numbers, or empty for all):
|
|
224
|
+
|
|
225
|
+
- Enter specific numbers (e.g., ``1,2,5`` for Agents, Tools, and RAG Assistants)
|
|
226
|
+
- Press Enter without typing anything to migrate **all** resource types
|
|
227
|
+
|
|
228
|
+
**Step 6: Resource Selection**
|
|
229
|
+
|
|
230
|
+
For each selected resource type, the wizard fetches available resources and displays an interactive menu:
|
|
231
|
+
|
|
232
|
+
.. code-block:: text
|
|
233
|
+
|
|
234
|
+
--- Retrieving Available Resources ---
|
|
235
|
+
|
|
236
|
+
Available agents:
|
|
237
|
+
0. Cancel (don't migrate this resource type)
|
|
238
|
+
1. Customer Support Agent (ID: agent-abc-123)
|
|
239
|
+
2. Data Analysis Agent (ID: agent-def-456)
|
|
240
|
+
3. Code Review Agent (ID: agent-ghi-789)
|
|
241
|
+
|
|
242
|
+
Select agents (comma-separated numbers, or empty for all):
|
|
243
|
+
|
|
244
|
+
Selection options:
|
|
245
|
+
|
|
246
|
+
- Press **Enter** without typing: Migrate **all** resources of this type
|
|
247
|
+
- Enter **0**: Skip this resource type entirely
|
|
248
|
+
- Enter **specific numbers**: Migrate only selected resources (e.g., ``1,3`` to migrate items 1 and 3)
|
|
249
|
+
|
|
250
|
+
This process repeats for each resource type you selected in Step 5.
|
|
251
|
+
|
|
252
|
+
**Step 7: Migration Summary and Confirmation**
|
|
253
|
+
|
|
254
|
+
Review your migration configuration before execution:
|
|
255
|
+
|
|
256
|
+
.. code-block:: text
|
|
257
|
+
|
|
258
|
+
--- Migration Summary ---
|
|
259
|
+
Source: https://api.dev.example.ai / Project: source-project-123
|
|
260
|
+
Destination: https://api.prod.example.ai / Project: Production Release
|
|
261
|
+
Resources: agents, tools, rag_assistants
|
|
262
|
+
|
|
263
|
+
Stop migration on first error? (Y/n):
|
|
264
|
+
|
|
265
|
+
- Enter ``Y`` or press Enter to stop migration if any resource fails
|
|
266
|
+
- Enter ``n`` to continue migrating remaining resources even if some fail
|
|
267
|
+
|
|
268
|
+
.. code-block:: text
|
|
269
|
+
|
|
270
|
+
Proceed with migration? (y/n):
|
|
271
|
+
|
|
272
|
+
- Enter ``y`` to start the migration
|
|
273
|
+
- Enter ``n`` to cancel and exit without making changes
|
|
274
|
+
|
|
275
|
+
**Step 8: Migration Execution**
|
|
276
|
+
|
|
277
|
+
The migration proceeds with real-time progress updates:
|
|
278
|
+
|
|
279
|
+
.. code-block:: text
|
|
280
|
+
|
|
281
|
+
============================================================
|
|
282
|
+
Migration Progress: 0/15 completed
|
|
283
|
+
============================================================
|
|
284
|
+
|
|
285
|
+
[1/15] Migrating agent 'Customer Support Agent'...
|
|
286
|
+
✓ Successfully migrated agent 'Customer Support Agent'
|
|
287
|
+
|
|
288
|
+
[2/15] Migrating agent 'Data Analysis Agent'...
|
|
289
|
+
✓ Successfully migrated agent 'Data Analysis Agent'
|
|
290
|
+
|
|
291
|
+
[3/15] Migrating tool 'Database Query Tool'...
|
|
292
|
+
✓ Successfully migrated tool 'Database Query Tool'
|
|
293
|
+
|
|
294
|
+
...
|
|
295
|
+
|
|
296
|
+
============================================================
|
|
297
|
+
Migration Complete: 15/15 successful
|
|
298
|
+
============================================================
|
|
299
|
+
|
|
300
|
+
Interactive Mode Benefits
|
|
301
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
302
|
+
|
|
303
|
+
**1. No Need to Remember IDs**
|
|
304
|
+
|
|
305
|
+
You don't need to know resource IDs beforehand. The wizard fetches and displays all available resources with their names and IDs.
|
|
306
|
+
|
|
307
|
+
**2. Visual Resource Selection**
|
|
308
|
+
|
|
309
|
+
Browse resources in numbered menus and select exactly what you want to migrate.
|
|
310
|
+
|
|
311
|
+
**3. Guided Configuration**
|
|
312
|
+
|
|
313
|
+
Step-by-step prompts ensure you provide all required information in the correct order.
|
|
314
|
+
|
|
315
|
+
**4. Input Validation**
|
|
316
|
+
|
|
317
|
+
The wizard validates your input at each step and prompts you to retry if something is invalid.
|
|
318
|
+
|
|
319
|
+
**5. Pre-Migration Summary**
|
|
320
|
+
|
|
321
|
+
Review all settings before execution with a clear summary of what will be migrated.
|
|
322
|
+
|
|
323
|
+
**6. Flexible Selection**
|
|
324
|
+
|
|
325
|
+
Easily mix migration strategies: migrate all agents, specific tools, all RAG assistants, etc.
|
|
326
|
+
|
|
327
|
+
**7. Error Recovery**
|
|
328
|
+
|
|
329
|
+
If you make a mistake during prompts, the wizard will ask again instead of failing the entire operation.
|
|
330
|
+
|
|
331
|
+
Interactive vs. CLI Mode Comparison
|
|
332
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
333
|
+
|
|
334
|
+
+----------------------------+---------------------------+---------------------------+
|
|
335
|
+
| Feature | Interactive Mode | CLI Mode |
|
|
336
|
+
+============================+===========================+===========================+
|
|
337
|
+
| **Ease of Use** | Beginner-friendly wizard | Requires knowledge of |
|
|
338
|
+
| | | all CLI arguments |
|
|
339
|
+
+----------------------------+---------------------------+---------------------------+
|
|
340
|
+
| **Resource Discovery** | Automatic with menus | Manual (use API or docs) |
|
|
341
|
+
+----------------------------+---------------------------+---------------------------+
|
|
342
|
+
| **Input Validation** | Real-time with retry | Fails if invalid args |
|
|
343
|
+
+----------------------------+---------------------------+---------------------------+
|
|
344
|
+
| **Automation** | Not scriptable | Fully scriptable |
|
|
345
|
+
+----------------------------+---------------------------+---------------------------+
|
|
346
|
+
| **Best For** | One-time migrations, | CI/CD pipelines, |
|
|
347
|
+
| | exploration, learning | automation, scripting |
|
|
348
|
+
+----------------------------+---------------------------+---------------------------+
|
|
349
|
+
|
|
350
|
+
When to Use Interactive Mode
|
|
351
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
352
|
+
|
|
353
|
+
✅ **Use Interactive Mode when:**
|
|
354
|
+
|
|
355
|
+
- You're performing a one-time migration
|
|
356
|
+
- You're unsure of exact resource IDs or names
|
|
357
|
+
- You want to browse available resources before selecting
|
|
358
|
+
- You're learning how migration works
|
|
359
|
+
- You prefer guided prompts over memorizing command syntax
|
|
360
|
+
|
|
361
|
+
❌ **Use CLI Mode instead when:**
|
|
362
|
+
|
|
363
|
+
- You're automating migrations in scripts or CI/CD pipelines
|
|
364
|
+
- You already know exact resource IDs to migrate
|
|
365
|
+
- You need to run the same migration multiple times
|
|
366
|
+
- You want to version control migration commands
|
|
367
|
+
|
|
368
|
+
Example Interactive Session
|
|
369
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
370
|
+
|
|
371
|
+
Here's a complete example of an interactive migration session:
|
|
372
|
+
|
|
373
|
+
.. code-block:: text
|
|
374
|
+
|
|
375
|
+
$ geai migrate clone-project -i
|
|
376
|
+
|
|
377
|
+
================================================================================
|
|
378
|
+
PROJECT MIGRATION ASSISTANT
|
|
379
|
+
================================================================================
|
|
380
|
+
|
|
381
|
+
Migration type (1=same instance, 2=cross instance): 2
|
|
382
|
+
|
|
383
|
+
--- Source Configuration ---
|
|
384
|
+
Source API key: sk_dev_abc123...
|
|
385
|
+
Source instance URL: https://api.dev.example.ai
|
|
386
|
+
Source project ID: proj-dev-001
|
|
387
|
+
|
|
388
|
+
Create new destination project? (y/n): y
|
|
389
|
+
Source organization API key: sk_org_dev_xyz789...
|
|
390
|
+
Destination organization API key: sk_org_prod_def456...
|
|
391
|
+
New project name: Production Release v2.0
|
|
392
|
+
Admin email: admin@example.com
|
|
393
|
+
|
|
394
|
+
--- Destination Configuration ---
|
|
395
|
+
Destination instance URL: https://api.prod.example.ai
|
|
396
|
+
Destination API key: (will be created after project creation)
|
|
397
|
+
|
|
398
|
+
--- Resource Type Selection ---
|
|
399
|
+
Which resource types do you want to migrate?
|
|
400
|
+
1. Agents
|
|
401
|
+
2. Tools
|
|
402
|
+
3. Agentic Processes
|
|
403
|
+
4. Tasks
|
|
404
|
+
5. RAG Assistants
|
|
405
|
+
6. Files
|
|
406
|
+
7. Usage Limits
|
|
407
|
+
8. Secrets
|
|
408
|
+
|
|
409
|
+
Select resource types (comma-separated numbers, or empty for all): 1,2,5
|
|
410
|
+
|
|
411
|
+
--- Retrieving Available Resources ---
|
|
412
|
+
|
|
413
|
+
Available agents:
|
|
414
|
+
0. Cancel (don't migrate this resource type)
|
|
415
|
+
1. Customer Support Agent (ID: agent-001)
|
|
416
|
+
2. Sales Assistant (ID: agent-002)
|
|
417
|
+
3. HR Onboarding Agent (ID: agent-003)
|
|
418
|
+
|
|
419
|
+
Select agents (comma-separated numbers, or empty for all):
|
|
420
|
+
|
|
421
|
+
Available tools:
|
|
422
|
+
0. Cancel (don't migrate this resource type)
|
|
423
|
+
1. Database Query Tool (ID: tool-001)
|
|
424
|
+
2. Email Sender (ID: tool-002)
|
|
425
|
+
3. Calendar Integration (ID: tool-003)
|
|
426
|
+
|
|
427
|
+
Select tools (comma-separated numbers, or empty for all): 1,3
|
|
428
|
+
|
|
429
|
+
Available RAG assistants:
|
|
430
|
+
0. Cancel (don't migrate this resource type)
|
|
431
|
+
1. Documentation Assistant (ID: doc-assistant-001)
|
|
432
|
+
2. Code Helper (ID: code-assistant-002)
|
|
433
|
+
|
|
434
|
+
Select RAG assistants (comma-separated numbers, or empty for all):
|
|
435
|
+
|
|
436
|
+
--- Migration Summary ---
|
|
437
|
+
Source: https://api.dev.example.ai / Project: proj-dev-001
|
|
438
|
+
Destination: https://api.prod.example.ai / Project: Production Release v2.0
|
|
439
|
+
Resources: agents, tools, rag_assistants
|
|
440
|
+
|
|
441
|
+
Stop migration on first error? (Y/n): Y
|
|
442
|
+
|
|
443
|
+
Proceed with migration? (y/n): y
|
|
444
|
+
|
|
445
|
+
Creating new project 'Production Release v2.0'...
|
|
446
|
+
Project 'Production Release v2.0' created successfully with ID: proj-prod-002
|
|
447
|
+
Creating project API key for new project...
|
|
448
|
+
Project API key created successfully
|
|
449
|
+
|
|
450
|
+
============================================================
|
|
451
|
+
Migration Progress: 0/7 completed
|
|
452
|
+
============================================================
|
|
453
|
+
|
|
454
|
+
[1/7] Migrating agent 'Customer Support Agent'...
|
|
455
|
+
✓ Successfully migrated agent 'Customer Support Agent'
|
|
456
|
+
|
|
457
|
+
[2/7] Migrating agent 'Sales Assistant'...
|
|
458
|
+
✓ Successfully migrated agent 'Sales Assistant'
|
|
459
|
+
|
|
460
|
+
[3/7] Migrating agent 'HR Onboarding Agent'...
|
|
461
|
+
✓ Successfully migrated agent 'HR Onboarding Agent'
|
|
462
|
+
|
|
463
|
+
[4/7] Migrating tool 'Database Query Tool'...
|
|
464
|
+
✓ Successfully migrated tool 'Database Query Tool'
|
|
465
|
+
|
|
466
|
+
[5/7] Migrating tool 'Calendar Integration'...
|
|
467
|
+
✓ Successfully migrated tool 'Calendar Integration'
|
|
468
|
+
|
|
469
|
+
[6/7] Migrating RAG assistant 'Documentation Assistant'...
|
|
470
|
+
✓ Successfully migrated RAG assistant 'Documentation Assistant'
|
|
471
|
+
|
|
472
|
+
[7/7] Migrating RAG assistant 'Code Helper'...
|
|
473
|
+
✓ Successfully migrated RAG assistant 'Code Helper'
|
|
474
|
+
|
|
475
|
+
============================================================
|
|
476
|
+
Migration Complete: 7/7 successful
|
|
477
|
+
============================================================
|
|
478
|
+
|
|
479
|
+
Migration completed: 7/7 successful
|
|
480
|
+
|
|
481
|
+
This example demonstrates:
|
|
482
|
+
|
|
483
|
+
- Cross-instance migration (dev to prod)
|
|
484
|
+
- New project creation
|
|
485
|
+
- Selective resource type migration (agents, tools, RAG assistants only)
|
|
486
|
+
- Mixed selection strategies (all agents, specific tools, all RAG assistants)
|
|
487
|
+
- Successful completion with progress tracking
|
|
488
|
+
|
|
112
489
|
Basic Usage
|
|
113
490
|
-----------
|
|
114
491
|
|
|
@@ -310,7 +687,12 @@ Command: ``geai migrate clone-project``
|
|
|
310
687
|
|
|
311
688
|
**Description:** Clone a project with selective or complete resource migration.
|
|
312
689
|
|
|
313
|
-
**
|
|
690
|
+
**Interactive Mode Flag:**
|
|
691
|
+
|
|
692
|
+
``--interactive`` or ``-i``
|
|
693
|
+
Launch the interactive migration wizard with step-by-step prompts. When this flag is used, all other arguments are ignored and the wizard will prompt for all required information. See the :ref:`Interactive Mode` section for details.
|
|
694
|
+
|
|
695
|
+
**Required Arguments (CLI Mode):**
|
|
314
696
|
|
|
315
697
|
``--from-api-key <key>``
|
|
316
698
|
Project scope API key for the source GEAI instance (for migrating resources)
|
|
@@ -425,12 +807,14 @@ Best Practices
|
|
|
425
807
|
--------------
|
|
426
808
|
|
|
427
809
|
1. **Test First**: Always test migrations in a development environment before production
|
|
428
|
-
2. **
|
|
429
|
-
3. **
|
|
430
|
-
4. **
|
|
431
|
-
5. **
|
|
432
|
-
6. **
|
|
433
|
-
7. **
|
|
810
|
+
2. **Start with Interactive Mode**: If you're new to migrations or unsure about resource IDs, use ``--interactive`` mode for guided assistance
|
|
811
|
+
3. **Use --all for Complete Clones**: When creating backups or full clones, use ``--all``
|
|
812
|
+
4. **Verify Credentials**: Double-check API keys and instance URLs before running migrations
|
|
813
|
+
5. **Monitor Progress**: Watch the console output for discovery counts and migration status
|
|
814
|
+
6. **Check Results**: Review the migration result summary after completion
|
|
815
|
+
7. **Incremental Migration**: For large projects, consider migrating resource types incrementally
|
|
816
|
+
8. **Document Migrations**: Keep track of what was migrated and when
|
|
817
|
+
9. **Automate Repeated Migrations**: Once you know the exact resources and IDs, convert interactive sessions to CLI commands for repeatability
|
|
434
818
|
|
|
435
819
|
Common Use Cases
|
|
436
820
|
----------------
|
|
@@ -12,6 +12,14 @@ pygeai.core.common.config module
|
|
|
12
12
|
:show-inheritance:
|
|
13
13
|
:undoc-members:
|
|
14
14
|
|
|
15
|
+
pygeai.core.common.constants module
|
|
16
|
+
-----------------------------------
|
|
17
|
+
|
|
18
|
+
.. automodule:: pygeai.core.common.constants
|
|
19
|
+
:members:
|
|
20
|
+
:show-inheritance:
|
|
21
|
+
:undoc-members:
|
|
22
|
+
|
|
15
23
|
pygeai.core.common.decorators module
|
|
16
24
|
------------------------------------
|
|
17
25
|
|
|
@@ -4,6 +4,22 @@ pygeai.tests.auth package
|
|
|
4
4
|
Submodules
|
|
5
5
|
----------
|
|
6
6
|
|
|
7
|
+
pygeai.tests.auth.test\_cli\_configuration module
|
|
8
|
+
-------------------------------------------------
|
|
9
|
+
|
|
10
|
+
.. automodule:: pygeai.tests.auth.test_cli_configuration
|
|
11
|
+
:members:
|
|
12
|
+
:show-inheritance:
|
|
13
|
+
:undoc-members:
|
|
14
|
+
|
|
15
|
+
pygeai.tests.auth.test\_client\_initialization module
|
|
16
|
+
-----------------------------------------------------
|
|
17
|
+
|
|
18
|
+
.. automodule:: pygeai.tests.auth.test_client_initialization
|
|
19
|
+
:members:
|
|
20
|
+
:show-inheritance:
|
|
21
|
+
:undoc-members:
|
|
22
|
+
|
|
7
23
|
pygeai.tests.auth.test\_clients module
|
|
8
24
|
--------------------------------------
|
|
9
25
|
|
|
@@ -12,6 +28,22 @@ pygeai.tests.auth.test\_clients module
|
|
|
12
28
|
:show-inheritance:
|
|
13
29
|
:undoc-members:
|
|
14
30
|
|
|
31
|
+
pygeai.tests.auth.test\_config\_manager module
|
|
32
|
+
----------------------------------------------
|
|
33
|
+
|
|
34
|
+
.. automodule:: pygeai.tests.auth.test_config_manager
|
|
35
|
+
:members:
|
|
36
|
+
:show-inheritance:
|
|
37
|
+
:undoc-members:
|
|
38
|
+
|
|
39
|
+
pygeai.tests.auth.test\_header\_injection module
|
|
40
|
+
------------------------------------------------
|
|
41
|
+
|
|
42
|
+
.. automodule:: pygeai.tests.auth.test_header_injection
|
|
43
|
+
:members:
|
|
44
|
+
:show-inheritance:
|
|
45
|
+
:undoc-members:
|
|
46
|
+
|
|
15
47
|
pygeai.tests.auth.test\_oauth module
|
|
16
48
|
------------------------------------
|
|
17
49
|
|
|
@@ -20,6 +52,30 @@ pygeai.tests.auth.test\_oauth module
|
|
|
20
52
|
:show-inheritance:
|
|
21
53
|
:undoc-members:
|
|
22
54
|
|
|
55
|
+
pygeai.tests.auth.test\_session\_logging module
|
|
56
|
+
-----------------------------------------------
|
|
57
|
+
|
|
58
|
+
.. automodule:: pygeai.tests.auth.test_session_logging
|
|
59
|
+
:members:
|
|
60
|
+
:show-inheritance:
|
|
61
|
+
:undoc-members:
|
|
62
|
+
|
|
63
|
+
pygeai.tests.auth.test\_session\_validation module
|
|
64
|
+
--------------------------------------------------
|
|
65
|
+
|
|
66
|
+
.. automodule:: pygeai.tests.auth.test_session_validation
|
|
67
|
+
:members:
|
|
68
|
+
:show-inheritance:
|
|
69
|
+
:undoc-members:
|
|
70
|
+
|
|
71
|
+
pygeai.tests.auth.test\_singleton\_reset module
|
|
72
|
+
-----------------------------------------------
|
|
73
|
+
|
|
74
|
+
.. automodule:: pygeai.tests.auth.test_singleton_reset
|
|
75
|
+
:members:
|
|
76
|
+
:show-inheritance:
|
|
77
|
+
:undoc-members:
|
|
78
|
+
|
|
23
79
|
Module contents
|
|
24
80
|
---------------
|
|
25
81
|
|
|
@@ -13,6 +13,14 @@ Subpackages
|
|
|
13
13
|
Submodules
|
|
14
14
|
----------
|
|
15
15
|
|
|
16
|
+
pygeai.tests.cli.test\_credentials\_flag module
|
|
17
|
+
-----------------------------------------------
|
|
18
|
+
|
|
19
|
+
.. automodule:: pygeai.tests.cli.test_credentials_flag
|
|
20
|
+
:members:
|
|
21
|
+
:show-inheritance:
|
|
22
|
+
:undoc-members:
|
|
23
|
+
|
|
16
24
|
pygeai.tests.cli.test\_error\_handler module
|
|
17
25
|
--------------------------------------------
|
|
18
26
|
|
pygeai/admin/clients.py
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
from pygeai import logger
|
|
3
1
|
from pygeai.admin.endpoints import GET_API_TOKEN_VALIDATION_V1, GET_AUTHORIZED_ORGANIZATIONS_V1, \
|
|
4
2
|
GET_AUTHORIZED_PROJECTS_V1, GET_PROJECT_VISIBILITY_V1, GET_PROJECT_API_TOKEN_V1
|
|
5
3
|
from pygeai.core.base.clients import BaseClient
|
|
6
|
-
|
|
4
|
+
|
|
7
5
|
from pygeai.core.utils.validators import validate_status_code
|
|
8
6
|
from pygeai.core.utils.parsers import parse_json_response
|
|
9
7
|
|
pygeai/analytics/clients.py
CHANGED
pygeai/assistant/clients.py
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
from pygeai.assistant.endpoints import GET_ASSISTANT_DATA_V1, CREATE_ASSISTANT_V1, UPDATE_ASSISTANT_V1, BEGIN_CONVERSATION_V1, \
|
|
4
|
-
SEND_TEXT_PROMPT_V1, SEND_CHAT_REQUEST_V1, GET_REQUEST_STATUS_V1, CANCEL_REQUEST_V1
|
|
5
|
-
from pygeai.assistant.data_analyst.endpoints import GET_DATA_ANALYST_STATUS_V1, EXTEND_DATA_ANALYST_DATASET_V1
|
|
1
|
+
from pygeai.assistant.endpoints import GET_ASSISTANT_DATA_V1, CREATE_ASSISTANT_V1, UPDATE_ASSISTANT_V1, \
|
|
2
|
+
SEND_CHAT_REQUEST_V1, GET_REQUEST_STATUS_V1, CANCEL_REQUEST_V1
|
|
6
3
|
from pygeai.core.base.clients import BaseClient
|
|
7
|
-
from pygeai.core.common.decorators import handler_server_error
|
|
8
|
-
from pygeai.core.common.exceptions import InvalidAPIResponseException
|
|
9
4
|
from pygeai.core.utils.validators import validate_status_code
|
|
10
5
|
from pygeai.core.utils.parsers import parse_json_response
|
|
11
6
|
|
pygeai/assistant/data/clients.py
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
import json
|
|
2
|
-
|
|
3
1
|
from pygeai.assistant.clients import AssistantClient
|
|
4
|
-
from pygeai.assistant.endpoints import GET_ASSISTANT_DATA_V1, CREATE_ASSISTANT_V1, UPDATE_ASSISTANT_V1, BEGIN_CONVERSATION_V1, \
|
|
5
|
-
SEND_TEXT_PROMPT_V1, SEND_CHAT_REQUEST_V1, GET_REQUEST_STATUS_V1, CANCEL_REQUEST_V1
|
|
6
|
-
from pygeai.assistant.data_analyst.endpoints import GET_DATA_ANALYST_STATUS_V1, EXTEND_DATA_ANALYST_DATASET_V1
|
|
7
|
-
from pygeai.core.base.clients import BaseClient
|
|
8
|
-
from pygeai.core.common.decorators import handler_server_error
|
|
9
|
-
from pygeai.core.utils.validators import validate_status_code
|
|
10
2
|
|
|
11
3
|
|
|
12
4
|
class ChatWithDataAssistantClient(AssistantClient):
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
from pathlib import Path
|
|
2
2
|
|
|
3
|
-
from pygeai import logger
|
|
4
3
|
from pygeai.assistant.clients import AssistantClient
|
|
5
4
|
from pygeai.assistant.data_analyst.endpoints import GET_DATA_ANALYST_STATUS_V1, EXTEND_DATA_ANALYST_DATASET_V1
|
|
6
|
-
from pygeai.core.common.exceptions import InvalidAPIResponseException
|
|
7
5
|
from pygeai.core.utils.validators import validate_status_code
|
|
8
6
|
from pygeai.core.utils.parsers import parse_json_response
|
|
9
7
|
|
pygeai/assistant/managers.py
CHANGED
|
@@ -4,7 +4,7 @@ from pygeai.assistant.clients import AssistantClient
|
|
|
4
4
|
from pygeai.assistant.rag.clients import RAGAssistantClient
|
|
5
5
|
from pygeai.assistant.rag.mappers import RAGAssistantMapper
|
|
6
6
|
from pygeai.assistant.rag.responses import DocumentListResponse
|
|
7
|
-
from pygeai.core.base.mappers import
|
|
7
|
+
from pygeai.core.base.mappers import ResponseMapper
|
|
8
8
|
from pygeai.core.handlers import ErrorHandler
|
|
9
9
|
from pygeai.core.models import Assistant, TextAssistant, ChatAssistant, ChatMessageList, AssistantRevision, \
|
|
10
10
|
ChatVariableList, LlmSettings, ChatWithDataAssistant, ChatToolList, ToolChoice
|
pygeai/assistant/rag/clients.py
CHANGED
|
@@ -3,14 +3,12 @@ import logging
|
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
from typing import Any
|
|
5
5
|
|
|
6
|
-
from pygeai import logger
|
|
7
6
|
from pygeai.assistant.rag.endpoints import GET_ASSISTANTS_FROM_PROJECT_V1, GET_ASSISTANT_V1, CREATE_ASSISTANT_V1, \
|
|
8
7
|
UPDATE_ASSISTANT_V1, DELETE_ASSISTANT_V1, GET_DOCUMENTS_V1, DELETE_ALL_DOCUMENTS_V1, RETRIEVE_DOCUMENT_V1, \
|
|
9
8
|
UPLOAD_DOCUMENT_V1, DELETE_DOCUMENT_V1, EXECUTE_QUERY_V1
|
|
10
9
|
from pygeai.core.base.clients import BaseClient
|
|
11
10
|
import urllib.parse
|
|
12
11
|
|
|
13
|
-
from pygeai.core.common.exceptions import InvalidAPIResponseException
|
|
14
12
|
from pygeai.core.utils.validators import validate_status_code
|
|
15
13
|
from pygeai.core.utils.parsers import parse_json_response
|
|
16
14
|
|
pygeai/assistant/rag/mappers.py
CHANGED
|
@@ -186,14 +186,13 @@ class RAGAssistantMapper(ModelMapper):
|
|
|
186
186
|
|
|
187
187
|
@classmethod
|
|
188
188
|
def map_to_document_list(cls, data: dict) -> list[Document]:
|
|
189
|
-
|
|
190
|
-
|
|
189
|
+
documents = data.get('documents')
|
|
190
|
+
|
|
191
191
|
if documents is not None and any(documents):
|
|
192
|
-
for document_data in documents:
|
|
193
|
-
document = cls.map_to_document(document_data)
|
|
194
|
-
document_list.append(document)
|
|
195
192
|
|
|
196
|
-
|
|
193
|
+
return [cls.map_to_document(document_data) for document_data in documents]
|
|
194
|
+
|
|
195
|
+
return []
|
|
197
196
|
|
|
198
197
|
@classmethod
|
|
199
198
|
def map_to_document(cls, data: dict) -> Document:
|
|
@@ -211,14 +210,13 @@ class RAGAssistantMapper(ModelMapper):
|
|
|
211
210
|
|
|
212
211
|
@classmethod
|
|
213
212
|
def map_to_document_metadata_list(cls, data: dict) -> List[DocumentMetadata]:
|
|
214
|
-
metadata_list = list()
|
|
215
213
|
metadata = data.get('metadata')
|
|
214
|
+
|
|
216
215
|
if metadata is not None and any(metadata):
|
|
217
|
-
for metadata_data in metadata:
|
|
218
|
-
new_metadata = cls.map_to_document_metadata(metadata_data)
|
|
219
|
-
metadata_list.append(new_metadata)
|
|
220
216
|
|
|
221
|
-
|
|
217
|
+
return [cls.map_to_metadata(metadata_data) for metadata_data in metadata]
|
|
218
|
+
|
|
219
|
+
return []
|
|
222
220
|
|
|
223
221
|
@classmethod
|
|
224
222
|
def map_to_document_metadata(cls, data: dict) -> DocumentMetadata:
|