uipath 2.0.81__tar.gz → 2.0.83__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.
- {uipath-2.0.81 → uipath-2.0.83}/.github/workflows/publish-docs.yml +3 -0
- {uipath-2.0.81 → uipath-2.0.83}/PKG-INFO +1 -1
- {uipath-2.0.81 → uipath-2.0.83}/docs/core/getting_started.md +10 -9
- uipath-2.0.83/docs/core/llm_gateway.md +1 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/index.md +11 -0
- {uipath-2.0.81 → uipath-2.0.83}/mkdocs.yml +19 -14
- {uipath-2.0.81 → uipath-2.0.83}/pyproject.toml +1 -1
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/_auth/auth_config.json +2 -2
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/cli_pack.py +1 -1
- uipath-2.0.83/src/uipath/_services/llm_gateway_service.py +425 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_uipath.py +10 -0
- {uipath-2.0.81 → uipath-2.0.83}/uv.lock +1700 -1700
- uipath-2.0.81/src/uipath/_services/llm_gateway_service.py +0 -250
- {uipath-2.0.81 → uipath-2.0.83}/.cursorrules +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/.editorconfig +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/.gitattributes +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/.github/workflows/cd.yml +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/.github/workflows/ci.yml +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/.github/workflows/commitlint.yml +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/.github/workflows/lint.yml +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/.github/workflows/publish-dev.yml +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/.github/workflows/slack.yml +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/.github/workflows/test.yml +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/.gitignore +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/.pre-commit-config.yaml +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/.python-version +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/.vscode/extensions.json +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/.vscode/launch.json +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/.vscode/settings.json +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/CONTRIBUTING.md +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/LICENSE +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/README.md +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/CONTRIBUTING.md +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/FAQ.md +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/assets/env-preparation-failed-dark.png +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/assets/env-preparation-failed-light.png +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/assets/favicon.png +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/assets/logo-dark.svg +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/assets/logo-light.svg +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/cli/index.md +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/core/actions.md +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/core/assets/cloud_env_var_dark.gif +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/core/assets/cloud_env_var_light.gif +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/core/assets/cloud_env_var_secret_dark.png +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/core/assets/cloud_env_var_secret_light.png +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/core/assets/copy_path_dark.png +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/core/assets/copy_path_light.png +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/core/assets.md +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/core/attachments.md +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/core/buckets.md +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/core/connections.md +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/core/context_grounding.md +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/core/environment_variables.md +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/core/jobs.md +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/core/processes.md +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/core/queues.md +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/core/traced.md +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/hooks.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/javascripts/extra.js +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/overrides/main.html +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/overrides/partials/actions.html +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/overrides/partials/logo.html +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/release_policy.md +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/sample_images/google-ADK-agent/agent-output.png +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/docs/stylesheets/extra.css +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/justfile +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/py.typed +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/samples/google-ADK-agent/.env.example +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/samples/google-ADK-agent/README.md +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/samples/google-ADK-agent/input.json +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/samples/google-ADK-agent/multi_tool_agent/__init__.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/samples/google-ADK-agent/multi_tool_agent/agent.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/samples/google-ADK-agent/pyproject.toml +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/samples/google-ADK-agent/uv.lock +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/scripts/debug_test.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/scripts/lint_httpx_client.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/__init__.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/README.md +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/__init__.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/_auth/_auth_server.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/_auth/_client_credentials.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/_auth/_models.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/_auth/_oidc_utils.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/_auth/_portal_service.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/_auth/_utils.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/_auth/index.html +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/_auth/localhost.crt +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/_auth/localhost.key +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/_runtime/_contracts.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/_runtime/_escalation.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/_runtime/_hitl.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/_runtime/_logging.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/_runtime/_runtime.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/_templates/.psmdcp.template +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/_templates/.rels.template +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/_templates/[Content_Types].xml.template +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/_templates/main.py.template +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/_templates/package.nuspec.template +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/_utils/_common.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/_utils/_console.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/_utils/_constants.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/_utils/_debug.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/_utils/_folders.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/_utils/_input_args.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/_utils/_parse_ast.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/_utils/_processes.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/_utils/_tracing.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/cli_auth.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/cli_deploy.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/cli_init.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/cli_invoke.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/cli_new.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/cli_publish.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/cli_run.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/middlewares.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_cli/spinner.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_config.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_execution_context.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_folder_context.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_services/__init__.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_services/_base_service.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_services/actions_service.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_services/api_client.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_services/assets_service.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_services/attachments_service.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_services/buckets_service.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_services/connections_service.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_services/context_grounding_service.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_services/folder_service.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_services/jobs_service.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_services/processes_service.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_services/queues_service.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_utils/__init__.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_utils/_endpoint.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_utils/_infer_bindings.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_utils/_logs.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_utils/_read_overwrites.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_utils/_request_override.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_utils/_request_spec.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_utils/_ssl_context.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_utils/_url.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_utils/_user_agent.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/_utils/constants.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/models/__init__.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/models/action_schema.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/models/actions.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/models/assets.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/models/attachment.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/models/buckets.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/models/connections.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/models/context_grounding.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/models/context_grounding_index.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/models/errors.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/models/exceptions.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/models/interrupt_models.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/models/job.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/models/llm_gateway.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/models/processes.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/models/queues.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/py.typed +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/telemetry/__init__.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/telemetry/_constants.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/telemetry/_track.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/tracing/__init__.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/tracing/_otel_exporters.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/tracing/_traced.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/tracing/_utils.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/utils/__init__.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/src/uipath/utils/_endpoints_manager.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/__init__.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/cli/conftest.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/cli/mocks/bindings_script.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/cli/mocks/pyproject.toml +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/cli/mocks/simple_script.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/cli/mocks/uipath-mock.json +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/cli/mocks/uipath-simple-script-mock.json +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/cli/test_hitl.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/cli/test_init.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/cli/test_invoke.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/cli/test_new.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/cli/test_pack.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/cli/test_publish.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/cli/test_run.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/cli/test_utils.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/cli/utils/project_details.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/cli/utils/uipath_json.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/conftest.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/sdk/services/conftest.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/sdk/services/test_actions_service.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/sdk/services/test_api_client.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/sdk/services/test_assets_service.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/sdk/services/test_attachments_service.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/sdk/services/test_base_service.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/sdk/services/test_buckets_service.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/sdk/services/test_connections_service.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/sdk/services/test_context_grounding_service.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/sdk/services/test_folder_service.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/sdk/services/test_jobs_service.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/sdk/services/test_llm_integration.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/sdk/services/test_llm_service.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/sdk/services/test_processes_service.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/sdk/services/test_queues_service.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/sdk/services/test_uipath_llm_integration.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/sdk/test_bindings_inference.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/sdk/test_config.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/sdk/test_overwrites.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/tracing/test_otel_exporters.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/tracing/test_span_utils.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/tracing/test_traced.py +0 -0
- {uipath-2.0.81 → uipath-2.0.83}/tests/tracing/test_tracing_manager.py +0 -0
@@ -40,13 +40,16 @@ jobs:
|
|
40
40
|
run: |
|
41
41
|
git clone https://x-access-token:${{ secrets.REPO_ACCESS }}@github.com/UiPath/uipath-langchain-python plugins/uipath-langchain-python
|
42
42
|
git clone https://x-access-token:${{ secrets.REPO_ACCESS }}@github.com/UiPath/uipath-llamaindex-python plugins/uipath-llamaindex-python
|
43
|
+
git clone https://x-access-token:${{ secrets.REPO_ACCESS }}@github.com/UiPath/uipath-mcp-python plugins/uipath-mcp-python
|
43
44
|
|
44
45
|
- name: Symlink plugin docs
|
45
46
|
run: |
|
46
47
|
ln -s ../plugins/uipath-langchain-python/docs docs/langchain
|
47
48
|
ln -s ../plugins/uipath-llamaindex-python/docs docs/llamaindex
|
49
|
+
ln -s ../plugins/uipath-mcp-python/docs docs/mcp
|
48
50
|
ls -a docs/langchain
|
49
51
|
ls -a docs/llamaindex
|
52
|
+
ls -a docs/mcp
|
50
53
|
|
51
54
|
- name: Publish Docs
|
52
55
|
run: uv run mkdocs gh-deploy --force
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: uipath
|
3
|
-
Version: 2.0.
|
3
|
+
Version: 2.0.83
|
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
|
@@ -13,8 +13,8 @@
|
|
13
13
|
<!-- termynal -->
|
14
14
|
|
15
15
|
```shell
|
16
|
-
> mkdir
|
17
|
-
> cd
|
16
|
+
> mkdir uipath_coded_process
|
17
|
+
> cd uipath_coded_process
|
18
18
|
```
|
19
19
|
|
20
20
|
////
|
@@ -24,8 +24,8 @@
|
|
24
24
|
<!-- termynal -->
|
25
25
|
|
26
26
|
```powershell
|
27
|
-
> New-Item -ItemType Directory -Path
|
28
|
-
> Set-Location
|
27
|
+
> New-Item -ItemType Directory -Path uipath_coded_process
|
28
|
+
> Set-Location uipath_coded_process
|
29
29
|
```
|
30
30
|
|
31
31
|
////
|
@@ -191,7 +191,7 @@ Then, package your project:
|
|
191
191
|
```shell
|
192
192
|
> uipath pack
|
193
193
|
⠋ Packaging project ...
|
194
|
-
Name :
|
194
|
+
Name : uipath_coded_process
|
195
195
|
Version : 0.1.0
|
196
196
|
Description: Add your description here
|
197
197
|
Authors : Your Name
|
@@ -210,7 +210,7 @@ Finally, publish your package:
|
|
210
210
|
1: Orchestrator Personal Workspace Feed
|
211
211
|
Select feed number: 0
|
212
212
|
Selected feed: Orchestrator Tenant Processes Feed
|
213
|
-
⠸ Publishing most recent package:
|
213
|
+
⠸ Publishing most recent package: uipath_coded_process.0.1.0.nupkg ...
|
214
214
|
✓ Package published successfully!
|
215
215
|
```
|
216
216
|
|
@@ -229,12 +229,13 @@ from uipath import UiPath
|
|
229
229
|
def main():
|
230
230
|
sdk = UiPath()
|
231
231
|
sdk.processes.invoke(
|
232
|
-
"
|
232
|
+
"uipath_coded_process",
|
233
233
|
input_arguments={
|
234
234
|
"message": "Hello, World!",
|
235
235
|
"repeat": 3,
|
236
236
|
"prefix": "[Echo]"
|
237
|
-
}
|
237
|
+
},
|
238
|
+
folder_path="PROCESS_FOLDER_PATH_HERE"
|
238
239
|
)
|
239
240
|
```
|
240
241
|
|
@@ -246,7 +247,7 @@ def main():
|
|
246
247
|
> uipath run main.py
|
247
248
|
```
|
248
249
|
|
249
|
-
Open your browser and navigate to UiPath. Go to the specified folder, where you'll see a new job for `
|
250
|
+
Open your browser and navigate to UiPath. Go to the specified folder, where you'll see a new job for `uipath_coded_process` has been executed. The output will be:
|
250
251
|
|
251
252
|
```
|
252
253
|
[Echo]: Hello, World! Echo: Hello, World! Echo: Hello, World!
|
@@ -0,0 +1 @@
|
|
1
|
+
::: uipath._services.llm_gateway_service
|
@@ -13,6 +13,17 @@ title: Getting Started
|
|
13
13
|
|
14
14
|
</div>
|
15
15
|
|
16
|
+
<div class="grid cards" markdown>
|
17
|
+
- __UiPath MCP SDK__
|
18
|
+
|
19
|
+
---
|
20
|
+
|
21
|
+
Build and host Coded MCP Servers within UiPath.
|
22
|
+
|
23
|
+
[Start Building](./mcp/quick_start.md)
|
24
|
+
|
25
|
+
</div>
|
26
|
+
|
16
27
|
<h2> Extensions </h2>
|
17
28
|
<div class="grid cards" markdown>
|
18
29
|
- __UiPath Langchain SDK__
|
@@ -53,6 +53,25 @@ theme:
|
|
53
53
|
- toc.follow
|
54
54
|
|
55
55
|
nav:
|
56
|
+
- UiPath SDK:
|
57
|
+
- Getting Started: core/getting_started.md
|
58
|
+
- Environment Variables: core/environment_variables.md
|
59
|
+
- CLI Reference: cli/index.md
|
60
|
+
- Tracing: core/traced.md
|
61
|
+
- Services:
|
62
|
+
- Actions: core/actions.md
|
63
|
+
- Assets: core/assets.md
|
64
|
+
- Buckets: core/buckets.md
|
65
|
+
- Connections: core/connections.md
|
66
|
+
- Context Grounding: core/context_grounding.md
|
67
|
+
- Jobs: core/jobs.md
|
68
|
+
- LLM Gateway: core/llm_gateway.md
|
69
|
+
- Queues: core/queues.md
|
70
|
+
- Processes: core/processes.md
|
71
|
+
- UiPath MCP SDK:
|
72
|
+
- Getting Started: mcp/quick_start.md
|
73
|
+
- How To Pack Binary: mcp/how_to_pack_binary.md
|
74
|
+
- Sample MCP Servers: https://github.com/UiPath/uipath-mcp-python/tree/main/samples
|
56
75
|
- UiPath Langchain SDK:
|
57
76
|
- Getting Started: langchain/quick_start.md
|
58
77
|
- Chat Models: langchain/chat_models.md
|
@@ -65,20 +84,6 @@ nav:
|
|
65
84
|
- Context Grounding: llamaindex/context_grounding.md
|
66
85
|
- Human In The Loop: llamaindex/human_in_the_loop.md
|
67
86
|
- Sample Agents: https://github.com/UiPath/uipath-llamaindex-python/tree/main/samples
|
68
|
-
- UiPath SDK:
|
69
|
-
- Getting Started: core/getting_started.md
|
70
|
-
- Environment Variables: core/environment_variables.md
|
71
|
-
- CLI Reference: cli/index.md
|
72
|
-
- Tracing: core/traced.md
|
73
|
-
- Services:
|
74
|
-
- Actions: core/actions.md
|
75
|
-
- Assets: core/assets.md
|
76
|
-
- Buckets: core/buckets.md
|
77
|
-
- Connections: core/connections.md
|
78
|
-
- Context Grounding: core/context_grounding.md
|
79
|
-
- Jobs: core/jobs.md
|
80
|
-
- Queues: core/queues.md
|
81
|
-
- Processes: core/processes.md
|
82
87
|
- How To Contribute: CONTRIBUTING.md
|
83
88
|
- FAQ: FAQ.md
|
84
89
|
- Release Policy: release_policy.md
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "uipath"
|
3
|
-
version = "2.0.
|
3
|
+
version = "2.0.83"
|
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"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"client_id": "36dea5b8-e8bb-423d-8e7b-c808df8f1c00",
|
3
3
|
"redirect_uri": "http://localhost:__PY_REPLACE_PORT__/oidc/login",
|
4
|
-
"scope": "offline_access OrchestratorApiUserAccess IdentityServerApi ConnectionService DataService DocumentUnderstanding EnterpriseContextService Directory JamJamApi LLMGateway LLMOps OMS RCS.FolderAuthorization",
|
4
|
+
"scope": "offline_access OrchestratorApiUserAccess IdentityServerApi ConnectionService DataService DocumentUnderstanding EnterpriseContextService Directory JamJamApi LLMGateway LLMOps OMS RCS.FolderAuthorization TM.Projects TM.TestCases TM.Requirements TM.TestSets",
|
5
5
|
"port": 8104
|
6
|
-
}
|
6
|
+
}
|
@@ -264,7 +264,7 @@ def pack_fn(
|
|
264
264
|
console.error("uipath.json not found, please run `uipath init`.")
|
265
265
|
|
266
266
|
# Define the allowlist of file extensions to include
|
267
|
-
file_extensions_included = [".py", ".mermaid", ".json", ".yaml", ".yml"]
|
267
|
+
file_extensions_included = [".py", ".mermaid", ".json", ".yaml", ".yml", ".md"]
|
268
268
|
files_included = []
|
269
269
|
|
270
270
|
with open(config_path, "r") as f:
|
@@ -0,0 +1,425 @@
|
|
1
|
+
"""UiPath LLM Gateway Services.
|
2
|
+
|
3
|
+
This module provides services for interacting with UiPath's LLM (Large Language Model) Gateway,
|
4
|
+
offering both OpenAI-compatible and normalized API interfaces for chat completions and embeddings.
|
5
|
+
|
6
|
+
The module includes:
|
7
|
+
- UiPathOpenAIService: OpenAI-compatible API for chat completions and embeddings
|
8
|
+
- UiPathLlmChatService: UiPath's normalized API with advanced features like tool calling
|
9
|
+
- ChatModels: Constants for available chat models
|
10
|
+
- EmbeddingModels: Constants for available embedding models
|
11
|
+
|
12
|
+
Classes:
|
13
|
+
ChatModels: Container for supported chat model identifiers
|
14
|
+
EmbeddingModels: Container for supported embedding model identifiers
|
15
|
+
UiPathOpenAIService: Service using OpenAI-compatible API format
|
16
|
+
UiPathLlmChatService: Service using UiPath's normalized API format
|
17
|
+
"""
|
18
|
+
|
19
|
+
import json
|
20
|
+
from typing import Any, Dict, List, Optional
|
21
|
+
|
22
|
+
from .._config import Config
|
23
|
+
from .._execution_context import ExecutionContext
|
24
|
+
from .._utils import Endpoint
|
25
|
+
from ..models.llm_gateway import (
|
26
|
+
ChatCompletion,
|
27
|
+
SpecificToolChoice,
|
28
|
+
TextEmbedding,
|
29
|
+
ToolChoice,
|
30
|
+
ToolDefinition,
|
31
|
+
)
|
32
|
+
from ..tracing._traced import traced
|
33
|
+
from ..utils import EndpointManager
|
34
|
+
from ._base_service import BaseService
|
35
|
+
|
36
|
+
# Common constants
|
37
|
+
API_VERSION = "2024-10-21" # Standard API version for OpenAI-compatible endpoints
|
38
|
+
NORMALIZED_API_VERSION = (
|
39
|
+
"2024-08-01-preview" # API version for UiPath's normalized endpoints
|
40
|
+
)
|
41
|
+
|
42
|
+
# Common headers used across all LLM Gateway requests
|
43
|
+
DEFAULT_LLM_HEADERS = {
|
44
|
+
"X-UIPATH-STREAMING-ENABLED": "false",
|
45
|
+
"X-UiPath-LlmGateway-RequestingProduct": "uipath-python-sdk",
|
46
|
+
"X-UiPath-LlmGateway-RequestingFeature": "langgraph-agent",
|
47
|
+
}
|
48
|
+
|
49
|
+
|
50
|
+
class ChatModels(object):
|
51
|
+
"""Available chat models for LLM Gateway services.
|
52
|
+
|
53
|
+
This class provides constants for the supported chat models that can be used
|
54
|
+
with both UiPathOpenAIService and UiPathLlmChatService.
|
55
|
+
"""
|
56
|
+
|
57
|
+
gpt_4 = "gpt-4"
|
58
|
+
gpt_4_1106_Preview = "gpt-4-1106-Preview"
|
59
|
+
gpt_4_32k = "gpt-4-32k"
|
60
|
+
gpt_4_turbo_2024_04_09 = "gpt-4-turbo-2024-04-09"
|
61
|
+
gpt_4_vision_preview = "gpt-4-vision-preview"
|
62
|
+
gpt_4o_2024_05_13 = "gpt-4o-2024-05-13"
|
63
|
+
gpt_4o_2024_08_06 = "gpt-4o-2024-08-06"
|
64
|
+
gpt_4o_mini_2024_07_18 = "gpt-4o-mini-2024-07-18"
|
65
|
+
o3_mini = "o3-mini-2025-01-31"
|
66
|
+
|
67
|
+
|
68
|
+
class EmbeddingModels(object):
|
69
|
+
"""Available embedding models for LLM Gateway services.
|
70
|
+
|
71
|
+
This class provides constants for the supported embedding models that can be used
|
72
|
+
with the embeddings functionality.
|
73
|
+
"""
|
74
|
+
|
75
|
+
text_embedding_3_large = "text-embedding-3-large"
|
76
|
+
text_embedding_ada_002 = "text-embedding-ada-002"
|
77
|
+
|
78
|
+
|
79
|
+
class UiPathOpenAIService(BaseService):
|
80
|
+
"""Service for calling UiPath's LLM Gateway using OpenAI-compatible API.
|
81
|
+
|
82
|
+
This service provides access to Large Language Model capabilities through UiPath's
|
83
|
+
LLM Gateway, including chat completions and text embeddings. It uses the OpenAI-compatible
|
84
|
+
API format and is suitable for applications that need direct OpenAI API compatibility.
|
85
|
+
"""
|
86
|
+
|
87
|
+
def __init__(self, config: Config, execution_context: ExecutionContext) -> None:
|
88
|
+
super().__init__(config=config, execution_context=execution_context)
|
89
|
+
|
90
|
+
@traced(name="llm_embeddings", run_type="uipath")
|
91
|
+
async def embeddings(
|
92
|
+
self,
|
93
|
+
input: str,
|
94
|
+
embedding_model: str = EmbeddingModels.text_embedding_ada_002,
|
95
|
+
openai_api_version: str = API_VERSION,
|
96
|
+
):
|
97
|
+
"""Generate text embeddings using UiPath's LLM Gateway service.
|
98
|
+
|
99
|
+
This method converts input text into dense vector representations that can be used
|
100
|
+
for semantic search, similarity calculations, and other NLP tasks.
|
101
|
+
|
102
|
+
Args:
|
103
|
+
input (str): The input text to embed. Can be a single sentence, paragraph,
|
104
|
+
or document that you want to convert to embeddings.
|
105
|
+
embedding_model (str, optional): The embedding model to use.
|
106
|
+
Defaults to EmbeddingModels.text_embedding_ada_002.
|
107
|
+
Available models are defined in the EmbeddingModels class.
|
108
|
+
openai_api_version (str, optional): The OpenAI API version to use.
|
109
|
+
Defaults to API_VERSION.
|
110
|
+
|
111
|
+
Returns:
|
112
|
+
TextEmbedding: The embedding response containing the vector representation
|
113
|
+
of the input text along with metadata.
|
114
|
+
|
115
|
+
Examples:
|
116
|
+
```python
|
117
|
+
# Basic embedding
|
118
|
+
embedding = await service.embeddings("Hello, world!")
|
119
|
+
|
120
|
+
# Using a specific model
|
121
|
+
embedding = await service.embeddings(
|
122
|
+
"This is a longer text to embed",
|
123
|
+
embedding_model=EmbeddingModels.text_embedding_3_large
|
124
|
+
)
|
125
|
+
```
|
126
|
+
"""
|
127
|
+
endpoint = EndpointManager.get_embeddings_endpoint().format(
|
128
|
+
model=embedding_model, api_version=openai_api_version
|
129
|
+
)
|
130
|
+
endpoint = Endpoint("/" + endpoint)
|
131
|
+
|
132
|
+
response = await self.request_async(
|
133
|
+
"POST",
|
134
|
+
endpoint,
|
135
|
+
content=json.dumps({"input": input}),
|
136
|
+
params={"api-version": API_VERSION},
|
137
|
+
headers=DEFAULT_LLM_HEADERS,
|
138
|
+
)
|
139
|
+
|
140
|
+
return TextEmbedding.model_validate(response.json())
|
141
|
+
|
142
|
+
@traced(name="llm_chat_completions", run_type="uipath")
|
143
|
+
async def chat_completions(
|
144
|
+
self,
|
145
|
+
messages: List[Dict[str, str]],
|
146
|
+
model: str = ChatModels.gpt_4o_mini_2024_07_18,
|
147
|
+
max_tokens: int = 50,
|
148
|
+
temperature: float = 0,
|
149
|
+
api_version: str = API_VERSION,
|
150
|
+
):
|
151
|
+
"""Generate chat completions using UiPath's LLM Gateway service.
|
152
|
+
|
153
|
+
This method provides conversational AI capabilities by sending a series of messages
|
154
|
+
to a language model and receiving a generated response. It supports multi-turn
|
155
|
+
conversations and various OpenAI-compatible models.
|
156
|
+
|
157
|
+
Args:
|
158
|
+
messages (List[Dict[str, str]]): List of message dictionaries with 'role' and 'content' keys.
|
159
|
+
The supported roles are 'system', 'user', and 'assistant'. System messages set
|
160
|
+
the behavior/context, user messages are from the human, and assistant messages
|
161
|
+
are from the AI.
|
162
|
+
model (str, optional): The model to use for chat completion.
|
163
|
+
Defaults to ChatModels.gpt_4o_mini_2024_07_18.
|
164
|
+
Available models are defined in the ChatModels class.
|
165
|
+
max_tokens (int, optional): Maximum number of tokens to generate in the response.
|
166
|
+
Defaults to 50. Higher values allow longer responses.
|
167
|
+
temperature (float, optional): Temperature for sampling, between 0 and 1.
|
168
|
+
Lower values (closer to 0) make output more deterministic and focused,
|
169
|
+
higher values make it more creative and random. Defaults to 0.
|
170
|
+
api_version (str, optional): The API version to use. Defaults to API_VERSION.
|
171
|
+
|
172
|
+
Returns:
|
173
|
+
ChatCompletion: The chat completion response containing the generated message,
|
174
|
+
usage statistics, and other metadata.
|
175
|
+
|
176
|
+
Examples:
|
177
|
+
```python
|
178
|
+
# Simple conversation
|
179
|
+
messages = [
|
180
|
+
{"role": "system", "content": "You are a helpful Python programming assistant."},
|
181
|
+
{"role": "user", "content": "How do I read a file in Python?"}
|
182
|
+
]
|
183
|
+
response = await service.chat_completions(messages)
|
184
|
+
|
185
|
+
# Multi-turn conversation with more tokens
|
186
|
+
messages = [
|
187
|
+
{"role": "system", "content": "You are a helpful assistant."},
|
188
|
+
{"role": "user", "content": "What is machine learning?"},
|
189
|
+
{"role": "assistant", "content": "Machine learning is a subset of AI..."},
|
190
|
+
{"role": "user", "content": "Can you give me a practical example?"}
|
191
|
+
]
|
192
|
+
response = await service.chat_completions(
|
193
|
+
messages,
|
194
|
+
max_tokens=200,
|
195
|
+
temperature=0.3
|
196
|
+
)
|
197
|
+
```
|
198
|
+
|
199
|
+
Note:
|
200
|
+
The conversation history can be included to provide context to the model.
|
201
|
+
Each message should have both 'role' and 'content' keys.
|
202
|
+
"""
|
203
|
+
endpoint = EndpointManager.get_passthrough_endpoint().format(
|
204
|
+
model=model, api_version=api_version
|
205
|
+
)
|
206
|
+
endpoint = Endpoint("/" + endpoint)
|
207
|
+
|
208
|
+
request_body = {
|
209
|
+
"messages": messages,
|
210
|
+
"max_tokens": max_tokens,
|
211
|
+
"temperature": temperature,
|
212
|
+
}
|
213
|
+
|
214
|
+
response = await self.request_async(
|
215
|
+
"POST",
|
216
|
+
endpoint,
|
217
|
+
content=json.dumps(request_body),
|
218
|
+
params={"api-version": API_VERSION},
|
219
|
+
headers=DEFAULT_LLM_HEADERS,
|
220
|
+
)
|
221
|
+
|
222
|
+
return ChatCompletion.model_validate(response.json())
|
223
|
+
|
224
|
+
|
225
|
+
class UiPathLlmChatService(BaseService):
|
226
|
+
"""Service for calling UiPath's normalized LLM Gateway API.
|
227
|
+
|
228
|
+
This service provides access to Large Language Model capabilities through UiPath's
|
229
|
+
normalized LLM Gateway API. Unlike the OpenAI-compatible service, this service uses
|
230
|
+
UiPath's standardized API format and supports advanced features like tool calling,
|
231
|
+
function calling, and more sophisticated conversation control.
|
232
|
+
|
233
|
+
The normalized API provides a consistent interface across different underlying model
|
234
|
+
providers and includes enhanced features for enterprise use cases.
|
235
|
+
"""
|
236
|
+
|
237
|
+
def __init__(self, config: Config, execution_context: ExecutionContext) -> None:
|
238
|
+
super().__init__(config=config, execution_context=execution_context)
|
239
|
+
|
240
|
+
@traced(name="llm_chat_completions", run_type="uipath")
|
241
|
+
async def chat_completions(
|
242
|
+
self,
|
243
|
+
messages: List[Dict[str, str]],
|
244
|
+
model: str = ChatModels.gpt_4o_mini_2024_07_18,
|
245
|
+
max_tokens: int = 250,
|
246
|
+
temperature: float = 0,
|
247
|
+
n: int = 1,
|
248
|
+
frequency_penalty: float = 0,
|
249
|
+
presence_penalty: float = 0,
|
250
|
+
top_p: float = 1,
|
251
|
+
tools: Optional[List[ToolDefinition]] = None,
|
252
|
+
tool_choice: Optional[ToolChoice] = None,
|
253
|
+
api_version: str = NORMALIZED_API_VERSION,
|
254
|
+
):
|
255
|
+
"""Generate chat completions using UiPath's normalized LLM Gateway API.
|
256
|
+
|
257
|
+
This method provides advanced conversational AI capabilities with support for
|
258
|
+
tool calling, function calling, and sophisticated conversation control parameters.
|
259
|
+
It uses UiPath's normalized API format for consistent behavior across different
|
260
|
+
model providers.
|
261
|
+
|
262
|
+
Args:
|
263
|
+
messages (List[Dict[str, str]]): List of message dictionaries with 'role' and 'content' keys.
|
264
|
+
The supported roles are 'system', 'user', and 'assistant'. System messages set
|
265
|
+
the behavior/context, user messages are from the human, and assistant messages
|
266
|
+
are from the AI.
|
267
|
+
model (str, optional): The model to use for chat completion.
|
268
|
+
Defaults to ChatModels.gpt_4o_mini_2024_07_18.
|
269
|
+
Available models are defined in the ChatModels class.
|
270
|
+
max_tokens (int, optional): Maximum number of tokens to generate in the response.
|
271
|
+
Defaults to 250. Higher values allow longer responses.
|
272
|
+
temperature (float, optional): Temperature for sampling, between 0 and 1.
|
273
|
+
Lower values (closer to 0) make output more deterministic and focused,
|
274
|
+
higher values make it more creative and random. Defaults to 0.
|
275
|
+
n (int, optional): Number of chat completion choices to generate for each input.
|
276
|
+
Defaults to 1. Higher values generate multiple alternative responses.
|
277
|
+
frequency_penalty (float, optional): Penalty for token frequency between -2.0 and 2.0.
|
278
|
+
Positive values reduce repetition of frequent tokens. Defaults to 0.
|
279
|
+
presence_penalty (float, optional): Penalty for token presence between -2.0 and 2.0.
|
280
|
+
Positive values encourage discussion of new topics. Defaults to 0.
|
281
|
+
top_p (float, optional): Nucleus sampling parameter between 0 and 1.
|
282
|
+
Controls diversity by considering only the top p probability mass. Defaults to 1.
|
283
|
+
tools (Optional[List[ToolDefinition]], optional): List of tool definitions that the
|
284
|
+
model can call. Tools enable the model to perform actions or retrieve information
|
285
|
+
beyond text generation. Defaults to None.
|
286
|
+
tool_choice (Optional[ToolChoice], optional): Controls which tools the model can call.
|
287
|
+
Can be "auto" (model decides), "none" (no tools), or a specific tool choice.
|
288
|
+
Defaults to None.
|
289
|
+
api_version (str, optional): The normalized API version to use.
|
290
|
+
Defaults to NORMALIZED_API_VERSION.
|
291
|
+
|
292
|
+
Returns:
|
293
|
+
ChatCompletion: The chat completion response containing the generated message(s),
|
294
|
+
tool calls (if any), usage statistics, and other metadata.
|
295
|
+
|
296
|
+
Examples:
|
297
|
+
```python
|
298
|
+
# Basic conversation
|
299
|
+
messages = [
|
300
|
+
{"role": "system", "content": "You are a helpful assistant."},
|
301
|
+
{"role": "user", "content": "What is the weather like today?"}
|
302
|
+
]
|
303
|
+
response = await service.chat_completions(messages)
|
304
|
+
|
305
|
+
# Conversation with tool calling
|
306
|
+
tools = [
|
307
|
+
ToolDefinition(
|
308
|
+
function=FunctionDefinition(
|
309
|
+
name="get_weather",
|
310
|
+
description="Get current weather for a location",
|
311
|
+
parameters=ParametersDefinition(
|
312
|
+
type="object",
|
313
|
+
properties={
|
314
|
+
"location": PropertyDefinition(
|
315
|
+
type="string",
|
316
|
+
description="City name"
|
317
|
+
)
|
318
|
+
},
|
319
|
+
required=["location"]
|
320
|
+
)
|
321
|
+
)
|
322
|
+
)
|
323
|
+
]
|
324
|
+
response = await service.chat_completions(
|
325
|
+
messages,
|
326
|
+
tools=tools,
|
327
|
+
tool_choice="auto",
|
328
|
+
max_tokens=500
|
329
|
+
)
|
330
|
+
|
331
|
+
# Advanced parameters for creative writing
|
332
|
+
response = await service.chat_completions(
|
333
|
+
messages,
|
334
|
+
temperature=0.8,
|
335
|
+
top_p=0.9,
|
336
|
+
frequency_penalty=0.3,
|
337
|
+
presence_penalty=0.2,
|
338
|
+
n=3 # Generate 3 alternative responses
|
339
|
+
)
|
340
|
+
```
|
341
|
+
|
342
|
+
Note:
|
343
|
+
This service uses UiPath's normalized API format which provides consistent
|
344
|
+
behavior across different underlying model providers and enhanced enterprise features.
|
345
|
+
"""
|
346
|
+
endpoint = EndpointManager.get_normalized_endpoint().format(
|
347
|
+
model=model, api_version=api_version
|
348
|
+
)
|
349
|
+
endpoint = Endpoint("/" + endpoint)
|
350
|
+
|
351
|
+
request_body = {
|
352
|
+
"messages": messages,
|
353
|
+
"max_tokens": max_tokens,
|
354
|
+
"temperature": temperature,
|
355
|
+
"n": n,
|
356
|
+
"frequency_penalty": frequency_penalty,
|
357
|
+
"presence_penalty": presence_penalty,
|
358
|
+
"top_p": top_p,
|
359
|
+
}
|
360
|
+
|
361
|
+
# Add tools if provided - convert to UiPath format
|
362
|
+
if tools:
|
363
|
+
request_body["tools"] = [
|
364
|
+
self._convert_tool_to_uipath_format(tool) for tool in tools
|
365
|
+
]
|
366
|
+
|
367
|
+
# Handle tool_choice
|
368
|
+
if tool_choice:
|
369
|
+
if isinstance(tool_choice, str):
|
370
|
+
request_body["tool_choice"] = tool_choice
|
371
|
+
elif isinstance(tool_choice, SpecificToolChoice):
|
372
|
+
request_body["tool_choice"] = {"type": "tool", "name": tool_choice.name}
|
373
|
+
else:
|
374
|
+
request_body["tool_choice"] = tool_choice.model_dump()
|
375
|
+
|
376
|
+
# Use default headers but update with normalized API specific headers
|
377
|
+
headers = {
|
378
|
+
**DEFAULT_LLM_HEADERS,
|
379
|
+
"X-UiPath-LlmGateway-NormalizedApi-ModelName": model,
|
380
|
+
}
|
381
|
+
|
382
|
+
response = await self.request_async(
|
383
|
+
"POST",
|
384
|
+
endpoint,
|
385
|
+
content=json.dumps(request_body),
|
386
|
+
params={"api-version": NORMALIZED_API_VERSION},
|
387
|
+
headers=headers,
|
388
|
+
)
|
389
|
+
|
390
|
+
return ChatCompletion.model_validate(response.json())
|
391
|
+
|
392
|
+
def _convert_tool_to_uipath_format(self, tool: ToolDefinition) -> Dict[str, Any]:
|
393
|
+
"""Convert an OpenAI-style tool definition to UiPath API format.
|
394
|
+
|
395
|
+
This internal method transforms tool definitions from the standard OpenAI format
|
396
|
+
to the format expected by UiPath's normalized LLM Gateway API.
|
397
|
+
|
398
|
+
Args:
|
399
|
+
tool (ToolDefinition): The tool definition in OpenAI format containing
|
400
|
+
function name, description, and parameter schema.
|
401
|
+
|
402
|
+
Returns:
|
403
|
+
Dict[str, Any]: The tool definition converted to UiPath API format
|
404
|
+
with the appropriate structure and field mappings.
|
405
|
+
"""
|
406
|
+
parameters = {
|
407
|
+
"type": tool.function.parameters.type,
|
408
|
+
"properties": {
|
409
|
+
name: {
|
410
|
+
"type": prop.type,
|
411
|
+
**({"description": prop.description} if prop.description else {}),
|
412
|
+
**({"enum": prop.enum} if prop.enum else {}),
|
413
|
+
}
|
414
|
+
for name, prop in tool.function.parameters.properties.items()
|
415
|
+
},
|
416
|
+
}
|
417
|
+
|
418
|
+
if tool.function.parameters.required:
|
419
|
+
parameters["required"] = tool.function.parameters.required
|
420
|
+
|
421
|
+
return {
|
422
|
+
"name": tool.function.name,
|
423
|
+
"description": tool.function.description,
|
424
|
+
"parameters": parameters,
|
425
|
+
}
|
@@ -18,6 +18,8 @@ from ._services import (
|
|
18
18
|
JobsService,
|
19
19
|
ProcessesService,
|
20
20
|
QueuesService,
|
21
|
+
UiPathLlmChatService,
|
22
|
+
UiPathOpenAIService,
|
21
23
|
)
|
22
24
|
from ._utils import setup_logging
|
23
25
|
from ._utils.constants import (
|
@@ -122,3 +124,11 @@ class UiPath:
|
|
122
124
|
if not self._folders_service:
|
123
125
|
self._folders_service = FolderService(self._config, self._execution_context)
|
124
126
|
return self._folders_service
|
127
|
+
|
128
|
+
@property
|
129
|
+
def llm_openai(self) -> UiPathOpenAIService:
|
130
|
+
return UiPathOpenAIService(self._config, self._execution_context)
|
131
|
+
|
132
|
+
@property
|
133
|
+
def llm(self) -> UiPathLlmChatService:
|
134
|
+
return UiPathLlmChatService(self._config, self._execution_context)
|