uipath 2.1.72__tar.gz → 2.1.74__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.
Files changed (335) hide show
  1. {uipath-2.1.72 → uipath-2.1.74}/PKG-INFO +4 -1
  2. {uipath-2.1.72 → uipath-2.1.74}/pyproject.toml +4 -1
  3. uipath-2.1.74/samples/calculator/evals/eval-sets/default.json +67 -0
  4. {uipath-2.1.72 → uipath-2.1.74}/samples/calculator/evals/evaluators/equality.json +0 -2
  5. {uipath-2.1.72 → uipath-2.1.74}/samples/calculator/main.py +25 -5
  6. uipath-2.1.74/src/uipath/_cli/_evals/_models/_evaluation_set.py +167 -0
  7. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_evals/_runtime.py +2 -0
  8. uipath-2.1.74/src/uipath/_cli/_evals/mocks/__init__.py +1 -0
  9. uipath-2.1.74/src/uipath/_cli/_evals/mocks/llm_mocker.py +153 -0
  10. uipath-2.1.74/src/uipath/_cli/_evals/mocks/mocker.py +29 -0
  11. uipath-2.1.74/src/uipath/_cli/_evals/mocks/mocker_factory.py +25 -0
  12. uipath-2.1.74/src/uipath/_cli/_evals/mocks/mockito_mocker.py +62 -0
  13. uipath-2.1.74/src/uipath/_cli/_evals/mocks/mocks.py +136 -0
  14. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_runtime/_logging.py +54 -26
  15. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_services/llm_gateway_service.py +24 -27
  16. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/agent/_utils.py +24 -3
  17. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/agent/models/agent.py +1 -0
  18. uipath-2.1.74/tests/cli/eval/mocks/test_mocks.py +272 -0
  19. {uipath-2.1.72 → uipath-2.1.74}/uv.lock +61 -1
  20. uipath-2.1.72/samples/calculator/evals/eval-sets/default.json +0 -29
  21. uipath-2.1.72/src/uipath/_cli/_evals/_models/_evaluation_set.py +0 -68
  22. {uipath-2.1.72 → uipath-2.1.74}/.cursorrules +0 -0
  23. {uipath-2.1.72 → uipath-2.1.74}/.editorconfig +0 -0
  24. {uipath-2.1.72 → uipath-2.1.74}/.gitattributes +0 -0
  25. {uipath-2.1.72 → uipath-2.1.74}/.github/labeler.yml +0 -0
  26. {uipath-2.1.72 → uipath-2.1.74}/.github/workflows/auto-label.yml +0 -0
  27. {uipath-2.1.72 → uipath-2.1.74}/.github/workflows/cd.yml +0 -0
  28. {uipath-2.1.72 → uipath-2.1.74}/.github/workflows/ci.yml +0 -0
  29. {uipath-2.1.72 → uipath-2.1.74}/.github/workflows/commitlint.yml +0 -0
  30. {uipath-2.1.72 → uipath-2.1.74}/.github/workflows/integration_tests.yml +0 -0
  31. {uipath-2.1.72 → uipath-2.1.74}/.github/workflows/lint.yml +0 -0
  32. {uipath-2.1.72 → uipath-2.1.74}/.github/workflows/publish-dev.yml +0 -0
  33. {uipath-2.1.72 → uipath-2.1.74}/.github/workflows/publish-docs.yml +0 -0
  34. {uipath-2.1.72 → uipath-2.1.74}/.github/workflows/slack.yml +0 -0
  35. {uipath-2.1.72 → uipath-2.1.74}/.github/workflows/test-uipath-langchain.yml +0 -0
  36. {uipath-2.1.72 → uipath-2.1.74}/.github/workflows/test-uipath-llamaindex.yml +0 -0
  37. {uipath-2.1.72 → uipath-2.1.74}/.github/workflows/test.yml +0 -0
  38. {uipath-2.1.72 → uipath-2.1.74}/.gitignore +0 -0
  39. {uipath-2.1.72 → uipath-2.1.74}/.pre-commit-config.yaml +0 -0
  40. {uipath-2.1.72 → uipath-2.1.74}/.python-version +0 -0
  41. {uipath-2.1.72 → uipath-2.1.74}/.vscode/extensions.json +0 -0
  42. {uipath-2.1.72 → uipath-2.1.74}/.vscode/launch.json +0 -0
  43. {uipath-2.1.72 → uipath-2.1.74}/.vscode/settings.json +0 -0
  44. {uipath-2.1.72 → uipath-2.1.74}/CONTRIBUTING.md +0 -0
  45. {uipath-2.1.72 → uipath-2.1.74}/LICENSE +0 -0
  46. {uipath-2.1.72 → uipath-2.1.74}/README.md +0 -0
  47. {uipath-2.1.72 → uipath-2.1.74}/docs/CONTRIBUTING.md +0 -0
  48. {uipath-2.1.72 → uipath-2.1.74}/docs/FAQ.md +0 -0
  49. {uipath-2.1.72 → uipath-2.1.74}/docs/assets/env-preparation-failed-dark.png +0 -0
  50. {uipath-2.1.72 → uipath-2.1.74}/docs/assets/env-preparation-failed-light.png +0 -0
  51. {uipath-2.1.72 → uipath-2.1.74}/docs/assets/favicon.png +0 -0
  52. {uipath-2.1.72 → uipath-2.1.74}/docs/assets/logo-dark.svg +0 -0
  53. {uipath-2.1.72 → uipath-2.1.74}/docs/assets/logo-light.svg +0 -0
  54. {uipath-2.1.72 → uipath-2.1.74}/docs/cli/index.md +0 -0
  55. {uipath-2.1.72 → uipath-2.1.74}/docs/core/actions.md +0 -0
  56. {uipath-2.1.72 → uipath-2.1.74}/docs/core/assets/cloud_env_var_dark.gif +0 -0
  57. {uipath-2.1.72 → uipath-2.1.74}/docs/core/assets/cloud_env_var_light.gif +0 -0
  58. {uipath-2.1.72 → uipath-2.1.74}/docs/core/assets/cloud_env_var_secret_dark.png +0 -0
  59. {uipath-2.1.72 → uipath-2.1.74}/docs/core/assets/cloud_env_var_secret_light.png +0 -0
  60. {uipath-2.1.72 → uipath-2.1.74}/docs/core/assets/copy_path_dark.png +0 -0
  61. {uipath-2.1.72 → uipath-2.1.74}/docs/core/assets/copy_path_light.png +0 -0
  62. {uipath-2.1.72 → uipath-2.1.74}/docs/core/assets.md +0 -0
  63. {uipath-2.1.72 → uipath-2.1.74}/docs/core/attachments.md +0 -0
  64. {uipath-2.1.72 → uipath-2.1.74}/docs/core/buckets.md +0 -0
  65. {uipath-2.1.72 → uipath-2.1.74}/docs/core/connections.md +0 -0
  66. {uipath-2.1.72 → uipath-2.1.74}/docs/core/context_grounding.md +0 -0
  67. {uipath-2.1.72 → uipath-2.1.74}/docs/core/documents.md +0 -0
  68. {uipath-2.1.72 → uipath-2.1.74}/docs/core/documents_models.md +0 -0
  69. {uipath-2.1.72 → uipath-2.1.74}/docs/core/environment_variables.md +0 -0
  70. {uipath-2.1.72 → uipath-2.1.74}/docs/core/getting_started.md +0 -0
  71. {uipath-2.1.72 → uipath-2.1.74}/docs/core/jobs.md +0 -0
  72. {uipath-2.1.72 → uipath-2.1.74}/docs/core/llm_gateway.md +0 -0
  73. {uipath-2.1.72 → uipath-2.1.74}/docs/core/processes.md +0 -0
  74. {uipath-2.1.72 → uipath-2.1.74}/docs/core/queues.md +0 -0
  75. {uipath-2.1.72 → uipath-2.1.74}/docs/core/traced.md +0 -0
  76. {uipath-2.1.72 → uipath-2.1.74}/docs/hooks.py +0 -0
  77. {uipath-2.1.72 → uipath-2.1.74}/docs/index.md +0 -0
  78. {uipath-2.1.72 → uipath-2.1.74}/docs/javascripts/extra.js +0 -0
  79. {uipath-2.1.72 → uipath-2.1.74}/docs/overrides/main.html +0 -0
  80. {uipath-2.1.72 → uipath-2.1.74}/docs/overrides/partials/actions.html +0 -0
  81. {uipath-2.1.72 → uipath-2.1.74}/docs/overrides/partials/logo.html +0 -0
  82. {uipath-2.1.72 → uipath-2.1.74}/docs/release_policy.md +0 -0
  83. {uipath-2.1.72 → uipath-2.1.74}/docs/sample_images/google-ADK-agent/agent-output.png +0 -0
  84. {uipath-2.1.72 → uipath-2.1.74}/docs/stylesheets/extra.css +0 -0
  85. {uipath-2.1.72 → uipath-2.1.74}/justfile +0 -0
  86. {uipath-2.1.72 → uipath-2.1.74}/mkdocs.yml +0 -0
  87. {uipath-2.1.72 → uipath-2.1.74}/py.typed +0 -0
  88. {uipath-2.1.72 → uipath-2.1.74}/samples/calculator/README.md +0 -0
  89. {uipath-2.1.72 → uipath-2.1.74}/samples/calculator/pyproject.toml +0 -0
  90. {uipath-2.1.72 → uipath-2.1.74}/samples/event-trigger/.python-version +0 -0
  91. {uipath-2.1.72 → uipath-2.1.74}/samples/event-trigger/README.md +0 -0
  92. {uipath-2.1.72 → uipath-2.1.74}/samples/event-trigger/main.py +0 -0
  93. {uipath-2.1.72 → uipath-2.1.74}/samples/event-trigger/pyproject.toml +0 -0
  94. {uipath-2.1.72 → uipath-2.1.74}/samples/google-ADK-agent/.env.example +0 -0
  95. {uipath-2.1.72 → uipath-2.1.74}/samples/google-ADK-agent/README.md +0 -0
  96. {uipath-2.1.72 → uipath-2.1.74}/samples/google-ADK-agent/input.json +0 -0
  97. {uipath-2.1.72 → uipath-2.1.74}/samples/google-ADK-agent/multi_tool_agent/__init__.py +0 -0
  98. {uipath-2.1.72 → uipath-2.1.74}/samples/google-ADK-agent/multi_tool_agent/agent.py +0 -0
  99. {uipath-2.1.72 → uipath-2.1.74}/samples/google-ADK-agent/pyproject.toml +0 -0
  100. {uipath-2.1.72 → uipath-2.1.74}/samples/google-ADK-agent/uv.lock +0 -0
  101. {uipath-2.1.72 → uipath-2.1.74}/scripts/debug_test.py +0 -0
  102. {uipath-2.1.72 → uipath-2.1.74}/scripts/lint_httpx_client.py +0 -0
  103. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/__init__.py +0 -0
  104. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/README.md +0 -0
  105. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/__init__.py +0 -0
  106. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_auth/_auth_server.py +0 -0
  107. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_auth/_auth_service.py +0 -0
  108. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_auth/_client_credentials.py +0 -0
  109. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_auth/_models.py +0 -0
  110. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_auth/_oidc_utils.py +0 -0
  111. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_auth/_portal_service.py +0 -0
  112. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_auth/_url_utils.py +0 -0
  113. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_auth/_utils.py +0 -0
  114. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_auth/auth_config.json +0 -0
  115. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_auth/index.html +0 -0
  116. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_auth/localhost.crt +0 -0
  117. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_auth/localhost.key +0 -0
  118. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_dev/_terminal/__init__.py +0 -0
  119. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_dev/_terminal/_components/_chat.py +0 -0
  120. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_dev/_terminal/_components/_details.py +0 -0
  121. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_dev/_terminal/_components/_history.py +0 -0
  122. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_dev/_terminal/_components/_json_input.py +0 -0
  123. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_dev/_terminal/_components/_new.py +0 -0
  124. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_dev/_terminal/_models/_execution.py +0 -0
  125. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_dev/_terminal/_models/_messages.py +0 -0
  126. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_dev/_terminal/_styles/terminal.tcss +0 -0
  127. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_dev/_terminal/_utils/_chat.py +0 -0
  128. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_dev/_terminal/_utils/_exporter.py +0 -0
  129. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_dev/_terminal/_utils/_logger.py +0 -0
  130. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_evals/_evaluator_factory.py +0 -0
  131. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_evals/_models/_evaluator.py +0 -0
  132. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_evals/_models/_evaluator_base_params.py +0 -0
  133. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_evals/_models/_output.py +0 -0
  134. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_evals/_models/_sw_reporting.py +0 -0
  135. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_evals/_models/_trajectory_span.py +0 -0
  136. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_evals/_progress_reporter.py +0 -0
  137. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_push/sw_file_handler.py +0 -0
  138. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_runtime/_contracts.py +0 -0
  139. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_runtime/_escalation.py +0 -0
  140. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_runtime/_hitl.py +0 -0
  141. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_runtime/_runtime.py +0 -0
  142. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_runtime/_script_executor.py +0 -0
  143. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_templates/.psmdcp.template +0 -0
  144. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_templates/.rels.template +0 -0
  145. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_templates/[Content_Types].xml.template +0 -0
  146. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_templates/main.py.template +0 -0
  147. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_templates/package.nuspec.template +0 -0
  148. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_utils/_common.py +0 -0
  149. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_utils/_console.py +0 -0
  150. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_utils/_constants.py +0 -0
  151. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_utils/_debug.py +0 -0
  152. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_utils/_eval_set.py +0 -0
  153. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_utils/_folders.py +0 -0
  154. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_utils/_input_args.py +0 -0
  155. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_utils/_parse_ast.py +0 -0
  156. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_utils/_processes.py +0 -0
  157. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_utils/_project_files.py +0 -0
  158. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_utils/_studio_project.py +0 -0
  159. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_utils/_tracing.py +0 -0
  160. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/_utils/_uv_helpers.py +0 -0
  161. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/cli_auth.py +0 -0
  162. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/cli_deploy.py +0 -0
  163. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/cli_dev.py +0 -0
  164. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/cli_eval.py +0 -0
  165. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/cli_init.py +0 -0
  166. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/cli_invoke.py +0 -0
  167. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/cli_new.py +0 -0
  168. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/cli_pack.py +0 -0
  169. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/cli_publish.py +0 -0
  170. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/cli_pull.py +0 -0
  171. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/cli_push.py +0 -0
  172. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/cli_run.py +0 -0
  173. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/middlewares.py +0 -0
  174. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_cli/spinner.py +0 -0
  175. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_config.py +0 -0
  176. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_events/__init__.py +0 -0
  177. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_events/_event_bus.py +0 -0
  178. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_events/_events.py +0 -0
  179. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_execution_context.py +0 -0
  180. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_folder_context.py +0 -0
  181. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_resources/AGENTS.md +0 -0
  182. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_services/__init__.py +0 -0
  183. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_services/_base_service.py +0 -0
  184. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_services/actions_service.py +0 -0
  185. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_services/api_client.py +0 -0
  186. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_services/assets_service.py +0 -0
  187. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_services/attachments_service.py +0 -0
  188. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_services/buckets_service.py +0 -0
  189. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_services/connections_service.py +0 -0
  190. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_services/context_grounding_service.py +0 -0
  191. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_services/documents_service.py +0 -0
  192. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_services/entities_service.py +0 -0
  193. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_services/folder_service.py +0 -0
  194. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_services/jobs_service.py +0 -0
  195. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_services/processes_service.py +0 -0
  196. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_services/queues_service.py +0 -0
  197. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_uipath.py +0 -0
  198. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_utils/__init__.py +0 -0
  199. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_utils/_endpoint.py +0 -0
  200. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_utils/_infer_bindings.py +0 -0
  201. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_utils/_logs.py +0 -0
  202. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_utils/_read_overwrites.py +0 -0
  203. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_utils/_request_override.py +0 -0
  204. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_utils/_request_spec.py +0 -0
  205. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_utils/_ssl_context.py +0 -0
  206. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_utils/_url.py +0 -0
  207. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_utils/_user_agent.py +0 -0
  208. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/_utils/constants.py +0 -0
  209. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/agent/conversation/__init__.py +0 -0
  210. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/agent/conversation/async_stream.py +0 -0
  211. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/agent/conversation/citation.py +0 -0
  212. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/agent/conversation/content.py +0 -0
  213. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/agent/conversation/conversation.py +0 -0
  214. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/agent/conversation/event.py +0 -0
  215. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/agent/conversation/exchange.py +0 -0
  216. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/agent/conversation/message.py +0 -0
  217. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/agent/conversation/meta.py +0 -0
  218. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/agent/conversation/tool.py +0 -0
  219. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/eval/_helpers/__init__.py +0 -0
  220. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/eval/_helpers/helpers.py +0 -0
  221. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/eval/evaluators/__init__.py +0 -0
  222. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/eval/evaluators/base_evaluator.py +0 -0
  223. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/eval/evaluators/deterministic_evaluator_base.py +0 -0
  224. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/eval/evaluators/exact_match_evaluator.py +0 -0
  225. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/eval/evaluators/json_similarity_evaluator.py +0 -0
  226. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/eval/evaluators/llm_as_judge_evaluator.py +0 -0
  227. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/eval/evaluators/trajectory_evaluator.py +0 -0
  228. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/eval/models/__init__.py +0 -0
  229. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/eval/models/models.py +0 -0
  230. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/models/__init__.py +0 -0
  231. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/models/action_schema.py +0 -0
  232. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/models/actions.py +0 -0
  233. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/models/assets.py +0 -0
  234. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/models/attachment.py +0 -0
  235. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/models/buckets.py +0 -0
  236. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/models/connections.py +0 -0
  237. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/models/context_grounding.py +0 -0
  238. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/models/context_grounding_index.py +0 -0
  239. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/models/documents.py +0 -0
  240. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/models/entities.py +0 -0
  241. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/models/errors.py +0 -0
  242. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/models/exceptions.py +0 -0
  243. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/models/interrupt_models.py +0 -0
  244. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/models/job.py +0 -0
  245. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/models/llm_gateway.py +0 -0
  246. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/models/processes.py +0 -0
  247. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/models/queues.py +0 -0
  248. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/py.typed +0 -0
  249. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/telemetry/__init__.py +0 -0
  250. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/telemetry/_constants.py +0 -0
  251. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/telemetry/_track.py +0 -0
  252. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/tracing/__init__.py +0 -0
  253. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/tracing/_otel_exporters.py +0 -0
  254. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/tracing/_traced.py +0 -0
  255. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/tracing/_utils.py +0 -0
  256. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/utils/__init__.py +0 -0
  257. {uipath-2.1.72 → uipath-2.1.74}/src/uipath/utils/_endpoints_manager.py +0 -0
  258. {uipath-2.1.72 → uipath-2.1.74}/testcases/apicalls-testcase/main.py +0 -0
  259. {uipath-2.1.72 → uipath-2.1.74}/testcases/apicalls-testcase/pyproject.toml +0 -0
  260. {uipath-2.1.72 → uipath-2.1.74}/testcases/apicalls-testcase/run.sh +0 -0
  261. {uipath-2.1.72 → uipath-2.1.74}/testcases/apicalls-testcase/src/assert.py +0 -0
  262. {uipath-2.1.72 → uipath-2.1.74}/testcases/basic-testcase/main.py +0 -0
  263. {uipath-2.1.72 → uipath-2.1.74}/testcases/basic-testcase/pyproject.toml +0 -0
  264. {uipath-2.1.72 → uipath-2.1.74}/testcases/basic-testcase/run.sh +0 -0
  265. {uipath-2.1.72 → uipath-2.1.74}/testcases/basic-testcase/src/assert.py +0 -0
  266. {uipath-2.1.72 → uipath-2.1.74}/testcases/common/validate_output.sh +0 -0
  267. {uipath-2.1.72 → uipath-2.1.74}/testcases/langchain-cross/agent.mermaid +0 -0
  268. {uipath-2.1.72 → uipath-2.1.74}/testcases/langchain-cross/langgraph.json +0 -0
  269. {uipath-2.1.72 → uipath-2.1.74}/testcases/langchain-cross/pyproject.toml +0 -0
  270. {uipath-2.1.72 → uipath-2.1.74}/testcases/langchain-cross/run.sh +0 -0
  271. {uipath-2.1.72 → uipath-2.1.74}/testcases/langchain-cross/src/assert.py +0 -0
  272. {uipath-2.1.72 → uipath-2.1.74}/testcases/langchain-cross/src/main.py +0 -0
  273. {uipath-2.1.72 → uipath-2.1.74}/testcases/llamaindex-cross/agent.mermaid +0 -0
  274. {uipath-2.1.72 → uipath-2.1.74}/testcases/llamaindex-cross/llama_index.json +0 -0
  275. {uipath-2.1.72 → uipath-2.1.74}/testcases/llamaindex-cross/pyproject.toml +0 -0
  276. {uipath-2.1.72 → uipath-2.1.74}/testcases/llamaindex-cross/run.sh +0 -0
  277. {uipath-2.1.72 → uipath-2.1.74}/testcases/llamaindex-cross/src/assert.py +0 -0
  278. {uipath-2.1.72 → uipath-2.1.74}/testcases/llamaindex-cross/src/main.py +0 -0
  279. {uipath-2.1.72 → uipath-2.1.74}/tests/__init__.py +0 -0
  280. {uipath-2.1.72 → uipath-2.1.74}/tests/agent/models/test_agent.py +0 -0
  281. {uipath-2.1.72 → uipath-2.1.74}/tests/cli/conftest.py +0 -0
  282. {uipath-2.1.72 → uipath-2.1.74}/tests/cli/evaluators/test_json_similarity_evaluator.py +0 -0
  283. {uipath-2.1.72 → uipath-2.1.74}/tests/cli/mocks/bindings_script.py +0 -0
  284. {uipath-2.1.72 → uipath-2.1.74}/tests/cli/mocks/pyproject.toml +0 -0
  285. {uipath-2.1.72 → uipath-2.1.74}/tests/cli/mocks/simple_script.py +0 -0
  286. {uipath-2.1.72 → uipath-2.1.74}/tests/cli/mocks/uipath-mock.json +0 -0
  287. {uipath-2.1.72 → uipath-2.1.74}/tests/cli/mocks/uipath-simple-script-mock.json +0 -0
  288. {uipath-2.1.72 → uipath-2.1.74}/tests/cli/test_auth.py +0 -0
  289. {uipath-2.1.72 → uipath-2.1.74}/tests/cli/test_hitl.py +0 -0
  290. {uipath-2.1.72 → uipath-2.1.74}/tests/cli/test_init.py +0 -0
  291. {uipath-2.1.72 → uipath-2.1.74}/tests/cli/test_init_agents_md.py +0 -0
  292. {uipath-2.1.72 → uipath-2.1.74}/tests/cli/test_input_args.py +0 -0
  293. {uipath-2.1.72 → uipath-2.1.74}/tests/cli/test_invoke.py +0 -0
  294. {uipath-2.1.72 → uipath-2.1.74}/tests/cli/test_new.py +0 -0
  295. {uipath-2.1.72 → uipath-2.1.74}/tests/cli/test_pack.py +0 -0
  296. {uipath-2.1.72 → uipath-2.1.74}/tests/cli/test_portal_service_ensure_valid_token.py +0 -0
  297. {uipath-2.1.72 → uipath-2.1.74}/tests/cli/test_portal_service_refresh_token.py +0 -0
  298. {uipath-2.1.72 → uipath-2.1.74}/tests/cli/test_publish.py +0 -0
  299. {uipath-2.1.72 → uipath-2.1.74}/tests/cli/test_pull.py +0 -0
  300. {uipath-2.1.72 → uipath-2.1.74}/tests/cli/test_push.py +0 -0
  301. {uipath-2.1.72 → uipath-2.1.74}/tests/cli/test_run.py +0 -0
  302. {uipath-2.1.72 → uipath-2.1.74}/tests/cli/test_utils.py +0 -0
  303. {uipath-2.1.72 → uipath-2.1.74}/tests/cli/utils/common.py +0 -0
  304. {uipath-2.1.72 → uipath-2.1.74}/tests/cli/utils/project_details.py +0 -0
  305. {uipath-2.1.72 → uipath-2.1.74}/tests/cli/utils/uipath_json.py +0 -0
  306. {uipath-2.1.72 → uipath-2.1.74}/tests/conftest.py +0 -0
  307. {uipath-2.1.72 → uipath-2.1.74}/tests/sdk/services/conftest.py +0 -0
  308. {uipath-2.1.72 → uipath-2.1.74}/tests/sdk/services/test_actions_service.py +0 -0
  309. {uipath-2.1.72 → uipath-2.1.74}/tests/sdk/services/test_api_client.py +0 -0
  310. {uipath-2.1.72 → uipath-2.1.74}/tests/sdk/services/test_assets_service.py +0 -0
  311. {uipath-2.1.72 → uipath-2.1.74}/tests/sdk/services/test_attachments_service.py +0 -0
  312. {uipath-2.1.72 → uipath-2.1.74}/tests/sdk/services/test_base_service.py +0 -0
  313. {uipath-2.1.72 → uipath-2.1.74}/tests/sdk/services/test_buckets_service.py +0 -0
  314. {uipath-2.1.72 → uipath-2.1.74}/tests/sdk/services/test_connections_service.py +0 -0
  315. {uipath-2.1.72 → uipath-2.1.74}/tests/sdk/services/test_context_grounding_service.py +0 -0
  316. {uipath-2.1.72 → uipath-2.1.74}/tests/sdk/services/test_documents_service.py +0 -0
  317. {uipath-2.1.72 → uipath-2.1.74}/tests/sdk/services/test_entities_service.py +0 -0
  318. {uipath-2.1.72 → uipath-2.1.74}/tests/sdk/services/test_folder_service.py +0 -0
  319. {uipath-2.1.72 → uipath-2.1.74}/tests/sdk/services/test_jobs_service.py +0 -0
  320. {uipath-2.1.72 → uipath-2.1.74}/tests/sdk/services/test_llm_integration.py +0 -0
  321. {uipath-2.1.72 → uipath-2.1.74}/tests/sdk/services/test_llm_schema_cleanup.py +0 -0
  322. {uipath-2.1.72 → uipath-2.1.74}/tests/sdk/services/test_llm_service.py +0 -0
  323. {uipath-2.1.72 → uipath-2.1.74}/tests/sdk/services/test_processes_service.py +0 -0
  324. {uipath-2.1.72 → uipath-2.1.74}/tests/sdk/services/test_queues_service.py +0 -0
  325. {uipath-2.1.72 → uipath-2.1.74}/tests/sdk/services/test_uipath_llm_integration.py +0 -0
  326. {uipath-2.1.72 → uipath-2.1.74}/tests/sdk/services/tests_data/documents_service/create_validation_action_response.json +0 -0
  327. {uipath-2.1.72 → uipath-2.1.74}/tests/sdk/services/tests_data/documents_service/extraction_response.json +0 -0
  328. {uipath-2.1.72 → uipath-2.1.74}/tests/sdk/services/tests_data/documents_service/validated_result.json +0 -0
  329. {uipath-2.1.72 → uipath-2.1.74}/tests/sdk/test_bindings_inference.py +0 -0
  330. {uipath-2.1.72 → uipath-2.1.74}/tests/sdk/test_config.py +0 -0
  331. {uipath-2.1.72 → uipath-2.1.74}/tests/sdk/test_overwrites.py +0 -0
  332. {uipath-2.1.72 → uipath-2.1.74}/tests/tracing/test_otel_exporters.py +0 -0
  333. {uipath-2.1.72 → uipath-2.1.74}/tests/tracing/test_span_utils.py +0 -0
  334. {uipath-2.1.72 → uipath-2.1.74}/tests/tracing/test_traced.py +0 -0
  335. {uipath-2.1.72 → uipath-2.1.74}/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.72
