uipath 2.1.76__tar.gz → 2.1.78__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.1.76 → uipath-2.1.78}/PKG-INFO +1 -1
- {uipath-2.1.76 → uipath-2.1.78}/docs/cli/index.md +13 -0
- {uipath-2.1.76 → uipath-2.1.78}/pyproject.toml +1 -1
- {uipath-2.1.76 → uipath-2.1.78}/samples/calculator/evals/eval-sets/default.json +5 -1
- {uipath-2.1.76 → uipath-2.1.78}/samples/calculator/main.py +4 -3
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_evals/_models/_evaluation_set.py +13 -33
- uipath-2.1.78/src/uipath/_cli/_evals/_models/_mocks.py +9 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_evals/mocks/llm_mocker.py +28 -9
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_evals/mocks/mocker.py +8 -2
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_evals/mocks/mockito_mocker.py +20 -2
- uipath-2.1.78/src/uipath/_cli/_evals/mocks/mocks.py +41 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_services/llm_gateway_service.py +6 -1
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/agent/models/agent.py +10 -3
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/eval/evaluators/trajectory_evaluator.py +6 -2
- uipath-2.1.78/src/uipath/eval/mocks/__init__.py +7 -0
- uipath-2.1.76/src/uipath/_cli/_evals/mocks/mocks.py → uipath-2.1.78/src/uipath/eval/mocks/mockable.py +28 -63
- uipath-2.1.76/src/uipath/_cli/_evals/_models/_trajectory_span.py → uipath-2.1.78/src/uipath/eval/models/models.py +112 -3
- {uipath-2.1.76 → uipath-2.1.78}/tests/cli/eval/mocks/test_mocks.py +20 -3
- {uipath-2.1.76 → uipath-2.1.78}/uv.lock +897 -897
- uipath-2.1.76/src/uipath/eval/models/models.py +0 -115
- {uipath-2.1.76 → uipath-2.1.78}/.cursorrules +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/.editorconfig +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/.gitattributes +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/.github/labeler.yml +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/.github/workflows/auto-label.yml +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/.github/workflows/cd.yml +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/.github/workflows/ci.yml +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/.github/workflows/commitlint.yml +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/.github/workflows/integration_tests.yml +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/.github/workflows/lint.yml +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/.github/workflows/publish-dev.yml +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/.github/workflows/publish-docs.yml +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/.github/workflows/slack.yml +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/.github/workflows/test-uipath-langchain.yml +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/.github/workflows/test-uipath-llamaindex.yml +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/.github/workflows/test.yml +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/.gitignore +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/.pre-commit-config.yaml +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/.python-version +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/.vscode/extensions.json +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/.vscode/launch.json +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/.vscode/settings.json +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/CONTRIBUTING.md +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/LICENSE +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/README.md +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/CONTRIBUTING.md +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/FAQ.md +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/assets/env-preparation-failed-dark.png +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/assets/env-preparation-failed-light.png +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/assets/favicon.png +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/assets/logo-dark.svg +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/assets/logo-light.svg +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/core/actions.md +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/core/assets/cloud_env_var_dark.gif +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/core/assets/cloud_env_var_light.gif +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/core/assets/cloud_env_var_secret_dark.png +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/core/assets/cloud_env_var_secret_light.png +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/core/assets/copy_path_dark.png +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/core/assets/copy_path_light.png +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/core/assets.md +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/core/attachments.md +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/core/buckets.md +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/core/connections.md +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/core/context_grounding.md +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/core/documents.md +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/core/documents_models.md +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/core/environment_variables.md +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/core/getting_started.md +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/core/jobs.md +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/core/llm_gateway.md +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/core/processes.md +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/core/queues.md +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/core/traced.md +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/hooks.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/index.md +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/javascripts/extra.js +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/overrides/main.html +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/overrides/partials/actions.html +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/overrides/partials/logo.html +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/release_policy.md +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/sample_images/google-ADK-agent/agent-output.png +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/docs/stylesheets/extra.css +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/justfile +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/mkdocs.yml +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/py.typed +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/samples/calculator/README.md +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/samples/calculator/evals/evaluators/equality.json +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/samples/calculator/evals/evaluators/llm-as-a-judge.json +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/samples/calculator/pyproject.toml +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/samples/event-trigger/.python-version +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/samples/event-trigger/README.md +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/samples/event-trigger/main.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/samples/event-trigger/pyproject.toml +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/samples/google-ADK-agent/.env.example +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/samples/google-ADK-agent/README.md +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/samples/google-ADK-agent/input.json +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/samples/google-ADK-agent/multi_tool_agent/__init__.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/samples/google-ADK-agent/multi_tool_agent/agent.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/samples/google-ADK-agent/pyproject.toml +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/samples/google-ADK-agent/uv.lock +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/scripts/debug_test.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/scripts/lint_httpx_client.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/__init__.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/README.md +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/__init__.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_auth/_auth_server.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_auth/_auth_service.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_auth/_client_credentials.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_auth/_models.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_auth/_oidc_utils.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_auth/_portal_service.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_auth/_url_utils.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_auth/_utils.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_auth/auth_config.json +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_auth/index.html +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_auth/localhost.crt +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_auth/localhost.key +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_dev/_terminal/__init__.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_dev/_terminal/_components/_chat.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_dev/_terminal/_components/_details.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_dev/_terminal/_components/_history.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_dev/_terminal/_components/_json_input.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_dev/_terminal/_components/_new.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_dev/_terminal/_models/_execution.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_dev/_terminal/_models/_messages.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_dev/_terminal/_styles/terminal.tcss +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_dev/_terminal/_utils/_chat.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_dev/_terminal/_utils/_exporter.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_dev/_terminal/_utils/_logger.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_evals/_console_progress_reporter.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_evals/_evaluator_factory.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_evals/_models/_evaluator.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_evals/_models/_evaluator_base_params.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_evals/_models/_exceptions.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_evals/_models/_output.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_evals/_models/_sw_reporting.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_evals/_progress_reporter.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_evals/_runtime.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_evals/mocks/__init__.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_evals/mocks/mocker_factory.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_push/sw_file_handler.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_runtime/_contracts.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_runtime/_escalation.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_runtime/_hitl.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_runtime/_logging.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_runtime/_runtime.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_runtime/_script_executor.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_templates/.psmdcp.template +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_templates/.rels.template +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_templates/[Content_Types].xml.template +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_templates/main.py.template +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_templates/package.nuspec.template +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_utils/_common.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_utils/_console.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_utils/_constants.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_utils/_debug.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_utils/_eval_set.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_utils/_folders.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_utils/_input_args.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_utils/_parse_ast.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_utils/_processes.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_utils/_project_files.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_utils/_studio_project.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_utils/_tracing.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/_utils/_uv_helpers.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/cli_auth.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/cli_deploy.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/cli_dev.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/cli_eval.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/cli_init.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/cli_invoke.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/cli_new.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/cli_pack.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/cli_publish.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/cli_pull.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/cli_push.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/cli_run.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/middlewares.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_cli/spinner.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_config.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_events/__init__.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_events/_event_bus.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_events/_events.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_execution_context.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_folder_context.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_resources/AGENTS.md +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_services/__init__.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_services/_base_service.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_services/actions_service.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_services/api_client.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_services/assets_service.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_services/attachments_service.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_services/buckets_service.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_services/connections_service.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_services/context_grounding_service.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_services/documents_service.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_services/entities_service.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_services/folder_service.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_services/jobs_service.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_services/processes_service.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_services/queues_service.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_uipath.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_utils/__init__.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_utils/_endpoint.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_utils/_infer_bindings.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_utils/_logs.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_utils/_read_overwrites.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_utils/_request_override.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_utils/_request_spec.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_utils/_ssl_context.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_utils/_url.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_utils/_user_agent.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/_utils/constants.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/agent/_utils.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/agent/conversation/__init__.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/agent/conversation/async_stream.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/agent/conversation/citation.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/agent/conversation/content.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/agent/conversation/conversation.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/agent/conversation/event.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/agent/conversation/exchange.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/agent/conversation/message.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/agent/conversation/meta.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/agent/conversation/tool.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/eval/_helpers/__init__.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/eval/_helpers/helpers.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/eval/evaluators/__init__.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/eval/evaluators/base_evaluator.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/eval/evaluators/deterministic_evaluator_base.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/eval/evaluators/exact_match_evaluator.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/eval/evaluators/json_similarity_evaluator.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/eval/evaluators/llm_as_judge_evaluator.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/eval/models/__init__.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/models/__init__.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/models/action_schema.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/models/actions.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/models/assets.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/models/attachment.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/models/buckets.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/models/connections.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/models/context_grounding.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/models/context_grounding_index.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/models/documents.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/models/entities.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/models/errors.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/models/exceptions.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/models/interrupt_models.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/models/job.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/models/llm_gateway.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/models/processes.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/models/queues.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/py.typed +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/telemetry/__init__.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/telemetry/_constants.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/telemetry/_track.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/tracing/__init__.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/tracing/_otel_exporters.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/tracing/_traced.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/tracing/_utils.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/utils/__init__.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/src/uipath/utils/_endpoints_manager.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/testcases/apicalls-testcase/main.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/testcases/apicalls-testcase/pyproject.toml +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/testcases/apicalls-testcase/run.sh +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/testcases/apicalls-testcase/src/assert.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/testcases/basic-testcase/main.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/testcases/basic-testcase/pyproject.toml +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/testcases/basic-testcase/run.sh +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/testcases/basic-testcase/src/assert.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/testcases/common/validate_output.sh +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/testcases/langchain-cross/agent.mermaid +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/testcases/langchain-cross/langgraph.json +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/testcases/langchain-cross/pyproject.toml +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/testcases/langchain-cross/run.sh +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/testcases/langchain-cross/src/assert.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/testcases/langchain-cross/src/main.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/testcases/llamaindex-cross/agent.mermaid +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/testcases/llamaindex-cross/llama_index.json +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/testcases/llamaindex-cross/pyproject.toml +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/testcases/llamaindex-cross/run.sh +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/testcases/llamaindex-cross/src/assert.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/testcases/llamaindex-cross/src/main.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/__init__.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/agent/models/test_agent.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/cli/conftest.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/cli/evaluators/test_json_similarity_evaluator.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/cli/mocks/bindings_script.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/cli/mocks/pyproject.toml +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/cli/mocks/simple_script.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/cli/mocks/uipath-mock.json +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/cli/mocks/uipath-simple-script-mock.json +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/cli/test_auth.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/cli/test_hitl.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/cli/test_init.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/cli/test_init_agents_md.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/cli/test_input_args.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/cli/test_invoke.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/cli/test_new.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/cli/test_pack.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/cli/test_portal_service_ensure_valid_token.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/cli/test_portal_service_refresh_token.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/cli/test_publish.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/cli/test_pull.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/cli/test_push.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/cli/test_run.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/cli/test_utils.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/cli/utils/common.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/cli/utils/project_details.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/cli/utils/uipath_json.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/conftest.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/sdk/services/conftest.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/sdk/services/test_actions_service.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/sdk/services/test_api_client.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/sdk/services/test_assets_service.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/sdk/services/test_attachments_service.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/sdk/services/test_base_service.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/sdk/services/test_buckets_service.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/sdk/services/test_connections_service.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/sdk/services/test_context_grounding_service.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/sdk/services/test_documents_service.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/sdk/services/test_entities_service.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/sdk/services/test_folder_service.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/sdk/services/test_jobs_service.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/sdk/services/test_llm_integration.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/sdk/services/test_llm_schema_cleanup.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/sdk/services/test_llm_service.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/sdk/services/test_processes_service.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/sdk/services/test_queues_service.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/sdk/services/test_uipath_llm_integration.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/sdk/services/tests_data/documents_service/create_validation_action_response.json +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/sdk/services/tests_data/documents_service/extraction_response.json +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/sdk/services/tests_data/documents_service/validated_result.json +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/sdk/test_bindings_inference.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/sdk/test_config.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/sdk/test_overwrites.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/tracing/test_otel_exporters.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/tracing/test_span_utils.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/tests/tracing/test_traced.py +0 -0
- {uipath-2.1.76 → uipath-2.1.78}/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.1.
|
3
|
+
Version: 2.1.78
|
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
|
@@ -6,6 +6,19 @@
|
|
6
6
|
:depth: 1
|
7
7
|
:style: table
|
8
8
|
|
9
|
+
/// info | UiPath Automation Suite
|
10
|
+
For UiPath Automation Suite deployments, you must set the `UIPATH_URL` environment variable to your dedicated instance URL before running this command.
|
11
|
+
|
12
|
+
Example:
|
13
|
+
```bash
|
14
|
+
UIPATH_URL=https://your-instance.com/account/tenant/orchestrator_/
|
15
|
+
```
|
16
|
+
|
17
|
+
You can set this environment variable either:
|
18
|
+
- In a `.env` file in your project directory
|
19
|
+
- As a system-wide environment variable
|
20
|
+
///
|
21
|
+
|
9
22
|
<!-- termynal -->
|
10
23
|
|
11
24
|
```shell
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "uipath"
|
3
|
-
version = "2.1.
|
3
|
+
version = "2.1.78"
|
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"
|
@@ -55,7 +55,11 @@
|
|
55
55
|
"mockingStrategy": {
|
56
56
|
"type": "llm",
|
57
57
|
"prompt": "The random operator is '+'.",
|
58
|
-
"toolsToSimulate": [{"name": "get_random_operator"}]
|
58
|
+
"toolsToSimulate": [{"name": "get_random_operator"}],
|
59
|
+
"model": {
|
60
|
+
"model": "gpt-4o-mini-2024-07-18",
|
61
|
+
"temperature": 0
|
62
|
+
}
|
59
63
|
},
|
60
64
|
"evalSetId": "default-eval-set-id",
|
61
65
|
"createdAt": "2025-09-04T18:54:58.378Z",
|
@@ -3,11 +3,10 @@ import random
|
|
3
3
|
from pydantic.dataclasses import dataclass
|
4
4
|
from enum import Enum
|
5
5
|
|
6
|
+
from uipath.eval.mocks import mockable, ExampleCall
|
6
7
|
from uipath.tracing import traced
|
7
8
|
import logging
|
8
9
|
|
9
|
-
from uipath._cli._evals.mocks.mocks import mockable
|
10
|
-
|
11
10
|
logger = logging.getLogger(__name__)
|
12
11
|
|
13
12
|
class Operator(Enum):
|
@@ -32,8 +31,10 @@ class Wrapper:
|
|
32
31
|
# Testing nested objects
|
33
32
|
result: Operator
|
34
33
|
|
34
|
+
GET_RANDOM_OPERATOR_EXAMPLES = [ExampleCall(id="example", input="{}", output="{\"result\": \"*\"}")]
|
35
|
+
|
35
36
|
@traced()
|
36
|
-
@mockable()
|
37
|
+
@mockable(example_calls=GET_RANDOM_OPERATOR_EXAMPLES)
|
37
38
|
def get_random_operator() -> Wrapper:
|
38
39
|
"""Get a random operator."""
|
39
40
|
return Wrapper(result=random.choice([Operator.ADD, Operator.SUBTRACT, Operator.MULTIPLY, Operator.DIVIDE]))
|
@@ -19,39 +19,31 @@ class BaseMockingStrategy(BaseModel):
|
|
19
19
|
pass
|
20
20
|
|
21
21
|
|
22
|
+
class ModelSettings(BaseModel):
|
23
|
+
"""Model Generation Parameters."""
|
24
|
+
|
25
|
+
model: str = Field(..., alias="model")
|
26
|
+
temperature: Optional[float] = Field(default=None, alias="temperature")
|
27
|
+
top_p: Optional[float] = Field(default=None, alias="topP")
|
28
|
+
top_k: Optional[int] = Field(default=None, alias="topK")
|
29
|
+
frequency_penalty: Optional[float] = Field(default=None, alias="frequencyPenalty")
|
30
|
+
presence_penalty: Optional[float] = Field(default=None, alias="presencePenalty")
|
31
|
+
max_tokens: Optional[int] = Field(default=None, alias="maxTokens")
|
32
|
+
|
33
|
+
|
22
34
|
class LLMMockingStrategy(BaseMockingStrategy):
|
23
35
|
type: Literal[MockingStrategyType.LLM] = MockingStrategyType.LLM
|
24
36
|
prompt: str = Field(..., alias="prompt")
|
25
37
|
tools_to_simulate: list[EvaluationSimulationTool] = Field(
|
26
38
|
..., alias="toolsToSimulate"
|
27
39
|
)
|
40
|
+
model: Optional[ModelSettings] = Field(None, alias="model")
|
28
41
|
|
29
42
|
model_config = ConfigDict(
|
30
43
|
validate_by_name=True, validate_by_alias=True, extra="allow"
|
31
44
|
)
|
32
45
|
|
33
46
|
|
34
|
-
"""
|
35
|
-
{
|
36
|
-
"function": "postprocess",
|
37
|
-
"arguments": {
|
38
|
-
"args": [],
|
39
|
-
"kwargs": {"x": 3}
|
40
|
-
},
|
41
|
-
"then": [
|
42
|
-
{
|
43
|
-
"return": 3
|
44
|
-
},
|
45
|
-
{
|
46
|
-
"raise": {
|
47
|
-
"__target__": "NotImplementedError"
|
48
|
-
}
|
49
|
-
}
|
50
|
-
]
|
51
|
-
}
|
52
|
-
"""
|
53
|
-
|
54
|
-
|
55
47
|
class MockingArgument(BaseModel):
|
56
48
|
args: List[Any] = Field(default_factory=lambda: [], alias="args")
|
57
49
|
kwargs: Dict[str, Any] = Field(default_factory=lambda: {}, alias="kwargs")
|
@@ -99,18 +91,6 @@ class UnknownMockingStrategy(BaseMockingStrategy):
|
|
99
91
|
MockingStrategy = Union[KnownMockingStrategy, UnknownMockingStrategy]
|
100
92
|
|
101
93
|
|
102
|
-
def migrate_mocking_strategy(data) -> MockingStrategy:
|
103
|
-
if data.get("simulate_tools") and "tools_to_simulate" in data:
|
104
|
-
return LLMMockingStrategy(
|
105
|
-
**{
|
106
|
-
"prompt": data["simulation_instructions"],
|
107
|
-
"toolsToSimulate": data["tools_to_simulate"],
|
108
|
-
}
|
109
|
-
)
|
110
|
-
else:
|
111
|
-
return UnknownMockingStrategy(type=MockingStrategyType.UNKNOWN)
|
112
|
-
|
113
|
-
|
114
94
|
class EvaluationItem(BaseModel):
|
115
95
|
"""Individual evaluation item within an evaluation set."""
|
116
96
|
|
@@ -6,11 +6,18 @@ from typing import Any, Callable
|
|
6
6
|
|
7
7
|
from pydantic import BaseModel
|
8
8
|
|
9
|
-
from
|
9
|
+
from .._models._evaluation_set import (
|
10
10
|
EvaluationItem,
|
11
11
|
LLMMockingStrategy,
|
12
12
|
)
|
13
|
-
from
|
13
|
+
from .._models._mocks import ExampleCall
|
14
|
+
from .mocker import (
|
15
|
+
Mocker,
|
16
|
+
R,
|
17
|
+
T,
|
18
|
+
UiPathMockResponseGenerationError,
|
19
|
+
UiPathNoMockFoundError,
|
20
|
+
)
|
14
21
|
|
15
22
|
PROMPT = """You are simulating a tool call for automated testing purposes of an Agent.
|
16
23
|
Your task is to provide a realistic response for the tool based on its schema, examples, and context.
|
@@ -102,8 +109,15 @@ class LLMMocker(Mocker):
|
|
102
109
|
},
|
103
110
|
}
|
104
111
|
try:
|
112
|
+
# Safely pull examples from params.
|
113
|
+
example_calls = params.get("example_calls", [])
|
114
|
+
if not isinstance(example_calls, list):
|
115
|
+
example_calls = []
|
116
|
+
example_calls = [
|
117
|
+
call for call in example_calls if isinstance(call, ExampleCall)
|
118
|
+
]
|
105
119
|
prompt_input: dict[str, Any] = {
|
106
|
-
"toolRunExamples":
|
120
|
+
"toolRunExamples": example_calls,
|
107
121
|
"testRunHistory": [], # This should contain ordered spans.
|
108
122
|
"toolInfo": {
|
109
123
|
"name": function_name,
|
@@ -132,6 +146,12 @@ class LLMMocker(Mocker):
|
|
132
146
|
k: json.dumps(pydantic_to_dict_safe(v))
|
133
147
|
for k, v in prompt_input.items()
|
134
148
|
}
|
149
|
+
model_parameters = self.evaluation_item.mocking_strategy.model
|
150
|
+
completion_kwargs = (
|
151
|
+
model_parameters.model_dump(by_alias=False, exclude_none=True)
|
152
|
+
if model_parameters
|
153
|
+
else {}
|
154
|
+
)
|
135
155
|
response = await llm.chat_completions(
|
136
156
|
[
|
137
157
|
{
|
@@ -140,14 +160,13 @@ class LLMMocker(Mocker):
|
|
140
160
|
},
|
141
161
|
],
|
142
162
|
response_format=response_format,
|
163
|
+
**completion_kwargs,
|
143
164
|
)
|
144
165
|
mocked_response = OutputSchema(
|
145
166
|
**json.loads(response.choices[0].message.content)
|
146
167
|
)
|
147
|
-
return mocked_response.response
|
148
|
-
except Exception:
|
149
|
-
raise
|
168
|
+
return mocked_response.model_dump(mode="json")["response"]
|
169
|
+
except Exception as e:
|
170
|
+
raise UiPathMockResponseGenerationError() from e
|
150
171
|
else:
|
151
|
-
raise
|
152
|
-
f"Method '{function_name}' is not simulated."
|
153
|
-
)
|
172
|
+
raise UiPathNoMockFoundError(f"Method '{function_name}' is not simulated.")
|
@@ -23,7 +23,13 @@ class Mocker(ABC):
|
|
23
23
|
raise NotImplementedError()
|
24
24
|
|
25
25
|
|
26
|
-
class
|
27
|
-
"""Exception when a mocker is unable to find a match with the invocation."""
|
26
|
+
class UiPathNoMockFoundError(Exception):
|
27
|
+
"""Exception when a mocker is unable to find a match with the invocation. This is a signal to invoke the real function."""
|
28
|
+
|
29
|
+
pass
|
30
|
+
|
31
|
+
|
32
|
+
class UiPathMockResponseGenerationError(Exception):
|
33
|
+
"""Exception when a mocker is configured unable to generate a response."""
|
28
34
|
|
29
35
|
pass
|
@@ -13,7 +13,13 @@ from uipath._cli._evals._models._evaluation_set import (
|
|
13
13
|
MockingAnswerType,
|
14
14
|
MockitoMockingStrategy,
|
15
15
|
)
|
16
|
-
from uipath._cli._evals.mocks.mocker import
|
16
|
+
from uipath._cli._evals.mocks.mocker import (
|
17
|
+
Mocker,
|
18
|
+
R,
|
19
|
+
T,
|
20
|
+
UiPathMockResponseGenerationError,
|
21
|
+
UiPathNoMockFoundError,
|
22
|
+
)
|
17
23
|
|
18
24
|
|
19
25
|
class Stub:
|
@@ -59,4 +65,16 @@ class MockitoMocker(Mocker):
|
|
59
65
|
self, func: Callable[[T], R], params: dict[str, Any], *args: T, **kwargs
|
60
66
|
) -> R:
|
61
67
|
"""Respond with mocked response."""
|
62
|
-
|
68
|
+
if not isinstance(
|
69
|
+
self.evaluation_item.mocking_strategy, MockitoMockingStrategy
|
70
|
+
):
|
71
|
+
raise UiPathMockResponseGenerationError("Mocking strategy misconfigured.")
|
72
|
+
if not any(
|
73
|
+
behavior.function == params["name"]
|
74
|
+
for behavior in self.evaluation_item.mocking_strategy.behaviors
|
75
|
+
):
|
76
|
+
raise UiPathNoMockFoundError()
|
77
|
+
try:
|
78
|
+
return getattr(self.stub, params["name"])(*args, **kwargs)
|
79
|
+
except Exception as e:
|
80
|
+
raise UiPathMockResponseGenerationError() from e
|
@@ -0,0 +1,41 @@
|
|
1
|
+
"""Mocking interface."""
|
2
|
+
|
3
|
+
import logging
|
4
|
+
from contextvars import ContextVar
|
5
|
+
from typing import Any, Callable, Optional
|
6
|
+
|
7
|
+
from uipath._cli._evals._models._evaluation_set import EvaluationItem
|
8
|
+
from uipath._cli._evals.mocks.mocker import Mocker, UiPathNoMockFoundError
|
9
|
+
from uipath._cli._evals.mocks.mocker_factory import MockerFactory
|
10
|
+
|
11
|
+
evaluation_context: ContextVar[Optional[EvaluationItem]] = ContextVar(
|
12
|
+
"evaluation", default=None
|
13
|
+
)
|
14
|
+
|
15
|
+
mocker_context: ContextVar[Optional[Mocker]] = ContextVar("mocker", default=None)
|
16
|
+
|
17
|
+
logger = logging.getLogger(__name__)
|
18
|
+
|
19
|
+
|
20
|
+
def set_evaluation_item(item: EvaluationItem) -> None:
|
21
|
+
"""Set an evaluation item within an evaluation set."""
|
22
|
+
evaluation_context.set(item)
|
23
|
+
try:
|
24
|
+
if item.mocking_strategy:
|
25
|
+
mocker_context.set(MockerFactory.create(item))
|
26
|
+
else:
|
27
|
+
mocker_context.set(None)
|
28
|
+
except Exception:
|
29
|
+
logger.warning(f"Failed to create mocker for evaluation {item.name}")
|
30
|
+
mocker_context.set(None)
|
31
|
+
|
32
|
+
|
33
|
+
async def get_mocked_response(
|
34
|
+
func: Callable[[Any], Any], params: dict[str, Any], *args, **kwargs
|
35
|
+
) -> Any:
|
36
|
+
"""Get a mocked response."""
|
37
|
+
mocker = mocker_context.get()
|
38
|
+
if mocker is None:
|
39
|
+
raise UiPathNoMockFoundError()
|
40
|
+
else:
|
41
|
+
return await mocker.response(func, params, *args, **kwargs)
|
@@ -351,7 +351,8 @@ class UiPathLlmChatService(BaseService):
|
|
351
351
|
n: int = 1,
|
352
352
|
frequency_penalty: float = 0,
|
353
353
|
presence_penalty: float = 0,
|
354
|
-
top_p: float = 1,
|
354
|
+
top_p: Optional[float] = 1,
|
355
|
+
top_k: Optional[int] = None,
|
355
356
|
tools: Optional[List[ToolDefinition]] = None,
|
356
357
|
tool_choice: Optional[ToolChoice] = None,
|
357
358
|
response_format: Optional[Union[Dict[str, Any], type[BaseModel]]] = None,
|
@@ -385,6 +386,8 @@ class UiPathLlmChatService(BaseService):
|
|
385
386
|
Positive values encourage discussion of new topics. Defaults to 0.
|
386
387
|
top_p (float, optional): Nucleus sampling parameter between 0 and 1.
|
387
388
|
Controls diversity by considering only the top p probability mass. Defaults to 1.
|
389
|
+
top_k (int, optional): Nucleus sampling parameter.
|
390
|
+
Controls diversity by considering only the top k most probable tokens. Defaults to None.
|
388
391
|
tools (Optional[List[ToolDefinition]], optional): List of tool definitions that the
|
389
392
|
model can call. Tools enable the model to perform actions or retrieve information
|
390
393
|
beyond text generation. Defaults to None.
|
@@ -486,6 +489,8 @@ class UiPathLlmChatService(BaseService):
|
|
486
489
|
"presence_penalty": presence_penalty,
|
487
490
|
"top_p": top_p,
|
488
491
|
}
|
492
|
+
if top_k is not None:
|
493
|
+
request_body["top_k"] = top_k
|
489
494
|
|
490
495
|
# Handle response_format - convert BaseModel to schema if needed
|
491
496
|
if response_format:
|
@@ -7,6 +7,7 @@ from pydantic import BaseModel, ConfigDict, Discriminator, Field, Tag
|
|
7
7
|
|
8
8
|
from uipath._cli._evals._models._evaluation_set import EvaluationSet
|
9
9
|
from uipath._cli._evals._models._evaluator import Evaluator
|
10
|
+
from uipath._cli._evals._models._mocks import ExampleCall
|
10
11
|
from uipath.models import Connection
|
11
12
|
|
12
13
|
|
@@ -70,7 +71,13 @@ class AgentToolSettings(BaseModel):
|
|
70
71
|
)
|
71
72
|
|
72
73
|
|
73
|
-
class
|
74
|
+
class BaseResourceProperties(BaseModel):
|
75
|
+
"""Base resource properties."""
|
76
|
+
|
77
|
+
example_calls: Optional[List[ExampleCall]] = Field(None, alias="exampleCalls")
|
78
|
+
|
79
|
+
|
80
|
+
class AgentProcessToolProperties(BaseResourceProperties):
|
74
81
|
"""Properties specific to tool configuration."""
|
75
82
|
|
76
83
|
folder_path: Optional[str] = Field(None, alias="folderPath")
|
@@ -125,7 +132,7 @@ class AgentIntegrationToolParameter(BaseModel):
|
|
125
132
|
)
|
126
133
|
|
127
134
|
|
128
|
-
class AgentIntegrationToolProperties(
|
135
|
+
class AgentIntegrationToolProperties(BaseResourceProperties):
|
129
136
|
"""Properties specific to tool configuration."""
|
130
137
|
|
131
138
|
tool_path: str = Field(..., alias="toolPath")
|
@@ -198,7 +205,7 @@ class AgentEscalationRecipient(BaseModel):
|
|
198
205
|
)
|
199
206
|
|
200
207
|
|
201
|
-
class AgentEscalationChannelProperties(
|
208
|
+
class AgentEscalationChannelProperties(BaseResourceProperties):
|
202
209
|
"""Agent escalation channel properties."""
|
203
210
|
|
204
211
|
app_name: str = Field(..., alias="appName")
|
@@ -6,12 +6,16 @@ from typing import Any, Optional
|
|
6
6
|
from opentelemetry.sdk.trace import ReadableSpan
|
7
7
|
from pydantic import field_validator
|
8
8
|
|
9
|
-
from uipath._cli._evals._models._trajectory_span import TrajectoryEvaluationTrace
|
10
9
|
from uipath.eval.models import EvaluationResult
|
11
10
|
|
12
11
|
from ..._services import UiPathLlmChatService
|
13
12
|
from ..._utils.constants import COMMUNITY_agents_SUFFIX
|
14
|
-
from ..models.models import
|
13
|
+
from ..models.models import (
|
14
|
+
AgentExecution,
|
15
|
+
LLMResponse,
|
16
|
+
NumericEvaluationResult,
|
17
|
+
TrajectoryEvaluationTrace,
|
18
|
+
)
|
15
19
|
from .base_evaluator import BaseEvaluator
|
16
20
|
|
17
21
|
|
@@ -1,49 +1,18 @@
|
|
1
|
-
"""
|
1
|
+
"""Mockable interface."""
|
2
2
|
|
3
3
|
import asyncio
|
4
4
|
import functools
|
5
5
|
import inspect
|
6
6
|
import logging
|
7
7
|
import threading
|
8
|
-
from
|
9
|
-
from typing import Any, Callable, Optional
|
8
|
+
from typing import Any, List, Optional
|
10
9
|
|
11
10
|
from pydantic import TypeAdapter
|
12
11
|
from pydantic_function_models import ValidatedFunction # type: ignore[import-untyped]
|
13
12
|
|
14
|
-
from uipath._cli._evals._models.
|
15
|
-
from uipath._cli._evals.mocks.mocker import
|
16
|
-
from uipath._cli._evals.mocks.
|
17
|
-
|
18
|
-
evaluation_context: ContextVar[Optional[EvaluationItem]] = ContextVar(
|
19
|
-
"evaluation", default=None
|
20
|
-
)
|
21
|
-
|
22
|
-
mocker_context: ContextVar[Optional[Mocker]] = ContextVar("mocker", default=None)
|
23
|
-
|
24
|
-
|
25
|
-
def set_evaluation_item(item: EvaluationItem) -> None:
|
26
|
-
"""Set an evaluation item within an evaluation set."""
|
27
|
-
evaluation_context.set(item)
|
28
|
-
try:
|
29
|
-
mocker_context.set(MockerFactory.create(item))
|
30
|
-
except Exception:
|
31
|
-
logger.warning(f"Failed to create mocker for evaluation {item.name}")
|
32
|
-
mocker_context.set(None)
|
33
|
-
|
34
|
-
|
35
|
-
async def get_mocked_response(
|
36
|
-
func: Callable[[Any], Any], params: dict[str, Any], *args, **kwargs
|
37
|
-
) -> Any:
|
38
|
-
"""Get a mocked response."""
|
39
|
-
mocker = mocker_context.get()
|
40
|
-
evaluation_item = evaluation_context.get()
|
41
|
-
if mocker is None or evaluation_item is None:
|
42
|
-
# TODO raise a new UiPath exception type
|
43
|
-
raise RuntimeError(f"Evaluation item {func.__name__} has not been evaluated")
|
44
|
-
else:
|
45
|
-
return await mocker.response(func, params, *args, **kwargs)
|
46
|
-
|
13
|
+
from uipath._cli._evals._models._mocks import ExampleCall
|
14
|
+
from uipath._cli._evals.mocks.mocker import UiPathNoMockFoundError
|
15
|
+
from uipath._cli._evals.mocks.mocks import get_mocked_response
|
47
16
|
|
48
17
|
_event_loop = None
|
49
18
|
logger = logging.getLogger(__name__)
|
@@ -77,10 +46,7 @@ def mocked_response_decorator(func, params: dict[str, Any]):
|
|
77
46
|
async def decorated_func(*args, **kwargs):
|
78
47
|
try:
|
79
48
|
return await mock_response_generator(*args, **kwargs)
|
80
|
-
except
|
81
|
-
logger.warning(
|
82
|
-
f"Failed to mock response for {func.__name__}. Falling back to func."
|
83
|
-
)
|
49
|
+
except UiPathNoMockFoundError:
|
84
50
|
return await func(*args, **kwargs)
|
85
51
|
else:
|
86
52
|
|
@@ -88,18 +54,35 @@ def mocked_response_decorator(func, params: dict[str, Any]):
|
|
88
54
|
def decorated_func(*args, **kwargs):
|
89
55
|
try:
|
90
56
|
return run_coroutine(mock_response_generator(*args, **kwargs))
|
91
|
-
except
|
92
|
-
logger.warning(
|
93
|
-
f"Failed to mock response for {func.__name__}. Falling back to func."
|
94
|
-
)
|
57
|
+
except UiPathNoMockFoundError:
|
95
58
|
return func(*args, **kwargs)
|
96
59
|
|
97
60
|
return decorated_func
|
98
61
|
|
99
62
|
|
63
|
+
def get_output_schema(func):
|
64
|
+
"""Retrieves the JSON schema for a function's return type hint."""
|
65
|
+
try:
|
66
|
+
adapter = TypeAdapter(inspect.signature(func).return_annotation)
|
67
|
+
return adapter.json_schema()
|
68
|
+
except Exception:
|
69
|
+
logger.warning(f"Unable to extract output schema for function {func.__name__}")
|
70
|
+
return {}
|
71
|
+
|
72
|
+
|
73
|
+
def get_input_schema(func):
|
74
|
+
"""Retrieves the JSON schema for a function's input type."""
|
75
|
+
try:
|
76
|
+
return ValidatedFunction(func).model.model_json_schema()
|
77
|
+
except Exception:
|
78
|
+
logger.warning(f"Unable to extract input schema for function {func.__name__}")
|
79
|
+
return {}
|
80
|
+
|
81
|
+
|
100
82
|
def mockable(
|
101
83
|
name: Optional[str] = None,
|
102
84
|
description: Optional[str] = None,
|
85
|
+
example_calls: Optional[List[ExampleCall]] = None,
|
103
86
|
**kwargs,
|
104
87
|
):
|
105
88
|
"""Decorate a function to be a mockable."""
|
@@ -110,27 +93,9 @@ def mockable(
|
|
110
93
|
"description": description or func.__doc__,
|
111
94
|
"input_schema": get_input_schema(func),
|
112
95
|
"output_schema": get_output_schema(func),
|
96
|
+
"example_calls": example_calls,
|
113
97
|
**kwargs,
|
114
98
|
}
|
115
99
|
return mocked_response_decorator(func, params)
|
116
100
|
|
117
101
|
return decorator
|
118
|
-
|
119
|
-
|
120
|
-
def get_output_schema(func):
|
121
|
-
"""Retrieves the JSON schema for a function's return type hint."""
|
122
|
-
try:
|
123
|
-
adapter = TypeAdapter(inspect.signature(func).return_annotation)
|
124
|
-
return adapter.json_schema()
|
125
|
-
except Exception:
|
126
|
-
logger.warning(f"Unable to extract output schema for function {func.__name__}")
|
127
|
-
return {}
|
128
|
-
|
129
|
-
|
130
|
-
def get_input_schema(func):
|
131
|
-
"""Retrieves the JSON schema for a function's input type."""
|
132
|
-
try:
|
133
|
-
return ValidatedFunction(func).model.model_json_schema()
|
134
|
-
except Exception:
|
135
|
-
logger.warning(f"Unable to extract input schema for function {func.__name__}")
|
136
|
-
return {}
|
@@ -1,10 +1,119 @@
|
|
1
|
-
"""
|
1
|
+
"""Models for evaluation framework including execution data and evaluation results."""
|
2
2
|
|
3
3
|
from dataclasses import dataclass
|
4
|
-
from
|
4
|
+
from enum import IntEnum
|
5
|
+
from typing import Annotated, Any, Dict, List, Literal, Optional, Union
|
5
6
|
|
6
7
|
from opentelemetry.sdk.trace import ReadableSpan
|
7
|
-
from pydantic import BaseModel
|
8
|
+
from pydantic import BaseModel, ConfigDict, Field
|
9
|
+
|
10
|
+
|
11
|
+
class AgentExecution(BaseModel):
|
12
|
+
"""Represents the execution data of an agent for evaluation purposes."""
|
13
|
+
|
14
|
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
15
|
+
|
16
|
+
agent_input: Optional[Dict[str, Any]]
|
17
|
+
agent_output: Dict[str, Any]
|
18
|
+
agent_trace: list[ReadableSpan]
|
19
|
+
expected_agent_behavior: Optional[str] = None
|
20
|
+
|
21
|
+
|
22
|
+
class LLMResponse(BaseModel):
|
23
|
+
"""Response from an LLM evaluator."""
|
24
|
+
|
25
|
+
score: float
|
26
|
+
justification: str
|
27
|
+
|
28
|
+
|
29
|
+
class ScoreType(IntEnum):
|
30
|
+
"""Types of evaluation scores."""
|
31
|
+
|
32
|
+
BOOLEAN = 0
|
33
|
+
NUMERICAL = 1
|
34
|
+
ERROR = 2
|
35
|
+
|
36
|
+
|
37
|
+
class BaseEvaluationResult(BaseModel):
|
38
|
+
"""Base class for evaluation results."""
|
39
|
+
|
40
|
+
details: Optional[str] = None
|
41
|
+
# this is marked as optional, as it is populated inside the 'measure_execution_time' decorator
|
42
|
+
evaluation_time: Optional[float] = None
|
43
|
+
|
44
|
+
|
45
|
+
class BooleanEvaluationResult(BaseEvaluationResult):
|
46
|
+
"""Result of a boolean evaluation."""
|
47
|
+
|
48
|
+
score: bool
|
49
|
+
score_type: Literal[ScoreType.BOOLEAN] = ScoreType.BOOLEAN
|
50
|
+
|
51
|
+
|
52
|
+
class NumericEvaluationResult(BaseEvaluationResult):
|
53
|
+
"""Result of a numerical evaluation."""
|
54
|
+
|
55
|
+
score: float
|
56
|
+
score_type: Literal[ScoreType.NUMERICAL] = ScoreType.NUMERICAL
|
57
|
+
|
58
|
+
|
59
|
+
class ErrorEvaluationResult(BaseEvaluationResult):
|
60
|
+
"""Result of an error evaluation."""
|
61
|
+
|
62
|
+
score: float = 0.0
|
63
|
+
score_type: Literal[ScoreType.ERROR] = ScoreType.ERROR
|
64
|
+
|
65
|
+
|
66
|
+
EvaluationResult = Annotated[
|
67
|
+
Union[BooleanEvaluationResult, NumericEvaluationResult, ErrorEvaluationResult],
|
68
|
+
Field(discriminator="score_type"),
|
69
|
+
]
|
70
|
+
|
71
|
+
|
72
|
+
class EvalItemResult(BaseModel):
|
73
|
+
"""Result of a single evaluation item."""
|
74
|
+
|
75
|
+
evaluator_id: str
|
76
|
+
result: EvaluationResult
|
77
|
+
|
78
|
+
|
79
|
+
class EvaluatorCategory(IntEnum):
|
80
|
+
"""Types of evaluators."""
|
81
|
+
|
82
|
+
Deterministic = 0
|
83
|
+
LlmAsAJudge = 1
|
84
|
+
AgentScorer = 2
|
85
|
+
Trajectory = 3
|
86
|
+
|
87
|
+
@classmethod
|
88
|
+
def from_int(cls, value):
|
89
|
+
"""Construct EvaluatorCategory from an int value."""
|
90
|
+
if value in cls._value2member_map_:
|
91
|
+
return cls(value)
|
92
|
+
else:
|
93
|
+
raise ValueError(f"{value} is not a valid EvaluatorCategory value")
|
94
|
+
|
95
|
+
|
96
|
+
class EvaluatorType(IntEnum):
|
97
|
+
"""Subtypes of evaluators."""
|
98
|
+
|
99
|
+
Unknown = 0
|
100
|
+
Equals = 1
|
101
|
+
Contains = 2
|
102
|
+
Regex = 3
|
103
|
+
Factuality = 4
|
104
|
+
Custom = 5
|
105
|
+
JsonSimilarity = 6
|
106
|
+
Trajectory = 7
|
107
|
+
ContextPrecision = 8
|
108
|
+
Faithfulness = 9
|
109
|
+
|
110
|
+
@classmethod
|
111
|
+
def from_int(cls, value):
|
112
|
+
"""Construct EvaluatorCategory from an int value."""
|
113
|
+
if value in cls._value2member_map_:
|
114
|
+
return cls(value)
|
115
|
+
else:
|
116
|
+
raise ValueError(f"{value} is not a valid EvaluatorType value")
|
8
117
|
|
9
118
|
|
10
119
|
@dataclass
|