uipath 2.0.15__tar.gz → 2.0.17__tar.gz
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.
Potentially problematic release.
This version of uipath might be problematic. Click here for more details.
- {uipath-2.0.15 → uipath-2.0.17}/PKG-INFO +1 -1
- {uipath-2.0.15 → uipath-2.0.17}/pyproject.toml +3 -3
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_cli/_auth/_portal_service.py +3 -1
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_cli/cli_pack.py +18 -17
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_services/context_grounding_service.py +208 -28
- {uipath-2.0.15 → uipath-2.0.17}/uv.lock +1 -3
- {uipath-2.0.15 → uipath-2.0.17}/.cursorrules +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/.editorconfig +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/.gitattributes +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/.github/workflows/build.yml +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/.github/workflows/cd.yml +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/.github/workflows/ci.yml +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/.github/workflows/commitlint.yml +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/.github/workflows/lint.yml +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/.github/workflows/test.yml +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/.gitignore +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/.pre-commit-config.yaml +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/.python-version +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/.vscode/extensions.json +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/.vscode/settings.json +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/CONTRIBUTING.md +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/LICENSE +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/README.md +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/docs/CONTRIBUTING.md +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/docs/actions.md +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/docs/assets/uipath-logo.svg +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/docs/assets.md +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/docs/buckets.md +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/docs/connections.md +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/docs/context_grounding.md +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/docs/getting_started_agent.md +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/docs/getting_started_cli.md +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/docs/getting_started_cloud.md +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/docs/getting_started_sdk.md +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/docs/index.md +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/docs/jobs.md +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/docs/processes.md +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/docs/queues.md +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/docs/sdk.md +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/justfile +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/mkdocs.yml +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/py.typed +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/__init__.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_cli/README.md +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_cli/__init__.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_cli/_auth/_auth_server.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_cli/_auth/_models.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_cli/_auth/_oidc_utils.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_cli/_auth/_utils.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_cli/_auth/auth_config.json +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_cli/_auth/index.html +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_cli/_auth/localhost.crt +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_cli/_auth/localhost.key +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_cli/_runtime/_contracts.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_cli/_runtime/_logging.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_cli/_runtime/_runtime.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_cli/_templates/.psmdcp.template +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_cli/_templates/.rels.template +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_cli/_templates/[Content_Types].xml.template +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_cli/_templates/main.py.template +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_cli/_templates/package.nuspec.template +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_cli/_utils/_common.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_cli/_utils/_input_args.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_cli/_utils/_parse_ast.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_cli/cli_auth.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_cli/cli_deploy.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_cli/cli_init.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_cli/cli_new.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_cli/cli_publish.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_cli/cli_run.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_cli/middlewares.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_config.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_execution_context.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_folder_context.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_services/__init__.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_services/_base_service.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_services/actions_service.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_services/api_client.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_services/assets_service.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_services/buckets_service.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_services/connections_service.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_services/connections_service.pyi +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_services/folder_service.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_services/jobs_service.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_services/llm_gateway_service.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_services/processes_service.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_services/queues_service.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_uipath.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_utils/__init__.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_utils/_endpoint.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_utils/_infer_bindings.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_utils/_logs.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_utils/_request_override.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_utils/_request_spec.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_utils/_user_agent.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/_utils/constants.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/models/__init__.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/models/action_schema.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/models/actions.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/models/assets.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/models/connections.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/models/context_grounding.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/models/context_grounding_index.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/models/exceptions.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/models/interrupt_models.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/models/job.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/models/llm_gateway.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/models/processes.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/models/queues.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/py.typed +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/tracing/__init__.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/tracing/_otel_exporters.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/tracing/_traced.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/src/uipath/tracing/_utils.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/tests/__init__.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/tests/cli/test_init.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/tests/conftest.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/tests/sdk/services/test_llm_integration.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/tests/sdk/services/test_llm_service.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/tests/sdk/services/test_uipath_llm_integration.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/tests/sdk/test_config.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/tests/tracing/test_otel_exporters.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/tests/tracing/test_span_utils.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/tests/tracing/test_traced.py +0 -0
- {uipath-2.0.15 → uipath-2.0.17}/tests/tracing/test_tracing_manager.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: uipath
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.17
|
|
4
4
|
Summary: Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools.
|
|
5
5
|
Project-URL: Homepage, https://uipath.com
|
|
6
6
|
Project-URL: Repository, https://github.com/UiPath/uipath-python
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "uipath"
|
|
3
|
-
version = "2.0.
|
|
3
|
+
version = "2.0.17"
|
|
4
4
|
description = "Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools."
|
|
5
5
|
readme = { file = "README.md", content-type = "text/markdown" }
|
|
6
6
|
requires-python = ">=3.10"
|
|
@@ -15,7 +15,7 @@ dependencies = [
|
|
|
15
15
|
"tenacity>=9.0.0",
|
|
16
16
|
"tomli>=2.2.1",
|
|
17
17
|
"types-requests>=2.32.0.20250306",
|
|
18
|
-
"pathlib>=1.0.1"
|
|
18
|
+
"pathlib>=1.0.1",
|
|
19
19
|
]
|
|
20
20
|
classifiers = [
|
|
21
21
|
"Development Status :: 3 - Alpha",
|
|
@@ -79,7 +79,7 @@ ignore-decorators = []
|
|
|
79
79
|
# TODO: Remove this once the documentation for CLI is updated
|
|
80
80
|
"uipath/_cli/**" = ["D"]
|
|
81
81
|
# TODO: Remove this once model documentation is added
|
|
82
|
-
"src/uipath/models/**" = ["D101","D100","D104","D102","D107"]
|
|
82
|
+
"src/uipath/models/**" = ["D101", "D100", "D104", "D102", "D107"]
|
|
83
83
|
|
|
84
84
|
[tool.ruff.format]
|
|
85
85
|
quote-style = "double"
|
|
@@ -149,7 +149,9 @@ def select_tenant(
|
|
|
149
149
|
click.echo("Available tenants:")
|
|
150
150
|
for idx, name in enumerate(tenant_names):
|
|
151
151
|
click.echo(f" {idx}: {name}")
|
|
152
|
-
tenant_idx =
|
|
152
|
+
tenant_idx = (
|
|
153
|
+
0 if len(tenant_names) == 1 else click.prompt("Select tenant", type=int)
|
|
154
|
+
)
|
|
153
155
|
tenant_name = tenant_names[tenant_idx]
|
|
154
156
|
account_name = tenants_and_organizations["organization"]["name"]
|
|
155
157
|
click.echo(f"Selected tenant: {tenant_name}")
|
|
@@ -12,8 +12,6 @@ try:
|
|
|
12
12
|
except ImportError:
|
|
13
13
|
import tomli as tomllib
|
|
14
14
|
|
|
15
|
-
from ._utils._parse_ast import generate_bindings_json
|
|
16
|
-
|
|
17
15
|
schema = "https://cloud.uipath.com/draft/2024-12/entry-point"
|
|
18
16
|
|
|
19
17
|
|
|
@@ -205,17 +203,23 @@ def pack_fn(projectName, description, entryPoints, version, authors, directory):
|
|
|
205
203
|
|
|
206
204
|
# Get bindings from uipath.json if available
|
|
207
205
|
config_path = os.path.join(directory, "uipath.json")
|
|
208
|
-
if os.path.exists(config_path):
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
206
|
+
if not os.path.exists(config_path):
|
|
207
|
+
raise Exception("uipath.json not found, please run `uipath init`")
|
|
208
|
+
|
|
209
|
+
# Define the allowlist of file extensions to include
|
|
210
|
+
file_extensions_included = [".py", ".mermaid", ".json", ".yaml", ".yml"]
|
|
211
|
+
files_included = []
|
|
212
|
+
|
|
213
|
+
with open(config_path, "r") as f:
|
|
214
|
+
config_data = json.load(f)
|
|
215
|
+
if "bindings" in config_data:
|
|
216
|
+
bindings_content = config_data["bindings"]
|
|
217
|
+
if "settings" in config_data:
|
|
218
|
+
settings = config_data["settings"]
|
|
219
|
+
if "fileExtensionsIncluded" in settings:
|
|
220
|
+
file_extensions_included.extend(settings["fileExtensionsIncluded"])
|
|
221
|
+
if "filesIncluded" in settings:
|
|
222
|
+
files_included = settings["filesIncluded"]
|
|
219
223
|
|
|
220
224
|
content_types_content = generate_content_types_content()
|
|
221
225
|
[psmdcp_file_name, psmdcp_content] = generate_psmdcp_content(
|
|
@@ -231,9 +235,6 @@ def pack_fn(projectName, description, entryPoints, version, authors, directory):
|
|
|
231
235
|
# Create .uipath directory if it doesn't exist
|
|
232
236
|
os.makedirs(".uipath", exist_ok=True)
|
|
233
237
|
|
|
234
|
-
# Define the allowlist of file extensions to include
|
|
235
|
-
file_extensions_allowlist = [".py", ".mermaid", ".json", ".yaml", ".yml"]
|
|
236
|
-
|
|
237
238
|
with zipfile.ZipFile(
|
|
238
239
|
f".uipath/{projectName}.{version}.nupkg", "w", zipfile.ZIP_DEFLATED
|
|
239
240
|
) as z:
|
|
@@ -260,7 +261,7 @@ def pack_fn(projectName, description, entryPoints, version, authors, directory):
|
|
|
260
261
|
|
|
261
262
|
for file in files:
|
|
262
263
|
file_extension = os.path.splitext(file)[1].lower()
|
|
263
|
-
if file_extension in
|
|
264
|
+
if file_extension in file_extensions_included or file in files_included:
|
|
264
265
|
file_path = os.path.join(root, file)
|
|
265
266
|
rel_path = os.path.relpath(file_path, directory)
|
|
266
267
|
try:
|
|
@@ -6,7 +6,7 @@ from pydantic import TypeAdapter
|
|
|
6
6
|
from .._config import Config
|
|
7
7
|
from .._execution_context import ExecutionContext
|
|
8
8
|
from .._folder_context import FolderContext
|
|
9
|
-
from .._utils import Endpoint, RequestSpec
|
|
9
|
+
from .._utils import Endpoint, RequestSpec, header_folder
|
|
10
10
|
from .._utils.constants import (
|
|
11
11
|
HEADER_FOLDER_KEY,
|
|
12
12
|
HEADER_FOLDER_PATH,
|
|
@@ -43,7 +43,12 @@ class ContextGroundingService(FolderContext, BaseService):
|
|
|
43
43
|
super().__init__(config=config, execution_context=execution_context)
|
|
44
44
|
|
|
45
45
|
@traced(run_type="uipath", hide_input=True, hide_output=True)
|
|
46
|
-
def retrieve(
|
|
46
|
+
def retrieve(
|
|
47
|
+
self,
|
|
48
|
+
name: str,
|
|
49
|
+
folder_key: Optional[str] = None,
|
|
50
|
+
folder_path: Optional[str] = None,
|
|
51
|
+
) -> Optional[ContextGroundingIndex]:
|
|
47
52
|
"""Retrieve context grounding index information by its name.
|
|
48
53
|
|
|
49
54
|
This method fetches details about a specific context index, which can be
|
|
@@ -56,12 +61,17 @@ class ContextGroundingService(FolderContext, BaseService):
|
|
|
56
61
|
Returns:
|
|
57
62
|
Optional[ContextGroundingIndex]: The index information, including its configuration and metadata if found, otherwise None.
|
|
58
63
|
"""
|
|
59
|
-
spec = self._retrieve_spec(
|
|
64
|
+
spec = self._retrieve_spec(
|
|
65
|
+
name,
|
|
66
|
+
folder_key=folder_key,
|
|
67
|
+
folder_path=folder_path,
|
|
68
|
+
)
|
|
60
69
|
|
|
61
70
|
response = self.request(
|
|
62
71
|
spec.method,
|
|
63
72
|
spec.endpoint,
|
|
64
73
|
params=spec.params,
|
|
74
|
+
headers=spec.headers,
|
|
65
75
|
).json()
|
|
66
76
|
return next(
|
|
67
77
|
(
|
|
@@ -73,7 +83,12 @@ class ContextGroundingService(FolderContext, BaseService):
|
|
|
73
83
|
)
|
|
74
84
|
|
|
75
85
|
@traced(run_type="uipath", hide_input=True, hide_output=True)
|
|
76
|
-
async def retrieve_async(
|
|
86
|
+
async def retrieve_async(
|
|
87
|
+
self,
|
|
88
|
+
name: str,
|
|
89
|
+
folder_key: Optional[str] = None,
|
|
90
|
+
folder_path: Optional[str] = None,
|
|
91
|
+
) -> Optional[ContextGroundingIndex]:
|
|
77
92
|
"""Retrieve asynchronously context grounding index information by its name.
|
|
78
93
|
|
|
79
94
|
This method fetches details about a specific context index, which can be
|
|
@@ -87,7 +102,11 @@ class ContextGroundingService(FolderContext, BaseService):
|
|
|
87
102
|
Optional[ContextGroundingIndex]: The index information, including its configuration and metadata if found, otherwise None.
|
|
88
103
|
|
|
89
104
|
"""
|
|
90
|
-
spec = self._retrieve_spec(
|
|
105
|
+
spec = self._retrieve_spec(
|
|
106
|
+
name,
|
|
107
|
+
folder_key=folder_key,
|
|
108
|
+
folder_path=folder_path,
|
|
109
|
+
)
|
|
91
110
|
|
|
92
111
|
response = (
|
|
93
112
|
await self.request_async(
|
|
@@ -106,7 +125,12 @@ class ContextGroundingService(FolderContext, BaseService):
|
|
|
106
125
|
)
|
|
107
126
|
|
|
108
127
|
@traced(run_type="uipath", hide_input=True, hide_output=True)
|
|
109
|
-
def retrieve_by_id(
|
|
128
|
+
def retrieve_by_id(
|
|
129
|
+
self,
|
|
130
|
+
id: str,
|
|
131
|
+
folder_key: Optional[str] = None,
|
|
132
|
+
folder_path: Optional[str] = None,
|
|
133
|
+
) -> Any:
|
|
110
134
|
"""Retrieve context grounding index information by its ID.
|
|
111
135
|
|
|
112
136
|
This method provides direct access to a context index using its unique
|
|
@@ -118,7 +142,11 @@ class ContextGroundingService(FolderContext, BaseService):
|
|
|
118
142
|
Returns:
|
|
119
143
|
Any: The index information, including its configuration and metadata.
|
|
120
144
|
"""
|
|
121
|
-
spec = self._retrieve_by_id_spec(
|
|
145
|
+
spec = self._retrieve_by_id_spec(
|
|
146
|
+
id,
|
|
147
|
+
folder_key=folder_key,
|
|
148
|
+
folder_path=folder_path,
|
|
149
|
+
)
|
|
122
150
|
|
|
123
151
|
return self.request(
|
|
124
152
|
spec.method,
|
|
@@ -127,7 +155,12 @@ class ContextGroundingService(FolderContext, BaseService):
|
|
|
127
155
|
).json()
|
|
128
156
|
|
|
129
157
|
@traced(run_type="uipath", hide_input=True, hide_output=True)
|
|
130
|
-
async def retrieve_by_id_async(
|
|
158
|
+
async def retrieve_by_id_async(
|
|
159
|
+
self,
|
|
160
|
+
id: str,
|
|
161
|
+
folder_key: Optional[str] = None,
|
|
162
|
+
folder_path: Optional[str] = None,
|
|
163
|
+
) -> Any:
|
|
131
164
|
"""Retrieve asynchronously context grounding index information by its ID.
|
|
132
165
|
|
|
133
166
|
This method provides direct access to a context index using its unique
|
|
@@ -140,7 +173,11 @@ class ContextGroundingService(FolderContext, BaseService):
|
|
|
140
173
|
Any: The index information, including its configuration and metadata.
|
|
141
174
|
|
|
142
175
|
"""
|
|
143
|
-
spec = self._retrieve_by_id_spec(
|
|
176
|
+
spec = self._retrieve_by_id_spec(
|
|
177
|
+
id,
|
|
178
|
+
folder_key=folder_key,
|
|
179
|
+
folder_path=folder_path,
|
|
180
|
+
)
|
|
144
181
|
|
|
145
182
|
response = await self.request_async(
|
|
146
183
|
spec.method,
|
|
@@ -156,6 +193,8 @@ class ContextGroundingService(FolderContext, BaseService):
|
|
|
156
193
|
name: str,
|
|
157
194
|
query: str,
|
|
158
195
|
number_of_results: int = 10,
|
|
196
|
+
folder_key: Optional[str] = None,
|
|
197
|
+
folder_path: Optional[str] = None,
|
|
159
198
|
) -> List[ContextGroundingQueryResponse]:
|
|
160
199
|
"""Search for contextual information within a specific index.
|
|
161
200
|
|
|
@@ -177,7 +216,13 @@ class ContextGroundingService(FolderContext, BaseService):
|
|
|
177
216
|
if index and index.in_progress_ingestion():
|
|
178
217
|
raise IngestionInProgressException(index_name=name)
|
|
179
218
|
|
|
180
|
-
spec = self._search_spec(
|
|
219
|
+
spec = self._search_spec(
|
|
220
|
+
name,
|
|
221
|
+
query,
|
|
222
|
+
number_of_results,
|
|
223
|
+
folder_key=folder_key,
|
|
224
|
+
folder_path=folder_path,
|
|
225
|
+
)
|
|
181
226
|
|
|
182
227
|
response = self.request(
|
|
183
228
|
spec.method,
|
|
@@ -195,6 +240,8 @@ class ContextGroundingService(FolderContext, BaseService):
|
|
|
195
240
|
name: str,
|
|
196
241
|
query: str,
|
|
197
242
|
number_of_results: int = 10,
|
|
243
|
+
folder_key: Optional[str] = None,
|
|
244
|
+
folder_path: Optional[str] = None,
|
|
198
245
|
) -> List[ContextGroundingQueryResponse]:
|
|
199
246
|
"""Search asynchronously for contextual information within a specific index.
|
|
200
247
|
|
|
@@ -212,10 +259,20 @@ class ContextGroundingService(FolderContext, BaseService):
|
|
|
212
259
|
List[ContextGroundingQueryResponse]: A list of search results, each containing
|
|
213
260
|
relevant contextual information and metadata.
|
|
214
261
|
"""
|
|
215
|
-
index = self.retrieve(
|
|
262
|
+
index = self.retrieve(
|
|
263
|
+
name,
|
|
264
|
+
folder_key=folder_key,
|
|
265
|
+
folder_path=folder_path,
|
|
266
|
+
)
|
|
216
267
|
if index and index.in_progress_ingestion():
|
|
217
268
|
raise IngestionInProgressException(index_name=name)
|
|
218
|
-
spec = self._search_spec(
|
|
269
|
+
spec = self._search_spec(
|
|
270
|
+
name,
|
|
271
|
+
query,
|
|
272
|
+
number_of_results,
|
|
273
|
+
folder_key=folder_key,
|
|
274
|
+
folder_path=folder_path,
|
|
275
|
+
)
|
|
219
276
|
|
|
220
277
|
response = await self.request_async(
|
|
221
278
|
spec.method,
|
|
@@ -236,6 +293,8 @@ class ContextGroundingService(FolderContext, BaseService):
|
|
|
236
293
|
storage_bucket_name: str,
|
|
237
294
|
file_name_glob: Optional[str] = None,
|
|
238
295
|
storage_bucket_folder_path: Optional[str] = None,
|
|
296
|
+
folder_key: Optional[str] = None,
|
|
297
|
+
folder_path: Optional[str] = None,
|
|
239
298
|
) -> ContextGroundingIndex:
|
|
240
299
|
spec = self._create_spec(
|
|
241
300
|
name,
|
|
@@ -243,8 +302,14 @@ class ContextGroundingService(FolderContext, BaseService):
|
|
|
243
302
|
storage_bucket_name,
|
|
244
303
|
file_name_glob,
|
|
245
304
|
storage_bucket_folder_path,
|
|
305
|
+
folder_key=folder_key,
|
|
306
|
+
folder_path=folder_path,
|
|
307
|
+
)
|
|
308
|
+
index = self.retrieve(
|
|
309
|
+
name=name,
|
|
310
|
+
folder_key=folder_key,
|
|
311
|
+
folder_path=folder_path,
|
|
246
312
|
)
|
|
247
|
-
index = self.retrieve(name=name)
|
|
248
313
|
if index:
|
|
249
314
|
return index
|
|
250
315
|
|
|
@@ -265,8 +330,14 @@ class ContextGroundingService(FolderContext, BaseService):
|
|
|
265
330
|
storage_bucket_name: str,
|
|
266
331
|
file_name_glob: Optional[str] = None,
|
|
267
332
|
storage_bucket_folder_path: Optional[str] = None,
|
|
333
|
+
folder_key: Optional[str] = None,
|
|
334
|
+
folder_path: Optional[str] = None,
|
|
268
335
|
) -> ContextGroundingIndex:
|
|
269
|
-
index = await self.retrieve_async(
|
|
336
|
+
index = await self.retrieve_async(
|
|
337
|
+
name=name,
|
|
338
|
+
folder_key=folder_key,
|
|
339
|
+
folder_path=folder_path,
|
|
340
|
+
)
|
|
270
341
|
if index:
|
|
271
342
|
return index
|
|
272
343
|
|
|
@@ -276,6 +347,8 @@ class ContextGroundingService(FolderContext, BaseService):
|
|
|
276
347
|
storage_bucket_name,
|
|
277
348
|
file_name_glob,
|
|
278
349
|
storage_bucket_folder_path,
|
|
350
|
+
folder_key=folder_key,
|
|
351
|
+
folder_path=folder_path,
|
|
279
352
|
)
|
|
280
353
|
response = (
|
|
281
354
|
await self.request_async(
|
|
@@ -288,10 +361,19 @@ class ContextGroundingService(FolderContext, BaseService):
|
|
|
288
361
|
return ContextGroundingIndex.model_validate(response)
|
|
289
362
|
|
|
290
363
|
@traced(run_type="uipath", hide_input=True, hide_output=True)
|
|
291
|
-
def ingest_data(
|
|
364
|
+
def ingest_data(
|
|
365
|
+
self,
|
|
366
|
+
index: ContextGroundingIndex,
|
|
367
|
+
folder_key: Optional[str] = None,
|
|
368
|
+
folder_path: Optional[str] = None,
|
|
369
|
+
) -> None:
|
|
292
370
|
if not index.id:
|
|
293
371
|
return
|
|
294
|
-
spec = self._ingest_spec(
|
|
372
|
+
spec = self._ingest_spec(
|
|
373
|
+
index.id,
|
|
374
|
+
folder_key=folder_key,
|
|
375
|
+
folder_path=folder_path,
|
|
376
|
+
)
|
|
295
377
|
self.request(
|
|
296
378
|
spec.method,
|
|
297
379
|
spec.endpoint,
|
|
@@ -299,10 +381,19 @@ class ContextGroundingService(FolderContext, BaseService):
|
|
|
299
381
|
)
|
|
300
382
|
|
|
301
383
|
@traced(run_type="uipath", hide_input=True, hide_output=True)
|
|
302
|
-
async def ingest_data_async(
|
|
384
|
+
async def ingest_data_async(
|
|
385
|
+
self,
|
|
386
|
+
index: ContextGroundingIndex,
|
|
387
|
+
folder_key: Optional[str] = None,
|
|
388
|
+
folder_path: Optional[str] = None,
|
|
389
|
+
) -> None:
|
|
303
390
|
if not index.id:
|
|
304
391
|
return
|
|
305
|
-
spec = self._ingest_spec(
|
|
392
|
+
spec = self._ingest_spec(
|
|
393
|
+
index.id,
|
|
394
|
+
folder_key=folder_key,
|
|
395
|
+
folder_path=folder_path,
|
|
396
|
+
)
|
|
306
397
|
await self.request_async(
|
|
307
398
|
spec.method,
|
|
308
399
|
spec.endpoint,
|
|
@@ -310,10 +401,19 @@ class ContextGroundingService(FolderContext, BaseService):
|
|
|
310
401
|
)
|
|
311
402
|
|
|
312
403
|
@traced(run_type="uipath", hide_input=True, hide_output=True)
|
|
313
|
-
def delete_index(
|
|
404
|
+
def delete_index(
|
|
405
|
+
self,
|
|
406
|
+
index: ContextGroundingIndex,
|
|
407
|
+
folder_key: Optional[str] = None,
|
|
408
|
+
folder_path: Optional[str] = None,
|
|
409
|
+
) -> None:
|
|
314
410
|
if not index.id:
|
|
315
411
|
return
|
|
316
|
-
spec = self._delete_by_id_spec(
|
|
412
|
+
spec = self._delete_by_id_spec(
|
|
413
|
+
index.id,
|
|
414
|
+
folder_key=folder_key,
|
|
415
|
+
folder_path=folder_path,
|
|
416
|
+
)
|
|
317
417
|
self.request(
|
|
318
418
|
spec.method,
|
|
319
419
|
spec.endpoint,
|
|
@@ -321,10 +421,19 @@ class ContextGroundingService(FolderContext, BaseService):
|
|
|
321
421
|
)
|
|
322
422
|
|
|
323
423
|
@traced(run_type="uipath", hide_input=True, hide_output=True)
|
|
324
|
-
async def delete_index_async(
|
|
424
|
+
async def delete_index_async(
|
|
425
|
+
self,
|
|
426
|
+
index: ContextGroundingIndex,
|
|
427
|
+
folder_key: Optional[str] = None,
|
|
428
|
+
folder_path: Optional[str] = None,
|
|
429
|
+
) -> None:
|
|
325
430
|
if not index.id:
|
|
326
431
|
return
|
|
327
|
-
spec = self._delete_by_id_spec(
|
|
432
|
+
spec = self._delete_by_id_spec(
|
|
433
|
+
index.id,
|
|
434
|
+
folder_key=folder_key,
|
|
435
|
+
folder_path=folder_path,
|
|
436
|
+
)
|
|
328
437
|
await self.request_async(
|
|
329
438
|
spec.method,
|
|
330
439
|
spec.endpoint,
|
|
@@ -346,16 +455,42 @@ class ContextGroundingService(FolderContext, BaseService):
|
|
|
346
455
|
|
|
347
456
|
return self.folder_headers
|
|
348
457
|
|
|
349
|
-
def _ingest_spec(
|
|
458
|
+
def _ingest_spec(
|
|
459
|
+
self,
|
|
460
|
+
key: str,
|
|
461
|
+
folder_key: Optional[str] = None,
|
|
462
|
+
folder_path: Optional[str] = None,
|
|
463
|
+
) -> RequestSpec:
|
|
464
|
+
if folder_key is None and folder_path is not None:
|
|
465
|
+
folder_key = self._folders_service.retrieve_key_by_folder_path(folder_path)
|
|
466
|
+
folder_path = None
|
|
467
|
+
|
|
350
468
|
return RequestSpec(
|
|
351
|
-
method="POST",
|
|
469
|
+
method="POST",
|
|
470
|
+
endpoint=Endpoint(f"/ecs_/v2/indexes/{key}/ingest"),
|
|
471
|
+
headers={
|
|
472
|
+
**header_folder(folder_key, folder_path),
|
|
473
|
+
},
|
|
352
474
|
)
|
|
353
475
|
|
|
354
|
-
def _retrieve_spec(
|
|
476
|
+
def _retrieve_spec(
|
|
477
|
+
self,
|
|
478
|
+
name: str,
|
|
479
|
+
folder_key: Optional[str] = None,
|
|
480
|
+
folder_path: Optional[str] = None,
|
|
481
|
+
) -> RequestSpec:
|
|
482
|
+
print(folder_key, folder_path)
|
|
483
|
+
if folder_key is None and folder_path is not None:
|
|
484
|
+
folder_key = self._folders_service.retrieve_key_by_folder_path(folder_path)
|
|
485
|
+
folder_path = None
|
|
486
|
+
print("~~~", name, folder_key, folder_path)
|
|
355
487
|
return RequestSpec(
|
|
356
488
|
method="GET",
|
|
357
489
|
endpoint=Endpoint("/ecs_/v2/indexes"),
|
|
358
490
|
params={"$filter": f"Name eq '{name}'"},
|
|
491
|
+
headers={
|
|
492
|
+
**header_folder(folder_key, folder_path),
|
|
493
|
+
},
|
|
359
494
|
)
|
|
360
495
|
|
|
361
496
|
def _create_spec(
|
|
@@ -365,7 +500,13 @@ class ContextGroundingService(FolderContext, BaseService):
|
|
|
365
500
|
storage_bucket_name: Optional[str],
|
|
366
501
|
file_name_glob: Optional[str],
|
|
367
502
|
storage_bucket_folder_path: Optional[str],
|
|
503
|
+
folder_key: Optional[str] = None,
|
|
504
|
+
folder_path: Optional[str] = None,
|
|
368
505
|
) -> RequestSpec:
|
|
506
|
+
if folder_key is None and folder_path is not None:
|
|
507
|
+
folder_key = self._folders_service.retrieve_key_by_folder_path(folder_path)
|
|
508
|
+
folder_path = None
|
|
509
|
+
|
|
369
510
|
storage_bucket_folder_path = (
|
|
370
511
|
storage_bucket_folder_path
|
|
371
512
|
if storage_bucket_folder_path
|
|
@@ -389,23 +530,59 @@ class ContextGroundingService(FolderContext, BaseService):
|
|
|
389
530
|
},
|
|
390
531
|
}
|
|
391
532
|
),
|
|
533
|
+
headers={
|
|
534
|
+
**header_folder(folder_key, folder_path),
|
|
535
|
+
},
|
|
392
536
|
)
|
|
393
537
|
|
|
394
|
-
def _retrieve_by_id_spec(
|
|
538
|
+
def _retrieve_by_id_spec(
|
|
539
|
+
self,
|
|
540
|
+
id: str,
|
|
541
|
+
folder_key: Optional[str] = None,
|
|
542
|
+
folder_path: Optional[str] = None,
|
|
543
|
+
) -> RequestSpec:
|
|
544
|
+
if folder_key is None and folder_path is not None:
|
|
545
|
+
folder_key = self._folders_service.retrieve_key_by_folder_path(folder_path)
|
|
546
|
+
folder_path = None
|
|
547
|
+
|
|
395
548
|
return RequestSpec(
|
|
396
549
|
method="GET",
|
|
397
550
|
endpoint=Endpoint(f"/ecs_/v2/indexes/{id}"),
|
|
551
|
+
headers={
|
|
552
|
+
**header_folder(folder_key, folder_path),
|
|
553
|
+
},
|
|
398
554
|
)
|
|
399
555
|
|
|
400
|
-
def _delete_by_id_spec(
|
|
556
|
+
def _delete_by_id_spec(
|
|
557
|
+
self,
|
|
558
|
+
id: str,
|
|
559
|
+
folder_key: Optional[str] = None,
|
|
560
|
+
folder_path: Optional[str] = None,
|
|
561
|
+
) -> RequestSpec:
|
|
562
|
+
if folder_key is None and folder_path is not None:
|
|
563
|
+
folder_key = self._folders_service.retrieve_key_by_folder_path(folder_path)
|
|
564
|
+
folder_path = None
|
|
565
|
+
|
|
401
566
|
return RequestSpec(
|
|
402
567
|
method="DELETE",
|
|
403
568
|
endpoint=Endpoint(f"/ecs_/v2/indexes/{id}"),
|
|
569
|
+
headers={
|
|
570
|
+
**header_folder(folder_key, folder_path),
|
|
571
|
+
},
|
|
404
572
|
)
|
|
405
573
|
|
|
406
574
|
def _search_spec(
|
|
407
|
-
self,
|
|
575
|
+
self,
|
|
576
|
+
name: str,
|
|
577
|
+
query: str,
|
|
578
|
+
number_of_results: int = 10,
|
|
579
|
+
folder_key: Optional[str] = None,
|
|
580
|
+
folder_path: Optional[str] = None,
|
|
408
581
|
) -> RequestSpec:
|
|
582
|
+
if folder_key is None and folder_path is not None:
|
|
583
|
+
folder_key = self._folders_service.retrieve_key_by_folder_path(folder_path)
|
|
584
|
+
folder_path = None
|
|
585
|
+
|
|
409
586
|
return RequestSpec(
|
|
410
587
|
method="POST",
|
|
411
588
|
endpoint=Endpoint("/ecs_/v1/search"),
|
|
@@ -415,4 +592,7 @@ class ContextGroundingService(FolderContext, BaseService):
|
|
|
415
592
|
"schema": {"name": name},
|
|
416
593
|
}
|
|
417
594
|
),
|
|
595
|
+
headers={
|
|
596
|
+
**header_folder(folder_key, folder_path),
|
|
597
|
+
},
|
|
418
598
|
)
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
version = 1
|
|
2
|
-
revision = 1
|
|
3
2
|
requires-python = ">=3.10"
|
|
4
3
|
resolution-markers = [
|
|
5
4
|
"python_full_version >= '3.12.4'",
|
|
@@ -2393,7 +2392,7 @@ wheels = [
|
|
|
2393
2392
|
|
|
2394
2393
|
[[package]]
|
|
2395
2394
|
name = "uipath"
|
|
2396
|
-
version = "2.0.
|
|
2395
|
+
version = "2.0.17"
|
|
2397
2396
|
source = { editable = "." }
|
|
2398
2397
|
dependencies = [
|
|
2399
2398
|
{ name = "click" },
|
|
@@ -2445,7 +2444,6 @@ requires-dist = [
|
|
|
2445
2444
|
{ name = "types-requests", specifier = ">=2.32.0.20250306" },
|
|
2446
2445
|
{ name = "uipath-langchain", marker = "extra == 'langchain'", specifier = ">=0.0.88,<0.1.0" },
|
|
2447
2446
|
]
|
|
2448
|
-
provides-extras = ["langchain"]
|
|
2449
2447
|
|
|
2450
2448
|
[package.metadata.requires-dev]
|
|
2451
2449
|
dev = [
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|