3
+ Version: 2.1.74
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
@@ -17,9 +17,12 @@ Requires-Python: >=3.10
17
17
  Requires-Dist: azure-monitor-opentelemetry>=1.6.8
18
18
  Requires-Dist: click>=8.1.8
19
19
  Requires-Dist: httpx>=0.28.1
20
+ Requires-Dist: hydra-core>=1.3.2
21
+ Requires-Dist: mockito>=1.5.4
20
22
  Requires-Dist: opentelemetry-instrumentation>=0.52b1
21
23
  Requires-Dist: opentelemetry-sdk>=1.31.1
22
24
  Requires-Dist: pathlib>=1.0.1
25
+ Requires-Dist: pydantic-function-models>=0.1.10
23
26
  Requires-Dist: pydantic>=2.11.1
24
27
  Requires-Dist: pyperclip>=1.9.0
25
28
  Requires-Dist: python-dotenv>=1.0.1
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "uipath"
3
- version = "2.1.72"
3
+ version = "2.1.74"
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"
@@ -19,6 +19,9 @@ dependencies = [
19
19
  "truststore>=0.10.1",
20
20
  "textual>=5.3.0",
21
21
  "pyperclip>=1.9.0",
22
+ "mockito>=1.5.4",
23
+ "hydra-core>=1.3.2",
24
+ "pydantic-function-models>=0.1.10",
22
25
  ]
23
26
  classifiers = [
24
27
  "Development Status :: 3 - Alpha",
@@ -0,0 +1,67 @@
1
+ {
2
+ "fileName": "default.json",
3
+ "id": "default-eval-set-id",
4
+ "name": "Basic Calculator Evaluation Set",
5
+ "batchSize": 10,
6
+ "evaluatorRefs": [
7
+ "equality"
8
+ ],
9
+ "evaluations": [
10
+ {
11
+ "id": "test-addition",
12
+ "name": "Test Addition",
13
+ "inputs": {"a": 1, "b": 1, "operator": "+"},
14
+ "expectedOutput": {"result": 2},
15
+ "expectedAgentBehavior": "",
16
+ "evalSetId": "default-eval-set-id",
17
+ "createdAt": "2025-09-04T18:54:58.378Z",
18
+ "updatedAt": "2025-09-04T18:55:55.416Z"
19
+ },
20
+ {
21
+ "id": "test-random-addition-using-mockito",
22
+ "name": "Test Random Addition Using Mockito",
23
+ "inputs": {"a": 1, "b": 1, "operator": "random"},
24
+ "expectedOutput": {"result": 2},
25
+ "expectedAgentBehavior": "",
26
+ "mockingStrategy": {
27
+ "type": "mockito",
28
+ "behaviors": [
29
+ {
30
+ "function": "get_random_operator",
31
+ "arguments": {
32
+ "args": [],
33
+ "kwargs": {}
34
+ },
35
+ "then": [
36
+ {
37
+ "type": "return",
38
+ "value": {"result": "+"}
39
+ }
40
+ ]
41
+ }
42
+ ]
43
+ },
44
+ "evalSetId": "default-eval-set-id",
45
+ "createdAt": "2025-09-04T18:54:58.378Z",
46
+ "updatedAt": "2025-09-04T18:55:55.416Z"
47
+ },
48
+ {
49
+ "id": "test-random-addition-using-llm",
50
+ "name": "Test Random Addition Using LLM",
51
+ "inputs": {"a": 1, "b": 1, "operator": "random"},
52
+ "expectedOutput": {"result": 2},
53
+ "expectedAgentBehavior": "",
54
+ "mockingStrategy": {
55
+ "type": "llm",
56
+ "prompt": "The random operator is '+'.",
57
+ "toolsToSimulate": [{"name": "get_random_operator"}]
58
+ },
59
+ "evalSetId": "default-eval-set-id",
60
+ "createdAt": "2025-09-04T18:54:58.378Z",
61
+ "updatedAt": "2025-09-04T18:55:55.416Z"
62
+ }
63
+ ],
64
+ "modelSettings": [],
65
+ "createdAt": "2025-09-04T18:54:58.379Z",
66
+ "updatedAt": "2025-09-04T18:55:55.416Z"
67
+ }
@@ -5,8 +5,6 @@
5
5
  "description": "An evaluator that judges the agent based on expected output.",
6
6
  "category": 0,
7
7
  "type": 1,
8
- "prompt": "",
9
- "model": "same-as-agent",
10
8
  "targetOutputKey": "*",
11
9
  "createdAt": "2025-06-26T17:45:39.651Z",
12
10
  "updatedAt": "2025-06-26T17:45:39.651Z"
@@ -1,9 +1,13 @@
1
+ import random
2
+
1
3
  from pydantic.dataclasses import dataclass
2
4
  from enum import Enum
3
5
 
4
6
  from uipath.tracing import traced
5
7
  import logging
6
8
 
9
+ from uipath._cli._evals.mocks.mocks import mockable
10
+
7
11
  logger = logging.getLogger(__name__)
8
12
 
9
13
  class Operator(Enum):
@@ -11,6 +15,7 @@ class Operator(Enum):
11
15
  SUBTRACT = "-"
12
16
  MULTIPLY = "*"
13
17
  DIVIDE = "/"
18
+ RANDOM = "random"
14
19
 
15
20
  @dataclass
16
21
  class CalculatorInput:
@@ -22,13 +27,28 @@ class CalculatorInput:
22
27
  class CalculatorOutput:
23
28
  result: float
24
29
 
25
- # use InputTriggerEventArgs when called by UiPath EventTriggers
30
+ @dataclass
31
+ class Wrapper:
32
+ # Testing nested objects
33
+ result: Operator
34
+
35
+ @traced()
36
+ @mockable()
37
+ def get_random_operator() -> Wrapper:
38
+ """Get a random operator."""
39
+ return Wrapper(result=random.choice([Operator.ADD, Operator.SUBTRACT, Operator.MULTIPLY, Operator.DIVIDE]))
40
+
41
+
26
42
  @traced()
27
- def main(input: CalculatorInput) -> CalculatorOutput:
28
- result = 0.0
29
- match input.operator:
43
+ async def main(input: CalculatorInput) -> CalculatorOutput:
44
+ if input.operator == Operator.RANDOM:
45
+ operator = get_random_operator().result
46
+ else:
47
+ operator = input.operator
48
+ match operator:
30
49
  case Operator.ADD: result = input.a + input.b
31
50
  case Operator.SUBTRACT: result = input.a - input.b
32
51
  case Operator.MULTIPLY: result = input.a * input.b
33
- case Operator.DIVIDE: result = input.a / input.b if input.b != 0 else 0
52
+ case Operator.DIVIDE: result = input.a / input.b if input.b != 0.0 else 0.0
53
+ case _: raise ValueError("Unknown operator")
34
54
  return CalculatorOutput(result=result)
@@ -0,0 +1,167 @@
1
+ from enum import Enum, IntEnum
2
+ from typing import Annotated, Any, Dict, List, Literal, Optional, Union
3
+
4
+ from pydantic import BaseModel, ConfigDict, Field
5
+ from pydantic.alias_generators import to_camel
6
+
7
+
8
+ class EvaluationSimulationTool(BaseModel):
9
+ name: str = Field(..., alias="name")
10
+
11
+
12
+ class MockingStrategyType(str, Enum):
13
+ LLM = "llm"
14
+ MOCKITO = "mockito"
15
+ UNKNOWN = "unknown"
16
+
17
+
18
+ class BaseMockingStrategy(BaseModel):
19
+ pass
20
+
21
+
22
+ class LLMMockingStrategy(BaseMockingStrategy):
23
+ type: Literal[MockingStrategyType.LLM] = MockingStrategyType.LLM
24
+ prompt: str = Field(..., alias="prompt")
25
+ tools_to_simulate: list[EvaluationSimulationTool] = Field(
26
+ ..., alias="toolsToSimulate"
27
+ )
28
+
29
+ model_config = ConfigDict(
30
+ validate_by_name=True, validate_by_alias=True, extra="allow"
31
+ )
32
+
33
+
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
+ class MockingArgument(BaseModel):
56
+ args: List[Any] = Field(default_factory=lambda: [], alias="args")
57
+ kwargs: Dict[str, Any] = Field(default_factory=lambda: {}, alias="kwargs")
58
+
59
+
60
+ class MockingAnswerType(str, Enum):
61
+ RETURN = "return"
62
+ RAISE = "raise"
63
+
64
+
65
+ class MockingAnswer(BaseModel):
66
+ type: MockingAnswerType
67
+ value: Any = Field(..., alias="value")
68
+
69
+
70
+ class MockingBehavior(BaseModel):
71
+ function: str = Field(..., alias="function")
72
+ arguments: MockingArgument = Field(..., alias="arguments")
73
+ then: List[MockingAnswer] = Field(..., alias="then")
74
+
75
+
76
+ class MockitoMockingStrategy(BaseMockingStrategy):
77
+ type: Literal[MockingStrategyType.MOCKITO] = MockingStrategyType.MOCKITO
78
+ behaviors: List[MockingBehavior] = Field(..., alias="config")
79
+
80
+ model_config = ConfigDict(
81
+ validate_by_name=True, validate_by_alias=True, extra="allow"
82
+ )
83
+
84
+
85
+ KnownMockingStrategy = Annotated[
86
+ Union[LLMMockingStrategy, MockitoMockingStrategy],
87
+ Field(discriminator="type"),
88
+ ]
89
+
90
+
91
+ class UnknownMockingStrategy(BaseMockingStrategy):
92
+ type: str = Field(..., alias="type")
93
+
94
+ model_config = ConfigDict(
95
+ validate_by_name=True, validate_by_alias=True, extra="allow"
96
+ )
97
+
98
+
99
+ MockingStrategy = Union[KnownMockingStrategy, UnknownMockingStrategy]
100
+
101
+
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
+ class EvaluationItem(BaseModel):
115
+ """Individual evaluation item within an evaluation set."""
116
+
117
+ model_config = ConfigDict(
118
+ alias_generator=to_camel, populate_by_name=True, extra="allow"
119
+ )
120
+
121
+ id: str
122
+ name: str
123
+ inputs: Dict[str, Any]
124
+ expected_output: Dict[str, Any]
125
+ expected_agent_behavior: str = Field(default="", alias="expectedAgentBehavior")
126
+ eval_set_id: str = Field(alias="evalSetId")
127
+ created_at: str = Field(alias="createdAt")
128
+ updated_at: str = Field(alias="updatedAt")
129
+ mocking_strategy: Optional[MockingStrategy] = Field(
130
+ default=None,
131
+ alias="mockingStrategy",
132
+ )
133
+
134
+
135
+ class EvaluationSet(BaseModel):
136
+ """Complete evaluation set model."""
137
+
138
+ model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
139
+
140
+ id: str
141
+ file_name: str = Field(..., alias="fileName")
142
+ evaluator_refs: List[str] = Field(default_factory=list)
143
+ evaluations: List[EvaluationItem] = Field(default_factory=list)
144
+ name: str
145
+ batch_size: int = Field(10, alias="batchSize")
146
+ timeout_minutes: int = Field(default=20, alias="timeoutMinutes")
147
+ model_settings: List[Dict[str, Any]] = Field(
148
+ default_factory=list, alias="modelSettings"
149
+ )
150
+ created_at: str = Field(alias="createdAt")
151
+ updated_at: str = Field(alias="updatedAt")
152
+
153
+ def extract_selected_evals(self, eval_ids) -> None:
154
+ selected_evals: list[EvaluationItem] = []
155
+ for evaluation in self.evaluations:
156
+ if evaluation.id in eval_ids:
157
+ selected_evals.append(evaluation)
158
+ eval_ids.remove(evaluation.id)
159
+ if len(eval_ids) > 0:
160
+ raise ValueError("Unknown evaluation ids: {}".format(eval_ids))
161
+ self.evaluations = selected_evals
162
+
163
+
164
+ class EvaluationStatus(IntEnum):
165
+ PENDING = 0
166
+ IN_PROGRESS = 1
167
+ COMPLETED = 2
@@ -35,6 +35,7 @@ from ._models._output import (
35
35
  UiPathEvalOutput,
36
36
  UiPathEvalRunExecutionOutput,
37
37
  )
38
+ from .mocks.mocks import set_evaluation_item
38
39
 
39
40
  T = TypeVar("T", bound=UiPathBaseRuntime)
40
41
  C = TypeVar("C", bound=UiPathRuntimeContext)
@@ -137,6 +138,7 @@ class UiPathEvalRuntime(UiPathBaseRuntime, Generic[T, C]):
137
138
  evaluation_set_name=evaluation_set.name, score=0, evaluation_set_results=[]
138
139
  )
139
140
  for eval_item in evaluation_set.evaluations:
141
+ set_evaluation_item(eval_item)
140
142
  await event_bus.publish(
141
143
  EvaluationEvents.CREATE_EVAL_RUN,
142
144
  EvalRunCreatedEvent(
@@ -0,0 +1 @@
1
+ """UiPath mocking framework."""
@@ -0,0 +1,153 @@
1
+ """LLM mocker implementation."""
2
+
3
+ import json
4
+ import logging
5
+ from typing import Any, Callable
6
+
7
+ from pydantic import BaseModel
8
+
9
+ from uipath._cli._evals._models._evaluation_set import (
10
+ EvaluationItem,
11
+ LLMMockingStrategy,
12
+ )
13
+ from uipath._cli._evals.mocks.mocker import Mocker, R, T, UiPathMockingNoMatcherError
14
+
15
+ PROMPT = """You are simulating a tool call for automated testing purposes of an Agent.
16
+ Your task is to provide a realistic response for the tool based on its schema, examples, and context.
17
+
18
+ SELECTED TOOL INFORMATION:
19
+ {toolInfo}
20
+
21
+ SELECTED TOOL SCHEMA:
22
+ {toolSchema}
23
+
24
+ SELECTED TOOL EXAMPLES:
25
+ {toolRunExamples}
26
+
27
+ CHOSEN TOOL INPUT:
28
+ {currentToolInput}
29
+
30
+ CURRENT AGENT RUN SO FAR:
31
+ {testRunHistory}
32
+
33
+ HERE IS SOME INFORMATION ABOUT THE AGENT: DO NOT USE THIS INFORMATION TO MAKE THE RESPONSE, BUT RATHER TO UNDERSTAND THE CONTEXT IN WHICH THE TOOL IS BEING USED.
34
+ {agentInfo}
35
+
36
+ TEST RUN PROCTOR INSTRUCTIONS:
37
+ You will need to simulate a real user's interaction with the tool. This may require following some run specific instructions. If run instructions are provided, follow them exactly.
38
+ Here are the instructions for this run:
39
+ {testRunProctorInstructions}
40
+
41
+ Based on the above information, provide a realistic response for this tool call. Your response should:
42
+ 1. Match the expected output format according to the tool schema
43
+ 2. Be very consistent with how the tool has responded in previous examples. Do no omit fields or properties.
44
+ 3. Always include the entire output regardless of token length.
45
+ 3. Consider the context of the current test run and the agent being tested. If the agent is acting on a property, make sure the output includes that property.
46
+
47
+ Respond ONLY with valid JSON that would be a realistic and completetool response. Do not include any explanations or markdown.
48
+ """
49
+
50
+ logger = logging.getLogger(__name__)
51
+
52
+
53
+ def pydantic_to_dict_safe(obj: Any) -> Any:
54
+ """Serialize nested pydantic models to a dict."""
55
+ if isinstance(obj, BaseModel):
56
+ # Convert Pydantic model to dict recursively
57
+ return obj.model_dump(mode="json")
58
+ elif isinstance(obj, dict):
59
+ # Recursively convert dict entries
60
+ return {k: pydantic_to_dict_safe(v) for k, v in obj.items()}
61
+ elif isinstance(obj, list):
62
+ # Recursively convert items in lists
63
+ return [pydantic_to_dict_safe(item) for item in obj]
64
+ return obj # Return other types as is
65
+
66
+
67
+ class LLMMocker(Mocker):
68
+ """LLM Based Mocker."""
69
+
70
+ def __init__(self, evaluation_item: EvaluationItem):
71
+ """LLM Mocker constructor."""
72
+ self.evaluation_item = evaluation_item
73
+ assert isinstance(self.evaluation_item.mocking_strategy, LLMMockingStrategy)
74
+
75
+ async def response(
76
+ self, func: Callable[[T], R], params: dict[str, Any], *args: T, **kwargs
77
+ ) -> R:
78
+ """Respond with mocked response generated by an LLM."""
79
+ assert isinstance(self.evaluation_item.mocking_strategy, LLMMockingStrategy)
80
+
81
+ function_name = params.get("name") or func.__name__
82
+ if function_name in [
83
+ x.name for x in self.evaluation_item.mocking_strategy.tools_to_simulate
84
+ ]:
85
+ from uipath import UiPath
86
+ from uipath._services.llm_gateway_service import _cleanup_schema
87
+
88
+ llm = UiPath().llm
89
+ return_type: Any = func.__annotations__.get("return", None)
90
+ if return_type is None:
91
+ return_type = Any
92
+
93
+ class OutputSchema(BaseModel):
94
+ response: return_type
95
+
96
+ response_format = {
97
+ "type": "json_schema",
98
+ "json_schema": {
99
+ "name": OutputSchema.__name__.lower(),
100
+ "strict": True,
101
+ "schema": _cleanup_schema(OutputSchema),
102
+ },
103
+ }
104
+ try:
105
+ prompt_input: dict[str, Any] = {
106
+ "toolRunExamples": [], # Taken from history. Contains id, input json, output json
107
+ "testRunHistory": [], # This should contain ordered spans.
108
+ "toolInfo": {
109
+ "name": function_name,
110
+ "description": params.get("description"),
111
+ "arguments": params.get(
112
+ "arguments"
113
+ ), # arguments could be passed into tool
114
+ "settings": params.get(
115
+ "settings"
116
+ ), # settings could be passed into tool
117
+ "inputSchema": params.get("input_schema"),
118
+ },
119
+ "toolSchema": params.get("input_schema"),
120
+ "currentToolInput": {
121
+ "args": args,
122
+ "kwargs": kwargs,
123
+ },
124
+ "agentInfo": { # This is incomplete
125
+ # "agentName": self.evaluation_item.name, # to be obtained.
126
+ "actionName": self.evaluation_item.name, # Not sure if this is right?
127
+ "userInput": self.evaluation_item.inputs,
128
+ },
129
+ "testRunProctorInstructions": self.evaluation_item.mocking_strategy.prompt,
130
+ }
131
+ prompt_input = {
132
+ k: json.dumps(pydantic_to_dict_safe(v))
133
+ for k, v in prompt_input.items()
134
+ }
135
+ response = await llm.chat_completions(
136
+ [
137
+ {
138
+ "role": "user",
139
+ "content": PROMPT.format(**prompt_input),
140
+ },
141
+ ],
142
+ response_format=response_format,
143
+ )
144
+ mocked_response = OutputSchema(
145
+ **json.loads(response.choices[0].message.content)
146
+ )
147
+ return mocked_response.response
148
+ except Exception:
149
+ raise
150
+ else:
151
+ raise UiPathMockingNoMatcherError(
152
+ f"Method '{function_name}' is not simulated."
153
+ )
@@ -0,0 +1,29 @@
1
+ """Mocker definitions and implementations."""
2
+
3
+ from abc import ABC, abstractmethod
4
+ from collections.abc import Callable
5
+ from typing import Any, TypeVar
6
+
7
+ T = TypeVar("T")
8
+ R = TypeVar("R")
9
+
10
+
11
+ class Mocker(ABC):
12
+ """Mocker interface."""
13
+
14
+ @abstractmethod
15
+ async def response(
16
+ self,
17
+ func: Callable[[T], R],
18
+ params: dict[str, Any],
19
+ *args: T,
20
+ **kwargs,
21
+ ) -> R:
22
+ """Respond with mocked response."""
23
+ raise NotImplementedError()
24
+
25
+
26
+ class UiPathMockingNoMatcherError(Exception):
27
+ """Exception when a mocker is unable to find a match with the invocation."""
28
+
29
+ pass
@@ -0,0 +1,25 @@
1
+ """Mocker Factory."""
2
+
3
+ from uipath._cli._evals._models._evaluation_set import (
4
+ EvaluationItem,
5
+ LLMMockingStrategy,
6
+ MockitoMockingStrategy,
7
+ )
8
+ from uipath._cli._evals.mocks.llm_mocker import LLMMocker
9
+ from uipath._cli._evals.mocks.mocker import Mocker
10
+ from uipath._cli._evals.mocks.mockito_mocker import MockitoMocker
11
+
12
+
13
+ class MockerFactory:
14
+ """Mocker factory."""
15
+
16
+ @staticmethod
17
+ def create(evaluation_item: EvaluationItem) -> Mocker:
18
+ """Create a mocker instance."""
19
+ match evaluation_item.mocking_strategy:
20
+ case LLMMockingStrategy():
21
+ return LLMMocker(evaluation_item)
22
+ case MockitoMockingStrategy():
23
+ return MockitoMocker(evaluation_item)
24
+ case _:
25
+ raise ValueError("Unknown mocking strategy")
@@ -0,0 +1,62 @@
1
+ """Mockito mocker implementation.
2
+
3
+ https://mockito-python.readthedocs.io/en/latest/
4
+ """
5
+
6
+ from typing import Any, Callable
7
+
8
+ from hydra.utils import instantiate
9
+ from mockito import invocation, mocking # type: ignore[import-untyped]
10
+
11
+ from uipath._cli._evals._models._evaluation_set import (
12
+ EvaluationItem,
13
+ MockingAnswerType,
14
+ MockitoMockingStrategy,
15
+ )
16
+ from uipath._cli._evals.mocks.mocker import Mocker, R, T
17
+
18
+
19
+ class Stub:
20
+ """Stub interface."""
21
+
22
+ def __getattr__(self, item):
23
+ """Return a wrapper function that raises an exception."""
24
+
25
+ def func(*_args, **_kwargs):
26
+ """Not Implemented."""
27
+ raise NotImplementedError()
28
+
29
+ return func
30
+
31
+
32
+ class MockitoMocker(Mocker):
33
+ """Mockito Mocker."""
34
+
35
+ def __init__(self, evaluation_item: EvaluationItem):
36
+ """Instantiate a mockito mocker."""
37
+ self.evaluation_item = evaluation_item
38
+ assert isinstance(self.evaluation_item.mocking_strategy, MockitoMockingStrategy)
39
+
40
+ self.stub = Stub()
41
+ mock_obj = mocking.Mock(self.stub)
42
+
43
+ for behavior in self.evaluation_item.mocking_strategy.behaviors:
44
+ stubbed = invocation.StubbedInvocation(mock_obj, behavior.function)(
45
+ *instantiate(behavior.arguments.args, _convert_="object"),
46
+ **instantiate(behavior.arguments.kwargs, _convert_="object"),
47
+ )
48
+ for answer in behavior.then:
49
+ if answer.type == MockingAnswerType.RETURN:
50
+ stubbed = stubbed.thenReturn(
51
+ instantiate(answer.model_dump(), _convert_="object")["value"]
52
+ )
53
+ elif answer.type == MockingAnswerType.RAISE:
54
+ stubbed = stubbed.thenRaise(
55
+ instantiate(answer.model_dump(), _convert_="object")["value"]
56
+ )
57
+
58
+ async def response(
59
+ self, func: Callable[[T], R], params: dict[str, Any], *args: T, **kwargs
60
+ ) -> R:
61
+ """Respond with mocked response."""
62
+ return getattr(self.stub, params["name"])(*args, **kwargs)