From a72aeef3563e9c2facd518fc673bec0a60a80e61 Mon Sep 17 00:00:00 2001 From: Darren Cohen <39422044+dargilco@users.noreply.github.com> Date: Wed, 1 Jul 2026 15:27:09 -0700 Subject: [PATCH 01/15] Update version --- sdk/ai/azure-ai-projects/CHANGELOG.md | 15 +++++++++++++++ .../azure/ai/projects/_version.py | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/sdk/ai/azure-ai-projects/CHANGELOG.md b/sdk/ai/azure-ai-projects/CHANGELOG.md index 9b0934c4f8d7..a75d6f94f28a 100644 --- a/sdk/ai/azure-ai-projects/CHANGELOG.md +++ b/sdk/ai/azure-ai-projects/CHANGELOG.md @@ -1,5 +1,20 @@ # Release History +## 2.4.0 (Unreleased) + +### Features Added + +* Placeholder + +### Breaking Changes + +* Placeholder + +### Bugs Fixed + +* Placeholder + + ## 2.3.0 (2026-07-01) ### Features Added diff --git a/sdk/ai/azure-ai-projects/azure/ai/projects/_version.py b/sdk/ai/azure-ai-projects/azure/ai/projects/_version.py index 43994a9b16be..3fa6b6d4831f 100644 --- a/sdk/ai/azure-ai-projects/azure/ai/projects/_version.py +++ b/sdk/ai/azure-ai-projects/azure/ai/projects/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "2.3.0" +VERSION = "2.4.0" From 166052b55f8d3df874354f27b000e94b656f1d4f Mon Sep 17 00:00:00 2001 From: Darren Cohen <39422044+dargilco@users.noreply.github.com> Date: Tue, 7 Jul 2026 10:06:42 -0500 Subject: [PATCH 02/15] Restore tsp-location.yaml --- .../{tsp-location.yaml.saved => tsp-location.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sdk/ai/azure-ai-projects/{tsp-location.yaml.saved => tsp-location.yaml} (100%) diff --git a/sdk/ai/azure-ai-projects/tsp-location.yaml.saved b/sdk/ai/azure-ai-projects/tsp-location.yaml similarity index 100% rename from sdk/ai/azure-ai-projects/tsp-location.yaml.saved rename to sdk/ai/azure-ai-projects/tsp-location.yaml From b15ba3df10184a4117938609b183e387d8f39d7f Mon Sep 17 00:00:00 2001 From: Darren Cohen <39422044+dargilco@users.noreply.github.com> Date: Tue, 7 Jul 2026 10:29:36 -0700 Subject: [PATCH 03/15] Update emitter skill for Python to deal with prerequisites (#47878) --- .../.github/skills/README.md | 16 +- .../SKILL.md | 170 ++++++++++++++---- 2 files changed, 148 insertions(+), 38 deletions(-) diff --git a/sdk/ai/azure-ai-projects/.github/skills/README.md b/sdk/ai/azure-ai-projects/.github/skills/README.md index 5fa39f44900e..c6cb95b0658c 100644 --- a/sdk/ai/azure-ai-projects/.github/skills/README.md +++ b/sdk/ai/azure-ai-projects/.github/skills/README.md @@ -1,17 +1,29 @@ # CoPilot skills for azure-ai-projects development -## Prerequisite +## General Prerequisite * Clone the `azure-sdk-for-python` repo to your local machine, if you don't already have it: ``` git clone https://github.com/Azure/azure-sdk-for-python.git ``` * Change to the directory `sdk\ai\azure-ai-projects`. -* Switch to the current feature branch, for example: `git switch feature/azure-ai-projects/2.3.0`. +* Switch to the feature branch staging the next release: `git switch feature/azure-ai-projects/vnext`. * Make sure you don't have any files edited or added in this branch (clean `git status` state). ## Emit from TypeSpec and create a PR +### Skill Prerequisite + +1. Windows machine with PowerShell (Windows PowerShell 5.1+)
Install: `winget install --id Microsoft.PowerShell --source winget` +1. Git CLI, configured user identity, and authenticated access to GitHub remote
Install: `winget install --id Git.Git --source winget`
Configure: `git config --global user.name ""` and `git config --global user.email ""` +1. GitHub CLI (gh), authenticated (for PR creation)
Install: `winget install --id GitHub.cli --source winget`
Login: `gh auth login` +1. Python 3.9 or newer (matches pyproject.toml requires-python >=3.9)
Install: `winget install --id Python.Python.3 --source winget` +1. `pip` installed
Setup/upgrade: `python -m ensurepip --upgrade` and `python -m pip install --upgrade pip` +1. TypeSpec tsp-client command available in PATH (used by skill Step 4)
Install: `npm install -g @azure-tools/typespec-client-generator-cli` +1. Node.js + npm (typically required to install/use tsp-client)
Install: `winget install --id OpenJS.NodeJS.LTS --source winget` +1. Dependencies for developing azure-ai-projects, per dev_requirements.txt (this covers tools such as black and azpysdk support)
Install: `python -m pip install -r dev_requirements.txt` +1. Local clone of Azure/azure-rest-api-specs only if using the local TypeSpec source option
Setup: `git clone https://github.com/Azure/azure-rest-api-specs.git` + ### Using GitHub CoPilot in VSCode * Open VSCode in the current folder. diff --git a/sdk/ai/azure-ai-projects/.github/skills/azure-ai-projects-emit-from-typespec/SKILL.md b/sdk/ai/azure-ai-projects/.github/skills/azure-ai-projects-emit-from-typespec/SKILL.md index 14bd5540f020..1ee8a63a76aa 100644 --- a/sdk/ai/azure-ai-projects/.github/skills/azure-ai-projects-emit-from-typespec/SKILL.md +++ b/sdk/ai/azure-ai-projects/.github/skills/azure-ai-projects-emit-from-typespec/SKILL.md @@ -18,21 +18,134 @@ applying post-emitter fixes, updating the changelog, installing package from sou --- -## Step 1: Gather information from the user +## Step 1: Preflight checks (required) + +Before asking workflow questions, validate prerequisites in this section. + +If any required check fails: +- Stop immediately and report the failing check. +- Show the exact install/fix command. +- Do not continue until the user confirms it is fixed. + +Run these checks in order: + +### 1a. Confirm required commands are available + +Run: + +``` +git --version +gh --version +python --version +pip --version +node --version +npm --version +tsp-client --version +``` + +If any command is missing, stop and show the matching install command: +- PowerShell: `winget install --id Microsoft.PowerShell --source winget` +- Git: `winget install --id Git.Git --source winget` +- GitHub CLI: `winget install --id GitHub.cli --source winget` +- Python 3: `winget install --id Python.Python.3 --source winget` +- Node.js LTS (includes npm): `winget install --id OpenJS.NodeJS.LTS --source winget` +- TypeSpec client generator: `npm install -g @azure-tools/typespec-client-generator-cli` + +### 1b. Confirm working directory + +Run: + +``` +git rev-parse --show-toplevel +git rev-parse --show-prefix +``` + +Expected: +- `git rev-parse --show-prefix` returns exactly `sdk/ai/azure-ai-projects/` + +If not, stop and ask the user to switch to the `sdk/ai/azure-ai-projects` folder. + +### 1c. Confirm Python version is supported + +Run: + +``` +python -c "import sys; raise SystemExit(0 if sys.version_info >= (3, 9) else 1)" +``` + +If this fails, stop and ask the user to install or activate Python 3.9+. + +### 1d. Confirm GitHub CLI authentication + +Run: + +``` +gh auth status +``` + +If not authenticated, stop and ask the user to run: + +``` +gh auth login +``` + +### 1e. Confirm Git identity is configured + +Run: + +``` +git config --global user.name +git config --global user.email +``` + +If either value is empty, stop and ask the user to run: + +``` +git config --global user.name "" +git config --global user.email "" +``` + +### 1f. Confirm repository is clean + +Run: + +``` +git status --porcelain +``` + +If output is not empty, stop and ask the user to commit/stash/discard local changes before continuing. + +### 1g. Install development dependencies + +Run: + +``` +python -m pip install -r dev_requirements.txt +``` + +If this command fails, stop and report the error to the user. + +Important: +- Azure CLI (`az`) is not required for this skill workflow and must not be checked in preflight. +- Do not proceed to Step 2 until all required preflight checks pass. + +--- + +## Step 2: Gather information from the user Ask the user the following questions **one at a time**, waiting for each answer before proceeding. -### 1a. Topic branch name +### 2a. Topic branch name Ask the user to choose **one** of the following two options for the target topic branch: 1. **Create a new topic branch (with default branch name)** – Create a new topic branch for the emitted changes. If selected, this default branch name will be used "/", where `github-userid` is the user's personal GitHub ID (not the Microsoft Enterprise Managed User (EMU) account!) and `DD-MM-HHMM` is the current date-time using date, month, hour and minute. For example, if the GitHub ID is "dargilco" and the current date and time is May 1st, 2026 at 8:13am, the default branch name would be `dargilco/emit-from-typespec-01-05-0813`. This should be the default option, and the default branch name should be displayed. If you press enter without typing anything, this option will be selected. -2. **Create a new topic branch (branch name given by user)** - Ask the user for the branch name. Mention that a common format is "/". If the user enters a branch name `feature/azure-ai-projects/2.3.0` then stop and report that they cannot emit directly to the current feature branch. +2. **Create a new topic branch (branch name given by user)** - Ask the user for the branch name. Mention that a common format is "/". If the user enters a branch name `feature/azure-ai-projects/vnext` then stop and report that they cannot emit directly to the current feature branch. -3. **Emit to current branch** – Emit directly to the current branch without creating a new topic branch. This is not common, but may be necessary if the user is re-running this workflow because of a previous failure, where the topic branch was already created. If the current branch is named `feature/azure-ai-projects/2.3.0` then stop and report that they cannot emit directly to the current feature branch. +3. **Emit to current branch** – Emit directly to the current branch without creating a new topic branch. This is not common, but may be necessary if the user is re-running this workflow because of a previous failure, where the topic branch was already created. If the current branch is named `feature/azure-ai-projects/vnext` then stop and report that they cannot emit directly to the current feature branch. -### 1b. TypeSpec source +### 2b. TypeSpec source Ask the user to choose **one** of the following three options for the TypeSpec source: @@ -44,7 +157,7 @@ Ask the user to choose **one** of the following three options for the TypeSpec s --- -## Step 2: Record the current branch +## Step 3: Record the current branch Before creating the topic branch, record the name of the **current Git branch**. This is the branch that the topic branch will be created from, and the branch the PR will target. @@ -56,7 +169,7 @@ Save this as `BASE_BRANCH`. --- -## Step 3: Create the topic branch +## Step 4: Create the topic branch Create the topic branch off the current branch and switch to it: @@ -65,11 +178,11 @@ git fetch git switch -c origin/ ``` -Replace `` with the name provided by the user in Step 1a. +Replace `` with the name provided by the user in Step 2a. --- -## Step 4: Emit SDK from TypeSpec +## Step 5: Emit SDK from TypeSpec If you are emitting from latest commit or a given commit number, edit file `tsp-location.yaml` to update the full hash commit number, then in the folder `sdk/ai/azure-ai-projects` run the command: `tsp-client update --debug` @@ -81,7 +194,7 @@ Note: --- -## Step 5: Revert changes to files pyproject.toml and MANIFEST.in +## Step 6: Revert changes to files pyproject.toml and MANIFEST.in After the emit, there will be changes to `pyproject.toml` and `MANIFEST.in` that are not needed. Revert any changes to these files by running: @@ -91,7 +204,7 @@ git restore pyproject.toml MANIFEST.in --- -## Step 6: Commit and push +## Step 7: Commit and push Stage all changes (excluding file names that start with `.env`), commit, and push the topic branch: @@ -105,7 +218,7 @@ git push -u origin --- -## Step 7: Run post-emitter fixes +## Step 8: Run post-emitter fixes After a successful emit, run the PowerShell script named `PostEmitter.ps1` located in the `sdk/ai/azure-ai-projects` folder. @@ -115,7 +228,7 @@ This script applies azure-ai-projects specific corrections to the emitted code ( --- -## Step 8: Commit and push +## Step 9: Commit and push Stage all changes (excluding file names that start with `.env`), commit, and push the topic branch: @@ -129,7 +242,7 @@ git push -u origin --- -## Step 9: Fix patched code related to preview feature headers +## Step 10: Fix patched code related to preview feature headers The emitted code may have introduced another beta sub-client (a new property on class `BetaOperations`). It may have also added another enum value to the existing internal class `_FoundryFeaturesOptInKeys`. This means that the client library needs to set a new HTTP request header when making REST API calls to the service, to opt-in to the new service features which are still in preview. If that's the case, do the following: @@ -145,7 +258,7 @@ Important: Under the `azure\ai\projects` folder, you are only allowed to edit Py --- -## Step 10: Update samples and tests +## Step 11: Update samples and tests If there were any breaking changes in existing APIs, like class or method renames: * update the patched code accordingly in the client library to reflect those changes. Changes should be made to Python source file names that start with "_patch", under the `azure\ai\projects` folder. @@ -154,13 +267,13 @@ If there were any breaking changes in existing APIs, like class or method rename --- -## Step 11: Install package from sources +## Step 12: Install package from sources In the folder `sdk\ai\azure-ai-projects`, run `pip install -e .` to install the package from sources. If there are any errors, stop and report the error to the user. Do not continue. --- -## Step 12: Run `apiview-stub-generator` to update api.md and api.metadata.yml files +## Step 13: Run `apiview-stub-generator` to update api.md and api.metadata.yml files In the folder `sdk\ai\azure-ai-projects`, run the following command: @@ -178,7 +291,7 @@ rmdir /s /q build --- -## Step 13: Commit and push +## Step 14: Commit and push Stage all changes (excluding file names that start with `.env`), commit, and push the topic branch: @@ -192,9 +305,9 @@ git push -u origin --- -## Step 14: Create a Pull Request +## Step 15: Create a Pull Request -Create a draft PR from the **topic branch** to the **base branch** (recorded in Step 2): +Create a draft PR from the **topic branch** to the **base branch** (recorded in Step 3): ``` gh pr create --draft --base --head --assignee @me --title "" --body "" @@ -205,23 +318,8 @@ gh pr create --draft --base --head --assignee @me - You must show the user the resulting PR URL on screen when done, before you continue to the next step. -Open a new tab in the default browser and navigate to the PR URL. +Open a new tab in the default operating system browser and navigate to the PR URL (do not use the built-in browser in VS Code, if running this skill in the VS Code GitHub CoPilot chat window). --- -## Step 15: Optionally run tests locally - -Prompt the user with this message: "Tests will run as part of the Pull Request. However, you can optionally run tests locally in a Python virtual environment, right now. It will take a few minutes. Do you want to run tests locally? (yes/no)" - -If the user answers "yes", run all tests from recordings. Follow these guidelines: -* Run tests in a local Python virtual environment. Create this virtual environment if it does not already exists: - ``` - python -m venv .venv - ``` - and activate it: - ``` - .venv\Scripts\activate - ``` -* Show test progress on screen, as tests are run. - From cf8829f536ba384ef9da2cf5fc6aeb3de0c03f4f Mon Sep 17 00:00:00 2001 From: Howie Leung Date: Tue, 7 Jul 2026 13:55:09 -0700 Subject: [PATCH 04/15] change log (#47916) --- sdk/ai/azure-ai-projects/CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sdk/ai/azure-ai-projects/CHANGELOG.md b/sdk/ai/azure-ai-projects/CHANGELOG.md index a75d6f94f28a..e2443a81cc6a 100644 --- a/sdk/ai/azure-ai-projects/CHANGELOG.md +++ b/sdk/ai/azure-ai-projects/CHANGELOG.md @@ -14,6 +14,14 @@ * Placeholder +### Sample updates + +* Added new Hosted Agent sample `sample_agent_user_identity_isolation.py` under `samples/hosted_agents/`, demonstrating per-user response-chain isolation with delegated end-user identities sent in the `x-ms-user-identity` header. +* Updated Hosted Agent toolbox asset `samples/hosted_agents/assets/toolbox-agent/main.py` to use `FoundryToolbox` and `as_skills_provider()` for toolbox MCP skill discovery and wiring, replacing the earlier manual MCP session, auth, and HTTP client setup. +* Renamed the Hosted Agent image-based creation samples from `sample_create_hosted_agent.py` and `sample_create_hosted_agent_async.py` to `sample_create_hosted_agent_from_image.py` and `sample_create_hosted_agent_from_image_async.py`. +* Removed Hosted Agent endpoint samples `sample_agent_endpoint.py` and `sample_agent_endpoint_async.py`. +* Updated Hosted Agent samples to remove sample-level RBAC assignment/setup flows. +* Updated Hosted Agent samples to deploy Hosted Agents by creating a temporary Hosted Agent version for execution flows, then restoring the endpoint and deleting that version during cleanup. ## 2.3.0 (2026-07-01) From 64783d80b10fe2ade7886da43e84ae7066dee7d0 Mon Sep 17 00:00:00 2001 From: Darren Cohen <39422044+dargilco@users.noreply.github.com> Date: Wed, 8 Jul 2026 11:21:12 -0700 Subject: [PATCH 05/15] [azure-ai-projects] Emit SDK from TypeSpec (commit fca510e0) (#47914) --- sdk/ai/azure-ai-projects/api.md | 3205 +++++++- sdk/ai/azure-ai-projects/api.metadata.yml | 2 +- .../azure-ai-projects/apiview-properties.json | 3 +- .../azure/ai/projects/_unions.py | 14 + .../ai/projects/aio/operations/_operations.py | 607 +- .../aio/operations/_patch_agents_async.py | 35 +- .../_patch_evaluation_rules_async.py | 20 +- .../azure/ai/projects/models/_models.py | 80 +- .../ai/projects/operations/_operations.py | 605 +- .../ai/projects/operations/_patch_agents.py | 35 +- .../operations/_patch_evaluation_rules.py | 20 +- .../azure/ai/projects/types.py | 7201 +++++++++++++++++ ...ration_job_simpleqna_with_prompt_source.py | 5 +- .../evaluations/sample_eval_catalog.py | 5 +- ...mple_eval_catalog_code_based_evaluators.py | 5 +- ...le_eval_catalog_prompt_based_evaluators.py | 5 +- ...ample_rubric_evaluator_generation_basic.py | 7 +- ...ple_rubric_evaluator_generation_iterate.py | 5 +- .../sample_rubric_evaluator_manual.py | 11 +- .../sample_agent_user_identity_isolation.py | 1 + sdk/ai/azure-ai-projects/tsp-location.yaml | 2 +- 21 files changed, 11266 insertions(+), 607 deletions(-) create mode 100644 sdk/ai/azure-ai-projects/azure/ai/projects/_unions.py create mode 100644 sdk/ai/azure-ai-projects/azure/ai/projects/types.py diff --git a/sdk/ai/azure-ai-projects/api.md b/sdk/ai/azure-ai-projects/api.md index f9aef5d02952..a8fbf0817f68 100644 --- a/sdk/ai/azure-ai-projects/api.md +++ b/sdk/ai/azure-ai-projects/api.md @@ -104,7 +104,7 @@ namespace azure.ai.projects.aio.operations async def create_session( self, agent_name: str, - body: JSON, + body: CreateSessionRequest, *, content_type: str = "application/json", **kwargs: Any @@ -138,7 +138,7 @@ namespace azure.ai.projects.aio.operations async def create_version( self, agent_name: str, - body: JSON, + body: CreateAgentVersionRequest, *, content_type: str = "application/json", **kwargs: Any @@ -184,7 +184,7 @@ namespace azure.ai.projects.aio.operations async def create_version_from_manifest( self, agent_name: str, - body: JSON, + body: CreateAgentVersionFromManifestRequest, *, content_type: str = "application/json", **kwargs: Any @@ -373,7 +373,7 @@ namespace azure.ai.projects.aio.operations async def update_details( self, agent_name: str, - body: JSON, + body: PatchAgentObjectRequest, *, content_type: str = "application/merge-patch+json", **kwargs: Any @@ -429,7 +429,7 @@ namespace azure.ai.projects.aio.operations @overload async def create_optimization_job( self, - job: JSON, + job: OptimizationJob, *, content_type: str = "application/json", operation_id: Optional[str] = ..., @@ -501,7 +501,7 @@ namespace azure.ai.projects.aio.operations @overload async def create_generation_job( self, - job: JSON, + job: DataGenerationJob, *, content_type: str = "application/json", operation_id: Optional[str] = ..., @@ -565,7 +565,7 @@ namespace azure.ai.projects.aio.operations async def create( self, name: str, - taxonomy: JSON, + taxonomy: EvaluationTaxonomy, *, content_type: str = "application/json", **kwargs: Any @@ -618,7 +618,7 @@ namespace azure.ai.projects.aio.operations async def update( self, name: str, - taxonomy: JSON, + taxonomy: EvaluationTaxonomy, *, content_type: str = "application/json", **kwargs: Any @@ -663,7 +663,7 @@ namespace azure.ai.projects.aio.operations @overload async def create_generation_job( self, - job: JSON, + job: EvaluatorGenerationJob, *, content_type: str = "application/json", operation_id: Optional[str] = ..., @@ -694,7 +694,7 @@ namespace azure.ai.projects.aio.operations async def create_version( self, name: str, - evaluator_version: JSON, + evaluator_version: EvaluatorVersion, *, content_type: str = "application/json", **kwargs: Any @@ -741,7 +741,7 @@ namespace azure.ai.projects.aio.operations self, name: str, version: str, - credential_request: JSON, + credential_request: EvaluatorCredentialRequest, *, content_type: str = "application/json", **kwargs: Any @@ -818,7 +818,7 @@ namespace azure.ai.projects.aio.operations self, name: str, version: str, - pending_upload_request: JSON, + pending_upload_request: PendingUploadRequest, *, content_type: str = "application/json", **kwargs: Any @@ -851,7 +851,7 @@ namespace azure.ai.projects.aio.operations self, name: str, version: str, - evaluator_version: JSON, + evaluator_version: EvaluatorVersion, *, content_type: str = "application/json", **kwargs: Any @@ -889,7 +889,7 @@ namespace azure.ai.projects.aio.operations @overload async def generate( self, - insight: JSON, + insight: Insight, *, content_type: str = "application/json", **kwargs: Any @@ -982,7 +982,7 @@ namespace azure.ai.projects.aio.operations @overload async def create( self, - body: JSON, + body: CreateMemoryStoreRequest, *, content_type: str = "application/json", **kwargs: Any @@ -1013,7 +1013,7 @@ namespace azure.ai.projects.aio.operations async def create_memory( self, name: str, - body: JSON, + body: CreateMemoryRequest, *, content_type: str = "application/json", **kwargs: Any @@ -1058,7 +1058,7 @@ namespace azure.ai.projects.aio.operations async def delete_scope( self, name: str, - body: JSON, + body: DeleteScopeRequest, *, content_type: str = "application/json", **kwargs: Any @@ -1117,7 +1117,7 @@ namespace azure.ai.projects.aio.operations def list_memories( self, name: str, - body: JSON, + body: ListMemoriesRequest, *, before: Optional[str] = ..., content_type: str = "application/json", @@ -1189,7 +1189,7 @@ namespace azure.ai.projects.aio.operations async def update( self, name: str, - body: JSON, + body: UpdateMemoryStoreRequest, *, content_type: str = "application/json", **kwargs: Any @@ -1221,7 +1221,7 @@ namespace azure.ai.projects.aio.operations self, name: str, memory_id: str, - body: JSON, + body: UpdateMemoryRequest, *, content_type: str = "application/json", **kwargs: Any @@ -1313,7 +1313,7 @@ namespace azure.ai.projects.aio.operations self, name: str, version: str, - credential_request: JSON, + credential_request: ModelCredentialRequest, *, content_type: str = "application/json", **kwargs: Any @@ -1356,7 +1356,7 @@ namespace azure.ai.projects.aio.operations self, name: str, version: str, - model_version: JSON, + model_version: ModelVersion, *, content_type: str = "application/json", **kwargs: Any @@ -1389,7 +1389,7 @@ namespace azure.ai.projects.aio.operations self, name: str, version: str, - pending_upload_request: JSON, + pending_upload_request: ModelPendingUploadRequest, *, content_type: str = "application/json", **kwargs: Any @@ -1422,7 +1422,7 @@ namespace azure.ai.projects.aio.operations self, name: str, version: str, - model_version_update: JSON, + model_version_update: UpdateModelVersionRequest, *, content_type: str = "application/merge-patch+json", **kwargs: Any @@ -1480,7 +1480,7 @@ namespace azure.ai.projects.aio.operations @overload async def create( self, - red_team: JSON, + red_team: RedTeam, *, content_type: str = "application/json", **kwargs: Any @@ -1531,7 +1531,7 @@ namespace azure.ai.projects.aio.operations async def create_or_update( self, routine_name: str, - body: JSON, + body: CreateOrUpdateRoutineRequest, *, content_type: str = "application/json", **kwargs: Any @@ -1575,7 +1575,7 @@ namespace azure.ai.projects.aio.operations async def dispatch( self, routine_name: str, - body: JSON, + body: DispatchRoutineAsyncRequest, *, content_type: str = "application/json", **kwargs: Any @@ -1650,7 +1650,7 @@ namespace azure.ai.projects.aio.operations async def create_or_update( self, schedule_id: str, - schedule: JSON, + schedule: Schedule, *, content_type: str = "application/json", **kwargs: Any @@ -1731,7 +1731,7 @@ namespace azure.ai.projects.aio.operations async def create( self, name: str, - body: JSON, + body: CreateSkillVersionRequest, *, content_type: str = "application/json", **kwargs: Any @@ -1759,7 +1759,7 @@ namespace azure.ai.projects.aio.operations async def create_from_files( self, name: str, - content: JSON, + content: CreateSkillVersionFromFilesBody, **kwargs: Any ) -> SkillVersion: ... @@ -1843,7 +1843,7 @@ namespace azure.ai.projects.aio.operations async def update( self, name: str, - body: JSON, + body: UpdateSkillRequest, *, content_type: str = "application/json", **kwargs: Any @@ -1920,7 +1920,7 @@ namespace azure.ai.projects.aio.operations self, name: str, version: str, - dataset_version: JSON, + dataset_version: DatasetVersion, *, content_type: str = "application/merge-patch+json", **kwargs: Any @@ -1987,7 +1987,7 @@ namespace azure.ai.projects.aio.operations self, name: str, version: str, - pending_upload_request: JSON, + pending_upload_request: PendingUploadRequest, *, content_type: str = "application/json", **kwargs: Any @@ -2076,7 +2076,7 @@ namespace azure.ai.projects.aio.operations async def create_or_update( self, id: str, - evaluation_rule: JSON, + evaluation_rule: EvaluationRule, *, content_type: str = "application/json", **kwargs: Any @@ -2141,7 +2141,7 @@ namespace azure.ai.projects.aio.operations self, name: str, version: str, - index: JSON, + index: Index, *, content_type: str = "application/merge-patch+json", **kwargs: Any @@ -2219,7 +2219,7 @@ namespace azure.ai.projects.aio.operations async def create_version( self, name: str, - body: JSON, + body: CreateToolboxVersionRequest, *, content_type: str = "application/json", **kwargs: Any @@ -2300,7 +2300,7 @@ namespace azure.ai.projects.aio.operations async def update( self, name: str, - body: JSON, + body: UpdateToolboxRequest1, *, content_type: str = "application/json", **kwargs: Any @@ -2972,7 +2972,7 @@ namespace azure.ai.projects.models class azure.ai.projects.models.AzureAIBenchmarkPreviewEvalRunDataSource(TypedDict, total=False): key "input_messages": InputMessagesItemReference - key "target": Required[Union[AzureAIAgentTargetParam, AzureAIModelTargetParam, dict[str, Any]]] + key "target": Required[Union[AzureAIModelTargetParam, AzureAIAgentTargetParam, dict[str, Any]]] key "type": Required[Literal["azure_ai_benchmark_preview"]] @@ -6131,6 +6131,7 @@ namespace azure.ai.projects.models server_label: str server_url: Optional[str] tool_configs: Optional[dict[str, ToolConfig]] + tunnel_id: Optional[str] type: Literal[ToolType.MCP] @overload @@ -6147,7 +6148,8 @@ namespace azure.ai.projects.models server_description: Optional[str] = ..., server_label: str, server_url: Optional[str] = ..., - tool_configs: Optional[dict[str, ToolConfig]] = ... + tool_configs: Optional[dict[str, ToolConfig]] = ..., + tunnel_id: Optional[str] = ... ) -> None: ... @overload @@ -6200,6 +6202,7 @@ namespace azure.ai.projects.models server_label: str server_url: Optional[str] tool_configs: dict[str, ToolConfig] + tunnel_id: Optional[str] type: Literal[ToolboxToolType.MCP] @overload @@ -6218,7 +6221,8 @@ namespace azure.ai.projects.models server_description: Optional[str] = ..., server_label: str, server_url: Optional[str] = ..., - tool_configs: Optional[dict[str, ToolConfig]] = ... + tool_configs: Optional[dict[str, ToolConfig]] = ..., + tunnel_id: Optional[str] = ... ) -> None: ... @overload @@ -7530,6 +7534,7 @@ namespace azure.ai.projects.models class azure.ai.projects.models.Reasoning(_Model): + context: Optional[Literal["auto", "current_turn", "all_turns"]] effort: Optional[Literal["none", "minimal", "low", "medium", "high", "xhigh"]] generate_summary: Optional[Literal["auto", "concise", "detailed"]] summary: Optional[Literal["auto", "concise", "detailed"]] @@ -7538,6 +7543,7 @@ namespace azure.ai.projects.models def __init__( self, *, + context: Optional[Literal[auto, current_turn, all_turns]] = ..., effort: Optional[Literal[none, minimal, low, medium, high, xhigh]] = ..., generate_summary: Optional[Literal[auto, concise, detailed]] = ..., summary: Optional[Literal[auto, concise, detailed]] = ... @@ -7625,7 +7631,7 @@ namespace azure.ai.projects.models class azure.ai.projects.models.RedTeamEvalRunDataSource(TypedDict, total=False): key "item_generation_params": Required[Any] - key "target": Required[Union[AzureAIAgentTargetParam, AzureAIModelTargetParam, dict[str, Any]]] + key "target": Required[Union[AzureAIModelTargetParam, AzureAIAgentTargetParam, dict[str, Any]]] key "type": Required[Literal["azure_ai_red_team"]] @@ -8277,7 +8283,7 @@ namespace azure.ai.projects.models class azure.ai.projects.models.TargetCompletionEvalRunDataSource(TypedDict, total=False): key "input_messages": Required[InputMessagesItemReference] key "source": Required[Union[SourceFileContent, SourceFileID]] - key "target": Required[Union[AzureAIAgentTargetParam, AzureAIModelTargetParam, dict[str, Any]]] + key "target": Required[Union[AzureAIModelTargetParam, AzureAIAgentTargetParam, dict[str, Any]]] key "type": Required[Literal["azure_ai_target_completions"]] @@ -9395,7 +9401,7 @@ namespace azure.ai.projects.operations def create_session( self, agent_name: str, - body: JSON, + body: CreateSessionRequest, *, content_type: str = "application/json", **kwargs: Any @@ -9429,7 +9435,7 @@ namespace azure.ai.projects.operations def create_version( self, agent_name: str, - body: JSON, + body: CreateAgentVersionRequest, *, content_type: str = "application/json", **kwargs: Any @@ -9475,7 +9481,7 @@ namespace azure.ai.projects.operations def create_version_from_manifest( self, agent_name: str, - body: JSON, + body: CreateAgentVersionFromManifestRequest, *, content_type: str = "application/json", **kwargs: Any @@ -9664,7 +9670,7 @@ namespace azure.ai.projects.operations def update_details( self, agent_name: str, - body: JSON, + body: PatchAgentObjectRequest, *, content_type: str = "application/merge-patch+json", **kwargs: Any @@ -9720,7 +9726,7 @@ namespace azure.ai.projects.operations @overload def create_optimization_job( self, - job: JSON, + job: OptimizationJob, *, content_type: str = "application/json", operation_id: Optional[str] = ..., @@ -9792,7 +9798,7 @@ namespace azure.ai.projects.operations @overload def create_generation_job( self, - job: JSON, + job: DataGenerationJob, *, content_type: str = "application/json", operation_id: Optional[str] = ..., @@ -9856,7 +9862,7 @@ namespace azure.ai.projects.operations def create( self, name: str, - taxonomy: JSON, + taxonomy: EvaluationTaxonomy, *, content_type: str = "application/json", **kwargs: Any @@ -9909,7 +9915,7 @@ namespace azure.ai.projects.operations def update( self, name: str, - taxonomy: JSON, + taxonomy: EvaluationTaxonomy, *, content_type: str = "application/json", **kwargs: Any @@ -9954,7 +9960,7 @@ namespace azure.ai.projects.operations @overload def create_generation_job( self, - job: JSON, + job: EvaluatorGenerationJob, *, content_type: str = "application/json", operation_id: Optional[str] = ..., @@ -9985,7 +9991,7 @@ namespace azure.ai.projects.operations def create_version( self, name: str, - evaluator_version: JSON, + evaluator_version: EvaluatorVersion, *, content_type: str = "application/json", **kwargs: Any @@ -10032,7 +10038,7 @@ namespace azure.ai.projects.operations self, name: str, version: str, - credential_request: JSON, + credential_request: EvaluatorCredentialRequest, *, content_type: str = "application/json", **kwargs: Any @@ -10109,7 +10115,7 @@ namespace azure.ai.projects.operations self, name: str, version: str, - pending_upload_request: JSON, + pending_upload_request: PendingUploadRequest, *, content_type: str = "application/json", **kwargs: Any @@ -10142,7 +10148,7 @@ namespace azure.ai.projects.operations self, name: str, version: str, - evaluator_version: JSON, + evaluator_version: EvaluatorVersion, *, content_type: str = "application/json", **kwargs: Any @@ -10180,7 +10186,7 @@ namespace azure.ai.projects.operations @overload def generate( self, - insight: JSON, + insight: Insight, *, content_type: str = "application/json", **kwargs: Any @@ -10273,7 +10279,7 @@ namespace azure.ai.projects.operations @overload def create( self, - body: JSON, + body: CreateMemoryStoreRequest, *, content_type: str = "application/json", **kwargs: Any @@ -10304,7 +10310,7 @@ namespace azure.ai.projects.operations def create_memory( self, name: str, - body: JSON, + body: CreateMemoryRequest, *, content_type: str = "application/json", **kwargs: Any @@ -10349,7 +10355,7 @@ namespace azure.ai.projects.operations def delete_scope( self, name: str, - body: JSON, + body: DeleteScopeRequest, *, content_type: str = "application/json", **kwargs: Any @@ -10408,7 +10414,7 @@ namespace azure.ai.projects.operations def list_memories( self, name: str, - body: JSON, + body: ListMemoriesRequest, *, before: Optional[str] = ..., content_type: str = "application/json", @@ -10480,7 +10486,7 @@ namespace azure.ai.projects.operations def update( self, name: str, - body: JSON, + body: UpdateMemoryStoreRequest, *, content_type: str = "application/json", **kwargs: Any @@ -10512,7 +10518,7 @@ namespace azure.ai.projects.operations self, name: str, memory_id: str, - body: JSON, + body: UpdateMemoryRequest, *, content_type: str = "application/json", **kwargs: Any @@ -10606,7 +10612,7 @@ namespace azure.ai.projects.operations self, name: str, version: str, - credential_request: JSON, + credential_request: ModelCredentialRequest, *, content_type: str = "application/json", **kwargs: Any @@ -10649,7 +10655,7 @@ namespace azure.ai.projects.operations self, name: str, version: str, - model_version: JSON, + model_version: ModelVersion, *, content_type: str = "application/json", **kwargs: Any @@ -10682,7 +10688,7 @@ namespace azure.ai.projects.operations self, name: str, version: str, - pending_upload_request: JSON, + pending_upload_request: ModelPendingUploadRequest, *, content_type: str = "application/json", **kwargs: Any @@ -10715,7 +10721,7 @@ namespace azure.ai.projects.operations self, name: str, version: str, - model_version_update: JSON, + model_version_update: UpdateModelVersionRequest, *, content_type: str = "application/merge-patch+json", **kwargs: Any @@ -10773,7 +10779,7 @@ namespace azure.ai.projects.operations @overload def create( self, - red_team: JSON, + red_team: RedTeam, *, content_type: str = "application/json", **kwargs: Any @@ -10824,7 +10830,7 @@ namespace azure.ai.projects.operations def create_or_update( self, routine_name: str, - body: JSON, + body: CreateOrUpdateRoutineRequest, *, content_type: str = "application/json", **kwargs: Any @@ -10868,7 +10874,7 @@ namespace azure.ai.projects.operations def dispatch( self, routine_name: str, - body: JSON, + body: DispatchRoutineAsyncRequest, *, content_type: str = "application/json", **kwargs: Any @@ -10943,7 +10949,7 @@ namespace azure.ai.projects.operations def create_or_update( self, schedule_id: str, - schedule: JSON, + schedule: Schedule, *, content_type: str = "application/json", **kwargs: Any @@ -11024,7 +11030,7 @@ namespace azure.ai.projects.operations def create( self, name: str, - body: JSON, + body: CreateSkillVersionRequest, *, content_type: str = "application/json", **kwargs: Any @@ -11052,7 +11058,7 @@ namespace azure.ai.projects.operations def create_from_files( self, name: str, - content: JSON, + content: CreateSkillVersionFromFilesBody, **kwargs: Any ) -> SkillVersion: ... @@ -11136,7 +11142,7 @@ namespace azure.ai.projects.operations def update( self, name: str, - body: JSON, + body: UpdateSkillRequest, *, content_type: str = "application/json", **kwargs: Any @@ -11213,7 +11219,7 @@ namespace azure.ai.projects.operations self, name: str, version: str, - dataset_version: JSON, + dataset_version: DatasetVersion, *, content_type: str = "application/merge-patch+json", **kwargs: Any @@ -11280,7 +11286,7 @@ namespace azure.ai.projects.operations self, name: str, version: str, - pending_upload_request: JSON, + pending_upload_request: PendingUploadRequest, *, content_type: str = "application/json", **kwargs: Any @@ -11369,7 +11375,7 @@ namespace azure.ai.projects.operations def create_or_update( self, id: str, - evaluation_rule: JSON, + evaluation_rule: EvaluationRule, *, content_type: str = "application/json", **kwargs: Any @@ -11434,7 +11440,7 @@ namespace azure.ai.projects.operations self, name: str, version: str, - index: JSON, + index: Index, *, content_type: str = "application/merge-patch+json", **kwargs: Any @@ -11512,7 +11518,7 @@ namespace azure.ai.projects.operations def create_version( self, name: str, - body: JSON, + body: CreateToolboxVersionRequest, *, content_type: str = "application/json", **kwargs: Any @@ -11593,7 +11599,7 @@ namespace azure.ai.projects.operations def update( self, name: str, - body: JSON, + body: UpdateToolboxRequest1, *, content_type: str = "application/json", **kwargs: Any @@ -11633,4 +11639,3045 @@ namespace azure.ai.projects.telemetry def uninstrument(self) -> None: ... +namespace azure.ai.projects.types + + class azure.ai.projects.types.A2APreviewTool(TypedDict, total=False): + key "agent_card_path": str + key "base_url": str + key "project_connection_id": str + key "send_credentials_for_agent_card": bool + key "type": Required[Literal[ToolType.A2A_PREVIEW]] + agent_card_path: str + base_url: str + project_connection_id: str + send_credentials_for_agent_card: bool + type: Literal[ToolType.A2A_PREVIEW] + + + class azure.ai.projects.types.A2APreviewToolboxTool(TypedDict, total=False): + key "agent_card_path": str + key "base_url": str + key "description": str + key "name": str + key "project_connection_id": str + key "send_credentials_for_agent_card": bool + key "type": Required[Literal[ToolboxToolType.A2A_PREVIEW]] + agent_card_path: str + base_url: str + description: str + name: str + project_connection_id: str + send_credentials_for_agent_card: bool + tool_configs: dict[str, ToolConfig] + type: Literal[ToolboxToolType.A2A_PREVIEW] + + + class azure.ai.projects.types.A2AProtocolConfiguration(TypedDict, total=False): + + + class azure.ai.projects.types.AISearchIndexResource(TypedDict, total=False): + key "filter": str + key "index_asset_id": str + key "index_name": str + key "project_connection_id": str + key "query_type": Union[str, AzureAISearchQueryType] + key "top_k": int + filter: str + index_asset_id: str + index_name: str + project_connection_id: str + query_type: Union[str, AzureAISearchQueryType] + top_k: int + + + class azure.ai.projects.types.ActivityProtocolConfiguration(TypedDict, total=False): + key "enable_m365_public_endpoint": bool + enable_m365_public_endpoint: bool + + + class azure.ai.projects.types.AgentBlueprintReference(TypedDict, total=False): + key "blueprint_id": Required[str] + key "type": Required[Literal[AgentBlueprintReferenceType.MANAGED_AGENT_IDENTITY_BLUEPRINT]] + blueprint_id: str + type: Literal[AgentBlueprintReferenceType.MANAGED_AGENT_IDENTITY_BLUEPRINT] + + + class azure.ai.projects.types.AgentBlueprintReferenceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + MANAGED_AGENT_IDENTITY_BLUEPRINT = "ManagedAgentIdentityBlueprint" + + + class azure.ai.projects.types.AgentCard(TypedDict, total=False): + key "description": str + key "skills": Required[list[AgentCardSkill]] + key "version": Required[str] + description: str + skills: list[AgentCardSkill] + version: str + + + class azure.ai.projects.types.AgentCardSkill(TypedDict, total=False): + key "description": str + key "id": Required[str] + key "name": Required[str] + description: str + examples: list[str] + id: str + name: str + tags: list[str] + + + class azure.ai.projects.types.AgentClusterInsightRequest(TypedDict, total=False): + key "agentName": Required[str] + key "type": Required[Literal[InsightType.AGENT_CLUSTER_INSIGHT]] + agent_name: str + modelConfiguration: ForwardRef('InsightModelConfiguration', module='types') + model_configuration: InsightModelConfiguration + type: Literal[InsightType.AGENT_CLUSTER_INSIGHT] + + + class azure.ai.projects.types.AgentClusterInsightResult(TypedDict, total=False): + key "clusterInsight": Required[ClusterInsightResult] + key "type": Required[Literal[InsightType.AGENT_CLUSTER_INSIGHT]] + cluster_insight: ClusterInsightResult + type: Literal[InsightType.AGENT_CLUSTER_INSIGHT] + + + class azure.ai.projects.types.AgentDataGenerationJobSource(TypedDict, total=False): + key "agent_name": Required[str] + key "agent_version": str + key "description": str + key "type": Required[Literal[DataGenerationJobSourceType.AGENT]] + agent_name: str + agent_version: str + description: str + type: Literal[DataGenerationJobSourceType.AGENT] + + + class azure.ai.projects.types.AgentEndpointAuthorizationSchemeType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + BOT_SERVICE = "BotService" + BOT_SERVICE_RBAC = "BotServiceRbac" + BOT_SERVICE_TENANT = "BotServiceTenant" + ENTRA = "Entra" + + + class azure.ai.projects.types.AgentEndpointConfig(TypedDict, total=False): + authorization_schemes: list[AgentEndpointAuthorizationScheme] + protocol_configuration: ForwardRef('ProtocolConfiguration', module='types') + version_selector: ForwardRef('VersionSelector', module='types') + + + class azure.ai.projects.types.AgentEvaluatorGenerationJobSource(TypedDict, total=False): + key "agent_name": Required[str] + key "agent_version": str + key "description": str + key "type": Required[Literal[EvaluatorGenerationJobSourceType.AGENT]] + agent_name: str + agent_version: str + description: str + type: Literal[EvaluatorGenerationJobSourceType.AGENT] + + + class azure.ai.projects.types.AgentKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): + EXTERNAL = "external" + HOSTED = "hosted" + PROMPT = "prompt" + WORKFLOW = "workflow" + + + class azure.ai.projects.types.AgentTaxonomyInput(TypedDict, total=False): + key "riskCategories": Required[list[Union[str, RiskCategory]]] + key "target": Required[EvaluationTarget] + key "type": Required[Literal[EvaluationTaxonomyInputType.AGENT]] + risk_categories: list[Union[str, RiskCategory]] + target: EvaluationTarget + type: Literal[EvaluationTaxonomyInputType.AGENT] + + + class azure.ai.projects.types.ApiError(TypedDict, total=False): + key "code": Required[Optional[str]] + key "message": Required[str] + key "param": Optional[str] + key "type": str + additionalInfo: dict[str, Any] + additional_info: dict[str, Any] + code: str + debugInfo: dict[str, Any] + debug_info: dict[str, Any] + details: list[ApiError] + message: str + param: str + type: str + + + class azure.ai.projects.types.ApplyPatchToolParam(TypedDict, total=False): + key "type": Required[Literal[ToolType.APPLY_PATCH]] + type: Literal[ToolType.APPLY_PATCH] + + + class azure.ai.projects.types.ApproximateLocation(TypedDict, total=False): + key "city": Optional[str] + key "country": Optional[str] + key "region": Optional[str] + key "timezone": Optional[str] + key "type": Required[Literal["approximate"]] + city: str + country: str + region: str + timezone: str + type: Literal[approximate] + + + class azure.ai.projects.types.ArtifactProfile(TypedDict, total=False): + key "category": Required[Union[str, FoundryModelArtifactProfileCategory]] + category: Union[str, FoundryModelArtifactProfileCategory] + signals: list[Union[str, FoundryModelArtifactProfileSignal]] + + + class azure.ai.projects.types.AutoCodeInterpreterToolParam(TypedDict, total=False): + key "memory_limit": Optional[Union[str, ContainerMemoryLimit]] + key "type": Required[Literal["auto"]] + file_ids: list[str] + memory_limit: Union[str, ContainerMemoryLimit] + network_policy: ForwardRef('ContainerNetworkPolicyParam', module='types') + type: Literal[auto] + + + class azure.ai.projects.types.AzureAIAgentTarget(TypedDict, total=False): + key "name": Required[str] + key "type": Required[Literal["azure_ai_agent"]] + key "version": str + name: str + tool_descriptions: list[ToolDescription] + tools: list[Tool] + type: Literal[azure_ai_agent] + version: str + + + class azure.ai.projects.types.AzureAIModelTarget(TypedDict, total=False): + key "model": str + key "type": Required[Literal["azure_ai_model"]] + model: str + sampling_params: ForwardRef('ModelSamplingParams', module='types') + type: Literal[azure_ai_model] + + + class azure.ai.projects.types.AzureAISearchIndex(TypedDict, total=False): + key "connectionName": Required[str] + key "description": str + key "id": str + key "indexName": Required[str] + key "name": Required[str] + key "type": Required[Literal[IndexType.AZURE_SEARCH]] + key "version": Required[str] + connection_name: str + description: str + fieldMapping: ForwardRef('FieldMapping', module='types') + field_mapping: FieldMapping + id: str + index_name: str + name: str + tags: dict[str, str] + type: Literal[IndexType.AZURE_SEARCH] + version: str + + + class azure.ai.projects.types.AzureAISearchTool(TypedDict, total=False): + key "azure_ai_search": Required[AzureAISearchToolResource] + key "description": str + key "name": str + key "type": Required[Literal[ToolType.AZURE_AI_SEARCH]] + azure_ai_search: AzureAISearchToolResource + description: str + name: str + tool_configs: dict[str, ToolConfig] + type: Literal[ToolType.AZURE_AI_SEARCH] + + + class azure.ai.projects.types.AzureAISearchToolResource(TypedDict, total=False): + key "indexes": Required[list[AISearchIndexResource]] + indexes: list[AISearchIndexResource] + + + class azure.ai.projects.types.AzureAISearchToolboxTool(TypedDict, total=False): + key "azure_ai_search": Required[AzureAISearchToolResource] + key "description": str + key "name": str + key "type": Required[Literal[ToolboxToolType.AZURE_AI_SEARCH]] + azure_ai_search: AzureAISearchToolResource + description: str + name: str + tool_configs: dict[str, ToolConfig] + type: Literal[ToolboxToolType.AZURE_AI_SEARCH] + + + class azure.ai.projects.types.AzureFunctionBinding(TypedDict, total=False): + key "storage_queue": Required[AzureFunctionStorageQueue] + key "type": Required[Literal["storage_queue"]] + storage_queue: AzureFunctionStorageQueue + type: Literal[storage_queue] + + + class azure.ai.projects.types.AzureFunctionDefinition(TypedDict, total=False): + key "function": Required[AzureFunctionDefinitionFunction] + key "input_binding": Required[AzureFunctionBinding] + key "output_binding": Required[AzureFunctionBinding] + function: AzureFunctionDefinitionFunction + input_binding: AzureFunctionBinding + output_binding: AzureFunctionBinding + + + class azure.ai.projects.types.AzureFunctionDefinitionFunction(TypedDict, total=False): + key "description": str + key "name": Required[str] + key "parameters": Required[dict[str, Any]] + description: str + name: str + parameters: dict[str, Any] + + + class azure.ai.projects.types.AzureFunctionStorageQueue(TypedDict, total=False): + key "queue_name": Required[str] + key "queue_service_endpoint": Required[str] + queue_name: str + queue_service_endpoint: str + + + class azure.ai.projects.types.AzureFunctionTool(TypedDict, total=False): + key "azure_function": Required[AzureFunctionDefinition] + key "type": Required[Literal[ToolType.AZURE_FUNCTION]] + azure_function: AzureFunctionDefinition + tool_configs: dict[str, ToolConfig] + type: Literal[ToolType.AZURE_FUNCTION] + + + class azure.ai.projects.types.AzureOpenAIModelConfiguration(TypedDict, total=False): + key "modelDeploymentName": Required[str] + key "type": Required[Literal["AzureOpenAIModel"]] + model_deployment_name: str + type: Literal[AzureOpenAIModel] + + + class azure.ai.projects.types.BingCustomSearchConfiguration(TypedDict, total=False): + key "count": int + key "freshness": str + key "instance_name": Required[str] + key "market": str + key "project_connection_id": Required[str] + key "set_lang": str + count: int + freshness: str + instance_name: str + market: str + project_connection_id: str + set_lang: str + + + class azure.ai.projects.types.BingCustomSearchPreviewTool(TypedDict, total=False): + key "bing_custom_search_preview": Required[BingCustomSearchToolParameters] + key "type": Required[Literal[ToolType.BING_CUSTOM_SEARCH_PREVIEW]] + bing_custom_search_preview: BingCustomSearchToolParameters + type: Literal[ToolType.BING_CUSTOM_SEARCH_PREVIEW] + + + class azure.ai.projects.types.BingCustomSearchToolParameters(TypedDict, total=False): + key "search_configurations": Required[list[BingCustomSearchConfiguration]] + search_configurations: list[BingCustomSearchConfiguration] + + + class azure.ai.projects.types.BingGroundingSearchConfiguration(TypedDict, total=False): + key "count": int + key "freshness": str + key "market": str + key "project_connection_id": Required[str] + key "set_lang": str + count: int + freshness: str + market: str + project_connection_id: str + set_lang: str + + + class azure.ai.projects.types.BingGroundingSearchToolParameters(TypedDict, total=False): + key "search_configurations": Required[list[BingGroundingSearchConfiguration]] + search_configurations: list[BingGroundingSearchConfiguration] + + + class azure.ai.projects.types.BingGroundingTool(TypedDict, total=False): + key "bing_grounding": Required[BingGroundingSearchToolParameters] + key "description": str + key "name": str + key "type": Required[Literal[ToolType.BING_GROUNDING]] + bing_grounding: BingGroundingSearchToolParameters + description: str + name: str + tool_configs: dict[str, ToolConfig] + type: Literal[ToolType.BING_GROUNDING] + + + class azure.ai.projects.types.BotServiceAuthorizationScheme(TypedDict, total=False): + key "type": Required[Literal[AgentEndpointAuthorizationSchemeType.BOT_SERVICE]] + type: Literal[AgentEndpointAuthorizationSchemeType.BOT_SERVICE] + + + class azure.ai.projects.types.BotServiceRbacAuthorizationScheme(TypedDict, total=False): + key "type": Required[Literal[AgentEndpointAuthorizationSchemeType.BOT_SERVICE_RBAC]] + type: Literal[AgentEndpointAuthorizationSchemeType.BOT_SERVICE_RBAC] + + + class azure.ai.projects.types.BotServiceTenantAuthorizationScheme(TypedDict, total=False): + key "type": Required[Literal[AgentEndpointAuthorizationSchemeType.BOT_SERVICE_TENANT]] + type: Literal[AgentEndpointAuthorizationSchemeType.BOT_SERVICE_TENANT] + + + class azure.ai.projects.types.BrowserAutomationPreviewTool(TypedDict, total=False): + key "browser_automation_preview": Required[BrowserAutomationToolParameters] + key "type": Required[Literal[ToolType.BROWSER_AUTOMATION_PREVIEW]] + browser_automation_preview: BrowserAutomationToolParameters + type: Literal[ToolType.BROWSER_AUTOMATION_PREVIEW] + + + class azure.ai.projects.types.BrowserAutomationPreviewToolboxTool(TypedDict, total=False): + key "browser_automation_preview": Required[BrowserAutomationToolParameters] + key "description": str + key "name": str + key "type": Required[Literal[ToolboxToolType.BROWSER_AUTOMATION_PREVIEW]] + browser_automation_preview: BrowserAutomationToolParameters + description: str + name: str + tool_configs: dict[str, ToolConfig] + type: Literal[ToolboxToolType.BROWSER_AUTOMATION_PREVIEW] + + + class azure.ai.projects.types.BrowserAutomationToolConnectionParameters(TypedDict, total=False): + key "project_connection_id": Required[str] + project_connection_id: str + + + class azure.ai.projects.types.BrowserAutomationToolParameters(TypedDict, total=False): + key "connection": Required[BrowserAutomationToolConnectionParameters] + connection: BrowserAutomationToolConnectionParameters + + + class azure.ai.projects.types.CaptureStructuredOutputsTool(TypedDict, total=False): + key "description": str + key "name": str + key "outputs": Required[StructuredOutputDefinition] + key "type": Required[Literal[ToolType.CAPTURE_STRUCTURED_OUTPUTS]] + description: str + name: str + outputs: StructuredOutputDefinition + tool_configs: dict[str, ToolConfig] + type: Literal[ToolType.CAPTURE_STRUCTURED_OUTPUTS] + + + class azure.ai.projects.types.ChartCoordinate(TypedDict, total=False): + key "size": Required[int] + key "x": Required[int] + key "y": Required[int] + size: int + x: int + y: int + + + class azure.ai.projects.types.ClusterInsightResult(TypedDict, total=False): + key "clusters": Required[list[InsightCluster]] + key "summary": Required[InsightSummary] + clusters: list[InsightCluster] + coordinates: dict[str, ChartCoordinate] + summary: InsightSummary + + + class azure.ai.projects.types.ClusterTokenUsage(TypedDict, total=False): + key "inputTokenUsage": Required[int] + key "outputTokenUsage": Required[int] + key "totalTokenUsage": Required[int] + input_token_usage: int + output_token_usage: int + total_token_usage: int + + + class azure.ai.projects.types.CodeBasedEvaluatorDefinition(TypedDict, total=False): + key "blob_uri": str + key "code_text": str + key "entry_point": str + key "image_tag": str + key "type": Required[Literal[EvaluatorDefinitionType.CODE]] + blob_uri: str + code_text: str + data_schema: dict[str, Any] + entry_point: str + image_tag: str + init_parameters: dict[str, Any] + metrics: dict[str, EvaluatorMetric] + type: Literal[EvaluatorDefinitionType.CODE] + + + class azure.ai.projects.types.CodeConfiguration(TypedDict, total=False): + key "content_hash": str + key "dependency_resolution": Required[Union[str, CodeDependencyResolution]] + key "entry_point": Required[list[str]] + key "runtime": Required[str] + content_hash: str + dependency_resolution: Union[str, CodeDependencyResolution] + entry_point: list[str] + runtime: str + + + class azure.ai.projects.types.CodeInterpreterTool(TypedDict, total=False): + key "container": Union[str, AutoCodeInterpreterToolParam] + key "description": str + key "name": str + key "type": Required[Literal[ToolType.CODE_INTERPRETER]] + container: Union[str, AutoCodeInterpreterToolParam] + description: str + name: str + tool_configs: dict[str, ToolConfig] + type: Literal[ToolType.CODE_INTERPRETER] + + + class azure.ai.projects.types.CodeInterpreterToolboxTool(TypedDict, total=False): + key "container": Union[str, AutoCodeInterpreterToolParam] + key "description": str + key "name": str + key "type": Required[Literal[ToolboxToolType.CODE_INTERPRETER]] + container: Union[str, AutoCodeInterpreterToolParam] + description: str + name: str + tool_configs: dict[str, ToolConfig] + type: Literal[ToolboxToolType.CODE_INTERPRETER] + + + class azure.ai.projects.types.ComparisonFilter(TypedDict, total=False): + key "key": Required[str] + key "type": Required[Literal["eq", "ne", "gt", "gte", "lt", "lte", "in", "nin"]] + key "value": Required[Union[str, float, bool, list[Union[str, float]]]] + key: str + type: Literal[eq, ne, gt, gte, lt, lte, in, nin] + value: Union[str, float, bool, list[Union[str, float]]] + + + class azure.ai.projects.types.CompoundFilter(TypedDict, total=False): + key "filters": Required[list[Union[ComparisonFilter, Any]]] + key "type": Required[Literal["and", "or"]] + filters: list[Union[ComparisonFilter, Any]] + type: Literal[and, or] + + + class azure.ai.projects.types.ComputerTool(TypedDict, total=False): + key "type": Required[Literal[ToolType.COMPUTER]] + type: Literal[ToolType.COMPUTER] + + + class azure.ai.projects.types.ComputerUsePreviewTool(TypedDict, total=False): + key "display_height": Required[int] + key "display_width": Required[int] + key "environment": Required[Union[str, ComputerEnvironment]] + key "type": Required[Literal[ToolType.COMPUTER_USE_PREVIEW]] + display_height: int + display_width: int + environment: Union[str, ComputerEnvironment] + type: Literal[ToolType.COMPUTER_USE_PREVIEW] + + + class azure.ai.projects.types.ContainerAutoParam(TypedDict, total=False): + key "memory_limit": Optional[Union[str, ContainerMemoryLimit]] + key "type": Required[Literal[FunctionShellToolParamEnvironmentType.CONTAINER_AUTO]] + file_ids: list[str] + memory_limit: Union[str, ContainerMemoryLimit] + network_policy: ForwardRef('ContainerNetworkPolicyParam', module='types') + skills: list[ContainerSkill] + type: Literal[FunctionShellToolParamEnvironmentType.CONTAINER_AUTO] + + + class azure.ai.projects.types.ContainerConfiguration(TypedDict, total=False): + key "image": Required[str] + image: str + + + class azure.ai.projects.types.ContainerNetworkPolicyAllowlistParam(TypedDict, total=False): + key "allowed_domains": Required[list[str]] + key "type": Required[Literal[ContainerNetworkPolicyParamType.ALLOWLIST]] + allowed_domains: list[str] + domain_secrets: list[ContainerNetworkPolicyDomainSecretParam] + type: Literal[ContainerNetworkPolicyParamType.ALLOWLIST] + + + class azure.ai.projects.types.ContainerNetworkPolicyDisabledParam(TypedDict, total=False): + key "type": Required[Literal[ContainerNetworkPolicyParamType.DISABLED]] + type: Literal[ContainerNetworkPolicyParamType.DISABLED] + + + class azure.ai.projects.types.ContainerNetworkPolicyDomainSecretParam(TypedDict, total=False): + key "domain": Required[str] + key "name": Required[str] + key "value": Required[str] + domain: str + name: str + value: str + + + class azure.ai.projects.types.ContainerNetworkPolicyParamType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ALLOWLIST = "allowlist" + DISABLED = "disabled" + + + class azure.ai.projects.types.ContainerSkillType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + INLINE = "inline" + SKILL_REFERENCE = "skill_reference" + + + class azure.ai.projects.types.ContinuousEvaluationRuleAction(TypedDict, total=False): + key "evalId": Required[str] + key "maxHourlyRuns": int + key "samplingRate": float + key "type": Required[Literal[EvaluationRuleActionType.CONTINUOUS_EVALUATION]] + eval_id: str + max_hourly_runs: int + sampling_rate: float + type: Literal[EvaluationRuleActionType.CONTINUOUS_EVALUATION] + + + class azure.ai.projects.types.CosmosDBIndex(TypedDict, total=False): + key "connectionName": Required[str] + key "containerName": Required[str] + key "databaseName": Required[str] + key "description": str + key "embeddingConfiguration": Required[EmbeddingConfiguration] + key "fieldMapping": Required[FieldMapping] + key "id": str + key "name": Required[str] + key "type": Required[Literal[IndexType.COSMOS_DB]] + key "version": Required[str] + connection_name: str + container_name: str + database_name: str + description: str + embedding_configuration: EmbeddingConfiguration + field_mapping: FieldMapping + id: str + name: str + tags: dict[str, str] + type: Literal[IndexType.COSMOS_DB] + version: str + + + class azure.ai.projects.types.CreateAgentVersionFromManifestRequest(TypedDict, total=False): + key "description": str + key "manifest_id": Required[str] + key "parameter_values": Required[dict[str, Any]] + description: str + manifest_id: str + metadata: dict[str, str] + parameter_values: dict[str, Any] + + + class azure.ai.projects.types.CreateAgentVersionRequest(TypedDict, total=False): + key "definition": Required[AgentDefinition] + key "description": str + key "draft": bool + blueprint_reference: ForwardRef('AgentBlueprintReference', module='types') + definition: AgentDefinition + description: str + draft: bool + metadata: dict[str, str] + + + class azure.ai.projects.types.CreateMemoryRequest(TypedDict, total=False): + key "content": Required[str] + key "kind": Required[Union[str, MemoryItemKind]] + key "scope": Required[str] + content: str + kind: Union[str, MemoryItemKind] + scope: str + + + class azure.ai.projects.types.CreateMemoryStoreRequest(TypedDict, total=False): + key "definition": Required[MemoryStoreDefinition] + key "description": str + key "name": Required[str] + definition: MemoryStoreDefinition + description: str + metadata: dict[str, str] + name: str + + + class azure.ai.projects.types.CreateOrUpdateRoutineRequest(TypedDict, total=False): + key "description": str + key "enabled": bool + action: ForwardRef('RoutineAction', module='types') + description: str + enabled: bool + triggers: dict[str, RoutineTrigger] + + + class azure.ai.projects.types.CreateSessionRequest(TypedDict, total=False): + key "agent_session_id": str + key "version_indicator": Required[VersionIndicator] + agent_session_id: str + version_indicator: VersionIndicator + + + class azure.ai.projects.types.CreateSkillVersionFromFilesBody(TypedDict, total=False): + key "default": bool + key "files": Required[list[Union[str, bytes, IO[str], IO[bytes], tuple[Optional[str], Union[str, bytes, IO[str], IO[bytes]]], tuple[Optional[str], Union[str, bytes, IO[str], IO[bytes]], Optional[str]]]]] + default: bool + files: list[FileType] + + + class azure.ai.projects.types.CreateSkillVersionRequest(TypedDict, total=False): + key "default": bool + default: bool + inline_content: ForwardRef('SkillInlineContent', module='types') + + + class azure.ai.projects.types.CreateToolboxVersionRequest(TypedDict, total=False): + key "description": str + key "tools": Required[list[ToolboxTool]] + description: str + metadata: dict[str, str] + policies: ForwardRef('ToolboxPolicies', module='types') + skills: list[ToolboxSkill] + tools: list[ToolboxTool] + + + class azure.ai.projects.types.CronTrigger(TypedDict, total=False): + key "endTime": str + key "expression": Required[str] + key "startTime": str + key "timeZone": str + key "type": Required[Literal[TriggerType.CRON]] + end_time: str + expression: str + start_time: str + time_zone: str + type: Literal[TriggerType.CRON] + + + class azure.ai.projects.types.CustomGrammarFormatParam(TypedDict, total=False): + key "definition": Required[str] + key "syntax": Required[Union[str, GrammarSyntax1]] + key "type": Required[Literal[CustomToolParamFormatType.GRAMMAR]] + definition: str + syntax: Union[str, GrammarSyntax1] + type: Literal[CustomToolParamFormatType.GRAMMAR] + + + class azure.ai.projects.types.CustomRoutineTrigger(TypedDict, total=False): + key "event_name": str + key "parameters": Required[dict[str, Any]] + key "provider": Required[str] + key "type": Required[Literal[RoutineTriggerType.CUSTOM]] + event_name: str + parameters: dict[str, Any] + provider: str + type: Literal[RoutineTriggerType.CUSTOM] + + + class azure.ai.projects.types.CustomTextFormatParam(TypedDict, total=False): + key "type": Required[Literal[CustomToolParamFormatType.TEXT]] + type: Literal[CustomToolParamFormatType.TEXT] + + + class azure.ai.projects.types.CustomToolParam(TypedDict, total=False): + key "defer_loading": bool + key "description": str + key "name": Required[str] + key "type": Required[Literal[ToolType.CUSTOM]] + defer_loading: bool + description: str + format: ForwardRef('CustomToolParamFormat', module='types') + name: str + type: Literal[ToolType.CUSTOM] + + + class azure.ai.projects.types.CustomToolParamFormatType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + GRAMMAR = "grammar" + TEXT = "text" + + + class azure.ai.projects.types.DailyRecurrenceSchedule(TypedDict, total=False): + key "hours": Required[list[int]] + key "type": Required[Literal[RecurrenceType.DAILY]] + hours: list[int] + type: Literal[RecurrenceType.DAILY] + + + class azure.ai.projects.types.DataGenerationJob(TypedDict, total=False): + key "created_at": Required[int] + key "finished_at": int + key "id": Required[str] + key "status": Required[Union[str, JobStatus]] + created_at: int + error: ForwardRef('ApiError', module='types') + finished_at: int + id: str + inputs: ForwardRef('DataGenerationJobInputs', module='types') + result: ForwardRef('DataGenerationJobResult', module='types') + status: Union[str, JobStatus] + + + class azure.ai.projects.types.DataGenerationJobInputs(TypedDict, total=False): + key "name": Required[str] + key "options": Required[DataGenerationJobOptions] + key "scenario": Required[Union[str, DataGenerationJobScenario]] + key "sources": Required[list[DataGenerationJobSource]] + name: str + options: DataGenerationJobOptions + output_options: ForwardRef('DataGenerationJobOutputOptions', module='types') + scenario: Union[str, DataGenerationJobScenario] + sources: list[DataGenerationJobSource] + + + class azure.ai.projects.types.DataGenerationJobOutputOptions(TypedDict, total=False): + key "description": str + key "name": str + description: str + name: str + tags: dict[str, str] + + + class azure.ai.projects.types.DataGenerationJobOutputType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DATASET = "dataset" + FILE = "file" + + + class azure.ai.projects.types.DataGenerationJobResult(TypedDict, total=False): + key "generated_samples": Required[int] + generated_samples: int + outputs: list[DataGenerationJobOutput] + token_usage: ForwardRef('DataGenerationTokenUsage', module='types') + + + class azure.ai.projects.types.DataGenerationJobSourceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AGENT = "agent" + FILE = "file" + PROMPT = "prompt" + TRACES = "traces" + + + class azure.ai.projects.types.DataGenerationJobType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + SIMPLE_QNA = "simple_qna" + TOOL_USE = "tool_use" + TRACES = "traces" + + + class azure.ai.projects.types.DataGenerationModelOptions(TypedDict, total=False): + key "model": Required[str] + model: str + + + class azure.ai.projects.types.DataGenerationTokenUsage(TypedDict, total=False): + key "completion_tokens": Required[int] + key "prompt_tokens": Required[int] + key "total_tokens": Required[int] + completion_tokens: int + prompt_tokens: int + total_tokens: int + + + class azure.ai.projects.types.DatasetDataGenerationJobOutput(TypedDict, total=False): + key "description": str + key "id": str + key "name": str + key "type": Required[Literal[DataGenerationJobOutputType.DATASET]] + key "version": str + description: str + id: str + name: str + tags: dict[str, str] + type: Literal[DataGenerationJobOutputType.DATASET] + version: str + + + class azure.ai.projects.types.DatasetEvaluatorGenerationJobSource(TypedDict, total=False): + key "description": str + key "name": Required[str] + key "type": Required[Literal[EvaluatorGenerationJobSourceType.DATASET]] + key "version": str + description: str + name: str + type: Literal[EvaluatorGenerationJobSourceType.DATASET] + version: str + + + class azure.ai.projects.types.DatasetReference(TypedDict, total=False): + key "name": Required[str] + key "version": Required[str] + name: str + version: str + + + class azure.ai.projects.types.DatasetType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + URI_FILE = "uri_file" + URI_FOLDER = "uri_folder" + + + class azure.ai.projects.types.DeleteScopeRequest(TypedDict, total=False): + key "scope": Required[str] + scope: str + + + class azure.ai.projects.types.Dimension(TypedDict, total=False): + key "always_applicable": bool + key "description": Required[str] + key "id": Required[str] + key "weight": Required[int] + always_applicable: bool + description: str + id: str + weight: int + + + class azure.ai.projects.types.DispatchRoutineAsyncRequest(TypedDict, total=False): + payload: ForwardRef('RoutineDispatchPayload', module='types') + + + class azure.ai.projects.types.EmbeddingConfiguration(TypedDict, total=False): + key "embeddingField": Required[str] + key "modelDeploymentName": Required[str] + embedding_field: str + model_deployment_name: str + + + class azure.ai.projects.types.EmptyModelParam(TypedDict, total=False): + + + class azure.ai.projects.types.EndpointBasedEvaluatorDefinition(TypedDict, total=False): + key "connection_name": Required[str] + key "type": Required[Literal[EvaluatorDefinitionType.ENDPOINT]] + connection_name: str + data_schema: dict[str, Any] + init_parameters: dict[str, Any] + metrics: dict[str, EvaluatorMetric] + type: Literal[EvaluatorDefinitionType.ENDPOINT] + + + class azure.ai.projects.types.EntraAuthorizationScheme(TypedDict, total=False): + key "type": Required[Literal[AgentEndpointAuthorizationSchemeType.ENTRA]] + type: Literal[AgentEndpointAuthorizationSchemeType.ENTRA] + + + class azure.ai.projects.types.EvalResult(TypedDict, total=False): + key "name": Required[str] + key "passed": Required[bool] + key "score": Required[float] + key "type": Required[str] + name: str + passed: bool + score: float + type: str + + + class azure.ai.projects.types.EvalRunResultCompareItem(TypedDict, total=False): + key "deltaEstimate": Required[float] + key "pValue": Required[float] + key "treatmentEffect": Required[Union[str, TreatmentEffectType]] + key "treatmentRunId": Required[str] + key "treatmentRunSummary": Required[EvalRunResultSummary] + delta_estimate: float + p_value: float + treatment_effect: Union[str, TreatmentEffectType] + treatment_run_id: str + treatment_run_summary: EvalRunResultSummary + + + class azure.ai.projects.types.EvalRunResultComparison(TypedDict, total=False): + key "baselineRunSummary": Required[EvalRunResultSummary] + key "compareItems": Required[list[EvalRunResultCompareItem]] + key "evaluator": Required[str] + key "metric": Required[str] + key "testingCriteria": Required[str] + baseline_run_summary: EvalRunResultSummary + compare_items: list[EvalRunResultCompareItem] + evaluator: str + metric: str + testing_criteria: str + + + class azure.ai.projects.types.EvalRunResultSummary(TypedDict, total=False): + key "average": Required[float] + key "runId": Required[str] + key "sampleCount": Required[int] + key "standardDeviation": Required[float] + average: float + run_id: str + sample_count: int + standard_deviation: float + + + class azure.ai.projects.types.EvaluationComparisonInsightRequest(TypedDict, total=False): + key "baselineRunId": Required[str] + key "evalId": Required[str] + key "treatmentRunIds": Required[list[str]] + key "type": Required[Literal[InsightType.EVALUATION_COMPARISON]] + baseline_run_id: str + eval_id: str + treatment_run_ids: list[str] + type: Literal[InsightType.EVALUATION_COMPARISON] + + + class azure.ai.projects.types.EvaluationComparisonInsightResult(TypedDict, total=False): + key "comparisons": Required[list[EvalRunResultComparison]] + key "method": Required[str] + key "type": Required[Literal[InsightType.EVALUATION_COMPARISON]] + comparisons: list[EvalRunResultComparison] + method: str + type: Literal[InsightType.EVALUATION_COMPARISON] + + + class azure.ai.projects.types.EvaluationResultSample(TypedDict, total=False): + key "correlationInfo": Required[dict[str, Any]] + key "evaluationResult": Required[EvalResult] + key "features": Required[dict[str, Any]] + key "id": Required[str] + key "type": Required[Literal[SampleType.EVALUATION_RESULT_SAMPLE]] + correlation_info: dict[str, Any] + evaluation_result: EvalResult + features: dict[str, Any] + id: str + type: Literal[SampleType.EVALUATION_RESULT_SAMPLE] + + + class azure.ai.projects.types.EvaluationRule(TypedDict, total=False): + key "action": Required[EvaluationRuleAction] + key "description": str + key "displayName": str + key "enabled": Required[bool] + key "eventType": Required[Union[str, EvaluationRuleEventType]] + key "id": Required[str] + key "systemData": Required[dict[str, str]] + action: EvaluationRuleAction + description: str + display_name: str + enabled: bool + event_type: Union[str, EvaluationRuleEventType] + filter: ForwardRef('EvaluationRuleFilter', module='types') + id: str + system_data: dict[str, str] + + + class azure.ai.projects.types.EvaluationRuleActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CONTINUOUS_EVALUATION = "continuousEvaluation" + HUMAN_EVALUATION_PREVIEW = "humanEvaluationPreview" + + + class azure.ai.projects.types.EvaluationRuleFilter(TypedDict, total=False): + key "agentName": Required[str] + agent_name: str + + + class azure.ai.projects.types.EvaluationRunClusterInsightRequest(TypedDict, total=False): + key "evalId": Required[str] + key "runIds": Required[list[str]] + key "type": Required[Literal[InsightType.EVALUATION_RUN_CLUSTER_INSIGHT]] + eval_id: str + modelConfiguration: ForwardRef('InsightModelConfiguration', module='types') + model_configuration: InsightModelConfiguration + run_ids: list[str] + type: Literal[InsightType.EVALUATION_RUN_CLUSTER_INSIGHT] + + + class azure.ai.projects.types.EvaluationRunClusterInsightResult(TypedDict, total=False): + key "clusterInsight": Required[ClusterInsightResult] + key "type": Required[Literal[InsightType.EVALUATION_RUN_CLUSTER_INSIGHT]] + cluster_insight: ClusterInsightResult + type: Literal[InsightType.EVALUATION_RUN_CLUSTER_INSIGHT] + + + class azure.ai.projects.types.EvaluationScheduleTask(TypedDict, total=False): + key "evalId": Required[str] + key "evalRun": Required[dict[str, Any]] + key "type": Required[Literal[ScheduleTaskType.EVALUATION]] + configuration: dict[str, str] + eval_id: str + eval_run: dict[str, Any] + type: Literal[ScheduleTaskType.EVALUATION] + + + class azure.ai.projects.types.EvaluationTaxonomy(TypedDict, total=False): + key "description": str + key "id": str + key "name": Required[str] + key "taxonomyInput": Required[EvaluationTaxonomyInput] + key "version": Required[str] + description: str + id: str + name: str + properties: dict[str, str] + tags: dict[str, str] + taxonomyCategories: list[TaxonomyCategory] + taxonomy_categories: list[TaxonomyCategory] + taxonomy_input: EvaluationTaxonomyInput + version: str + + + class azure.ai.projects.types.EvaluationTaxonomyInput(TypedDict, total=False): + key "riskCategories": Required[list[Union[str, RiskCategory]]] + key "target": Required[EvaluationTarget] + key "type": Required[Literal[EvaluationTaxonomyInputType.AGENT]] + risk_categories: list[Union[str, RiskCategory]] + target: EvaluationTarget + type: Literal[EvaluationTaxonomyInputType.AGENT] + + + class azure.ai.projects.types.EvaluationTaxonomyInputType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AGENT = "agent" + POLICY = "policy" + + + class azure.ai.projects.types.EvaluatorCredentialRequest(TypedDict, total=False): + key "blob_uri": Required[str] + blob_uri: str + + + class azure.ai.projects.types.EvaluatorDefinitionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CODE = "code" + ENDPOINT = "endpoint" + OPENAI_GRADERS = "openai_graders" + PROMPT = "prompt" + PROMPT_AND_CODE = "prompt_and_code" + RUBRIC = "rubric" + SERVICE = "service" + + + class azure.ai.projects.types.EvaluatorGenerationArtifacts(TypedDict, total=False): + key "dataset": Required[DatasetReference] + key "kinds": Required[list[str]] + dataset: DatasetReference + kinds: list[str] + + + class azure.ai.projects.types.EvaluatorGenerationInputs(TypedDict, total=False): + key "evaluator_description": str + key "evaluator_display_name": str + key "evaluator_name": Required[str] + key "model": Required[str] + key "sources": Required[list[EvaluatorGenerationJobSource]] + evaluator_description: str + evaluator_display_name: str + evaluator_name: str + model: str + sources: list[EvaluatorGenerationJobSource] + + + class azure.ai.projects.types.EvaluatorGenerationJob(TypedDict, total=False): + key "created_at": Required[int] + key "finished_at": int + key "id": Required[str] + key "status": Required[Union[str, JobStatus]] + created_at: int + error: ForwardRef('ApiError', module='types') + finished_at: int + id: str + inputs: ForwardRef('EvaluatorGenerationInputs', module='types') + result: ForwardRef('EvaluatorVersion', module='types') + status: Union[str, JobStatus] + usage: ForwardRef('EvaluatorGenerationTokenUsage', module='types') + + + class azure.ai.projects.types.EvaluatorGenerationJobSourceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AGENT = "agent" + DATASET = "dataset" + PROMPT = "prompt" + TRACES = "traces" + + + class azure.ai.projects.types.EvaluatorGenerationTokenUsage(TypedDict, total=False): + key "input_tokens": Required[int] + key "output_tokens": Required[int] + key "total_tokens": Required[int] + input_tokens: int + output_tokens: int + total_tokens: int + + + class azure.ai.projects.types.EvaluatorMetric(TypedDict, total=False): + key "desirable_direction": Union[str, EvaluatorMetricDirection] + key "is_primary": bool + key "max_value": float + key "min_value": float + key "threshold": float + key "type": Union[str, EvaluatorMetricType] + desirable_direction: Union[str, EvaluatorMetricDirection] + is_primary: bool + max_value: float + min_value: float + threshold: float + type: Union[str, EvaluatorMetricType] + + + class azure.ai.projects.types.EvaluatorVersion(TypedDict, total=False): + key "categories": Required[list[Union[str, EvaluatorCategory]]] + key "created_at": Required[str] + key "created_by": Required[str] + key "definition": Required[EvaluatorDefinition] + key "description": str + key "display_name": str + key "evaluator_type": Required[Union[str, EvaluatorType]] + key "id": str + key "modified_at": Required[str] + key "name": Required[str] + key "version": Required[str] + categories: list[Union[str, EvaluatorCategory]] + created_at: str + created_by: str + definition: EvaluatorDefinition + description: str + display_name: str + evaluator_type: Union[str, EvaluatorType] + generation_artifacts: ForwardRef('EvaluatorGenerationArtifacts', module='types') + id: str + metadata: dict[str, str] + modified_at: str + name: str + supported_evaluation_levels: list[Union[str, EvaluationLevel]] + tags: dict[str, str] + version: str + + + class azure.ai.projects.types.ExternalAgentDefinition(TypedDict, total=False): + key "kind": Required[Literal[AgentKind.EXTERNAL]] + key "otel_agent_id": str + kind: Literal[AgentKind.EXTERNAL] + otel_agent_id: str + rai_config: ForwardRef('RaiConfig', module='types') + + + class azure.ai.projects.types.FabricDataAgentToolParameters(TypedDict, total=False): + project_connections: list[ToolProjectConnection] + + + class azure.ai.projects.types.FabricIQPreviewTool(TypedDict, total=False): + key "project_connection_id": Required[str] + key "require_approval": Optional[Union[MCPToolRequireApproval, str]] + key "server_label": str + key "server_url": str + key "type": Required[Literal[ToolType.FABRIC_IQ_PREVIEW]] + project_connection_id: str + require_approval: Union[MCPToolRequireApproval, str] + server_label: str + server_url: str + type: Literal[ToolType.FABRIC_IQ_PREVIEW] + + + class azure.ai.projects.types.FabricIQPreviewToolboxTool(TypedDict, total=False): + key "description": str + key "name": str + key "project_connection_id": Required[str] + key "require_approval": Optional[Union[MCPToolRequireApproval, str]] + key "server_label": str + key "server_url": str + key "type": Required[Literal[ToolboxToolType.FABRIC_IQ_PREVIEW]] + description: str + name: str + project_connection_id: str + require_approval: Union[MCPToolRequireApproval, str] + server_label: str + server_url: str + tool_configs: dict[str, ToolConfig] + type: Literal[ToolboxToolType.FABRIC_IQ_PREVIEW] + + + class azure.ai.projects.types.FieldMapping(TypedDict, total=False): + key "contentFields": Required[list[str]] + key "filepathField": str + key "titleField": str + key "urlField": str + content_fields: list[str] + filepath_field: str + metadataFields: list[str] + metadata_fields: list[str] + title_field: str + url_field: str + vectorFields: list[str] + vector_fields: list[str] + + + class azure.ai.projects.types.FileDataGenerationJobOutput(TypedDict, total=False): + key "filename": Required[str] + key "id": Required[str] + key "type": Required[Literal[DataGenerationJobOutputType.FILE]] + filename: str + id: str + type: Literal[DataGenerationJobOutputType.FILE] + + + class azure.ai.projects.types.FileDataGenerationJobSource(TypedDict, total=False): + key "description": str + key "id": Required[str] + key "type": Required[Literal[DataGenerationJobSourceType.FILE]] + description: str + id: str + type: Literal[DataGenerationJobSourceType.FILE] + + + class azure.ai.projects.types.FileDatasetVersion(TypedDict, total=False): + key "connectionName": str + key "dataUri": Required[str] + key "description": str + key "id": str + key "isReference": bool + key "name": Required[str] + key "type": Required[Literal[DatasetType.URI_FILE]] + key "version": Required[str] + connection_name: str + data_uri: str + description: str + id: str + is_reference: bool + name: str + tags: dict[str, str] + type: Literal[DatasetType.URI_FILE] + version: str + + + class azure.ai.projects.types.FileSearchTool(TypedDict, total=False): + key "description": str + key "filters": Optional[Filters] + key "max_num_results": int + key "name": str + key "type": Required[Literal[ToolType.FILE_SEARCH]] + key "vector_store_ids": Required[list[str]] + description: str + filters: Filters + max_num_results: int + name: str + ranking_options: ForwardRef('RankingOptions', module='types') + tool_configs: dict[str, ToolConfig] + type: Literal[ToolType.FILE_SEARCH] + vector_store_ids: list[str] + + + class azure.ai.projects.types.FileSearchToolboxTool(TypedDict, total=False): + key "description": str + key "filters": Optional[Filters] + key "max_num_results": int + key "name": str + key "type": Required[Literal[ToolboxToolType.FILE_SEARCH]] + description: str + filters: Filters + max_num_results: int + name: str + ranking_options: ForwardRef('RankingOptions', module='types') + tool_configs: dict[str, ToolConfig] + type: Literal[ToolboxToolType.FILE_SEARCH] + vector_store_ids: list[str] + + + class azure.ai.projects.types.FixedRatioVersionSelectionRule(TypedDict, total=False): + key "agent_version": Required[str] + key "traffic_percentage": Required[int] + key "type": Required[Literal[VersionSelectorType.FIXED_RATIO]] + agent_version: str + traffic_percentage: int + type: Literal[VersionSelectorType.FIXED_RATIO] + + + class azure.ai.projects.types.FolderDatasetVersion(TypedDict, total=False): + key "connectionName": str + key "dataUri": Required[str] + key "description": str + key "id": str + key "isReference": bool + key "name": Required[str] + key "type": Required[Literal[DatasetType.URI_FOLDER]] + key "version": Required[str] + connection_name: str + data_uri: str + description: str + id: str + is_reference: bool + name: str + tags: dict[str, str] + type: Literal[DatasetType.URI_FOLDER] + version: str + + + class azure.ai.projects.types.FoundryModelWarning(TypedDict, total=False): + key "code": Union[str, FoundryModelWarningCode] + key "message": str + code: Union[str, FoundryModelWarningCode] + message: str + + + class azure.ai.projects.types.FunctionShellToolParam(TypedDict, total=False): + key "description": str + key "environment": Optional[FunctionShellToolParamEnvironment] + key "name": str + key "type": Required[Literal[ToolType.SHELL]] + description: str + environment: FunctionShellToolParamEnvironment + name: str + tool_configs: dict[str, ToolConfig] + type: Literal[ToolType.SHELL] + + + class azure.ai.projects.types.FunctionShellToolParamEnvironmentContainerReferenceParam(TypedDict, total=False): + key "container_id": Required[str] + key "type": Required[Literal[FunctionShellToolParamEnvironmentType.CONTAINER_REFERENCE]] + container_id: str + type: Literal[FunctionShellToolParamEnvironmentType.CONTAINER_REFERENCE] + + + class azure.ai.projects.types.FunctionShellToolParamEnvironmentLocalEnvironmentParam(TypedDict, total=False): + key "type": Required[Literal[FunctionShellToolParamEnvironmentType.LOCAL]] + skills: list[LocalSkillParam] + type: Literal[FunctionShellToolParamEnvironmentType.LOCAL] + + + class azure.ai.projects.types.FunctionShellToolParamEnvironmentType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CONTAINER_AUTO = "container_auto" + CONTAINER_REFERENCE = "container_reference" + LOCAL = "local" + + + class azure.ai.projects.types.FunctionTool(TypedDict, total=False): + key "defer_loading": bool + key "description": Optional[str] + key "name": Required[str] + key "parameters": Required[Optional[dict[str, Any]]] + key "strict": Required[Optional[bool]] + key "type": Required[Literal[ToolType.FUNCTION]] + defer_loading: bool + description: str + name: str + parameters: dict[str, Any] + strict: bool + type: Literal[ToolType.FUNCTION] + + + class azure.ai.projects.types.FunctionToolParam(TypedDict, total=False): + key "defer_loading": bool + key "description": Optional[str] + key "name": Required[str] + key "parameters": Optional[EmptyModelParam] + key "strict": Optional[bool] + key "type": Required[Literal["function"]] + defer_loading: bool + description: str + name: str + parameters: EmptyModelParam + strict: bool + type: Literal[function] + + + class azure.ai.projects.types.GitHubIssueRoutineTrigger(TypedDict, total=False): + key "connection_id": Required[str] + key "issue_event": Required[Union[str, GitHubIssueEvent]] + key "owner": Required[str] + key "repository": Required[str] + key "type": Required[Literal[RoutineTriggerType.GITHUB_ISSUE]] + connection_id: str + issue_event: Union[str, GitHubIssueEvent] + owner: str + repository: str + type: Literal[RoutineTriggerType.GITHUB_ISSUE] + + + class azure.ai.projects.types.HeaderTelemetryEndpointAuth(TypedDict, total=False): + key "header_name": Required[str] + key "secret_id": Required[str] + key "secret_key": Required[str] + key "type": Required[Literal[TelemetryEndpointAuthType.HEADER]] + header_name: str + secret_id: str + secret_key: str + type: Literal[TelemetryEndpointAuthType.HEADER] + + + class azure.ai.projects.types.HostedAgentDefinition(TypedDict, total=False): + key "cpu": Required[str] + key "kind": Required[Literal[AgentKind.HOSTED]] + key "memory": Required[str] + code_configuration: ForwardRef('CodeConfiguration', module='types') + container_configuration: ForwardRef('ContainerConfiguration', module='types') + cpu: str + environment_variables: dict[str, str] + kind: Literal[AgentKind.HOSTED] + memory: str + protocol_versions: list[ProtocolVersionRecord] + rai_config: ForwardRef('RaiConfig', module='types') + telemetry_config: ForwardRef('TelemetryConfig', module='types') + + + class azure.ai.projects.types.HourlyRecurrenceSchedule(TypedDict, total=False): + key "type": Required[Literal[RecurrenceType.HOURLY]] + type: Literal[RecurrenceType.HOURLY] + + + class azure.ai.projects.types.HumanEvaluationPreviewRuleAction(TypedDict, total=False): + key "templateId": Required[str] + key "type": Required[Literal[EvaluationRuleActionType.HUMAN_EVALUATION_PREVIEW]] + template_id: str + type: Literal[EvaluationRuleActionType.HUMAN_EVALUATION_PREVIEW] + + + class azure.ai.projects.types.HybridSearchOptions(TypedDict, total=False): + key "embedding_weight": Required[float] + key "text_weight": Required[float] + embedding_weight: float + text_weight: float + + + class azure.ai.projects.types.ImageGenTool(TypedDict, total=False): + key "action": Union[str, ImageGenAction] + key "background": Literal["transparent", "opaque", "auto"] + key "description": str + key "input_fidelity": Optional[Union[str, InputFidelity]] + key "model": Union[Literal["gpt-image-1"], Literal["gpt-image-1-mini"], Literal["gpt-image-5"], str] + key "moderation": Literal["auto", "low"] + key "name": str + key "output_compression": int + key "output_format": Literal["png", "webp", "jpeg"] + key "partial_images": int + key "quality": Literal["low", "medium", "high", "auto"] + key "size": Union[Literal["1024x1024"], Literal["1024x1536"], Literal["1536x1024"], Literal["auto"], str] + key "type": Required[Literal[ToolType.IMAGE_GENERATION]] + action: Union[str, ImageGenAction] + background: Literal[transparent, opaque, auto] + description: str + input_fidelity: Union[str, InputFidelity] + input_image_mask: ForwardRef('ImageGenToolInputImageMask', module='types') + model: Union[Literal[gpt-image-1], Literal[gpt-image-1-mini], Literal[gpt-image-5], str] + moderation: Literal[auto, low] + name: str + output_compression: int + output_format: Literal[png, webp, jpeg] + partial_images: int + quality: Literal[low, medium, high, auto] + size: Union[Literal[1024x1024], Literal[1024x1536], Literal[1536x1024], Literal[auto], str] + tool_configs: dict[str, ToolConfig] + type: Literal[ToolType.IMAGE_GENERATION] + + + class azure.ai.projects.types.ImageGenToolInputImageMask(TypedDict, total=False): + key "file_id": str + key "image_url": str + file_id: str + image_url: str + + + class azure.ai.projects.types.IndexType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AZURE_SEARCH = "AzureSearch" + COSMOS_DB = "CosmosDBNoSqlVectorStore" + MANAGED_AZURE_SEARCH = "ManagedAzureSearch" + + + class azure.ai.projects.types.InlineSkillParam(TypedDict, total=False): + key "description": Required[str] + key "name": Required[str] + key "source": Required[InlineSkillSourceParam] + key "type": Required[Literal[ContainerSkillType.INLINE]] + description: str + name: str + source: InlineSkillSourceParam + type: Literal[ContainerSkillType.INLINE] + + + class azure.ai.projects.types.InlineSkillSourceParam(TypedDict, total=False): + key "data": Required[str] + key "media_type": Required[Literal["application/zip"]] + key "type": Required[Literal["base64"]] + data: str + media_type: Literal[application/zip] + type: Literal[base64] + + + class azure.ai.projects.types.Insight(TypedDict, total=False): + key "displayName": Required[str] + key "id": Required[str] + key "metadata": Required[InsightsMetadata] + key "request": Required[InsightRequest] + key "state": Required[Union[str, OperationState]] + display_name: str + insight_id: str + metadata: InsightsMetadata + request: InsightRequest + result: ForwardRef('InsightResult', module='types') + state: Union[str, OperationState] + + + class azure.ai.projects.types.InsightCluster(TypedDict, total=False): + key "description": Required[str] + key "id": Required[str] + key "label": Required[str] + key "suggestion": Required[str] + key "suggestionTitle": Required[str] + key "weight": Required[int] + description: str + id: str + label: str + samples: list[InsightSample] + subClusters: list[InsightCluster] + sub_clusters: list[InsightCluster] + suggestion: str + suggestion_title: str + weight: int + + + class azure.ai.projects.types.InsightModelConfiguration(TypedDict, total=False): + key "modelDeploymentName": Required[str] + model_deployment_name: str + + + class azure.ai.projects.types.InsightSample(TypedDict, total=False): + key "correlationInfo": Required[dict[str, Any]] + key "evaluationResult": Required[EvalResult] + key "features": Required[dict[str, Any]] + key "id": Required[str] + key "type": Required[Literal[SampleType.EVALUATION_RESULT_SAMPLE]] + correlation_info: dict[str, Any] + evaluation_result: EvalResult + features: dict[str, Any] + id: str + type: Literal[SampleType.EVALUATION_RESULT_SAMPLE] + + + class azure.ai.projects.types.InsightScheduleTask(TypedDict, total=False): + key "insight": Required[Insight] + key "type": Required[Literal[ScheduleTaskType.INSIGHT]] + configuration: dict[str, str] + insight: Insight + type: Literal[ScheduleTaskType.INSIGHT] + + + class azure.ai.projects.types.InsightSummary(TypedDict, total=False): + key "method": Required[str] + key "sampleCount": Required[int] + key "uniqueClusterCount": Required[int] + key "uniqueSubclusterCount": Required[int] + key "usage": Required[ClusterTokenUsage] + method: str + sample_count: int + unique_cluster_count: int + unique_subcluster_count: int + usage: ClusterTokenUsage + + + class azure.ai.projects.types.InsightType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AGENT_CLUSTER_INSIGHT = "AgentClusterInsight" + EVALUATION_COMPARISON = "EvaluationComparison" + EVALUATION_RUN_CLUSTER_INSIGHT = "EvaluationRunClusterInsight" + + + class azure.ai.projects.types.InsightsMetadata(TypedDict, total=False): + key "completedAt": str + key "createdAt": Required[str] + completed_at: str + created_at: str + + + class azure.ai.projects.types.InvocationsProtocolConfiguration(TypedDict, total=False): + + + class azure.ai.projects.types.InvocationsWsProtocolConfiguration(TypedDict, total=False): + + + class azure.ai.projects.types.InvokeAgentInvocationsApiDispatchPayload(TypedDict, total=False): + key "input": Required[Any] + key "type": Required[Literal[RoutineDispatchPayloadType.INVOKE_AGENT_INVOCATIONS_API]] + input: Any + type: Literal[RoutineDispatchPayloadType.INVOKE_AGENT_INVOCATIONS_API] + + + class azure.ai.projects.types.InvokeAgentInvocationsApiRoutineAction(TypedDict, total=False): + key "agent_endpoint_id": str + key "agent_name": str + key "input": Any + key "session_id": str + key "type": Required[Literal[RoutineActionType.INVOKE_AGENT_INVOCATIONS_API]] + agent_endpoint_id: str + agent_name: str + input: Any + session_id: str + type: Literal[RoutineActionType.INVOKE_AGENT_INVOCATIONS_API] + + + class azure.ai.projects.types.InvokeAgentResponsesApiDispatchPayload(TypedDict, total=False): + key "input": Required[Any] + key "type": Required[Literal[RoutineDispatchPayloadType.INVOKE_AGENT_RESPONSES_API]] + input: Any + type: Literal[RoutineDispatchPayloadType.INVOKE_AGENT_RESPONSES_API] + + + class azure.ai.projects.types.InvokeAgentResponsesApiRoutineAction(TypedDict, total=False): + key "agent_endpoint_id": str + key "agent_name": str + key "conversation": str + key "input": Any + key "type": Required[Literal[RoutineActionType.INVOKE_AGENT_RESPONSES_API]] + agent_endpoint_id: str + agent_name: str + conversation: str + input: Any + type: Literal[RoutineActionType.INVOKE_AGENT_RESPONSES_API] + + + class azure.ai.projects.types.ListMemoriesRequest(TypedDict, total=False): + key "scope": Required[str] + scope: str + + + class azure.ai.projects.types.LocalShellToolParam(TypedDict, total=False): + key "description": str + key "name": str + key "type": Required[Literal[ToolType.LOCAL_SHELL]] + description: str + name: str + tool_configs: dict[str, ToolConfig] + type: Literal[ToolType.LOCAL_SHELL] + + + class azure.ai.projects.types.LocalSkillParam(TypedDict, total=False): + key "description": Required[str] + key "name": Required[str] + key "path": Required[str] + description: str + name: str + path: str + + + class azure.ai.projects.types.LoraConfig(TypedDict, total=False): + key "alpha": int + key "dropout": float + key "rank": int + alpha: int + dropout: float + rank: int + targetModules: list[str] + target_modules: list[str] + + + class azure.ai.projects.types.MCPTool(TypedDict, total=False): + key "allowed_tools": Optional[Union[list[str], MCPToolFilter]] + key "authorization": str + key "connector_id": Literal["connector_dropbox", "connector_gmail", "connector_googlecalendar", "connector_googledrive", "connector_microsoftteams", "connector_outlookcalendar", "connector_outlookemail", "connector_sharepoint"] + key "defer_loading": bool + key "headers": Optional[dict[str, str]] + key "project_connection_id": str + key "require_approval": Optional[Union[MCPToolRequireApproval, Literal["always"], Literal["never"]]] + key "server_description": str + key "server_label": Required[str] + key "server_url": str + key "tunnel_id": str + key "type": Required[Literal[ToolType.MCP]] + allowed_tools: Union[list[str], MCPToolFilter] + authorization: str + connector_id: Literal[connector_dropbox, connector_gmail, connector_googlecalendar, connector_googledrive, connector_microsoftteams, + defer_loading: bool + headers: dict[str, str] + project_connection_id: str + require_approval: Union[MCPToolRequireApproval, Literal[always], Literal[never]] + server_description: str + server_label: str + server_url: str + tool_configs: dict[str, ToolConfig] + tunnel_id: str + type: Literal[ToolType.MCP] + + + class azure.ai.projects.types.MCPToolFilter(TypedDict, total=False): + key "read_only": bool + read_only: bool + tool_names: list[str] + + + class azure.ai.projects.types.MCPToolRequireApproval(TypedDict, total=False): + always: ForwardRef('MCPToolFilter', module='types') + never: ForwardRef('MCPToolFilter', module='types') + + + class azure.ai.projects.types.MCPToolboxTool(TypedDict, total=False): + key "allowed_tools": Optional[Union[list[str], MCPToolFilter]] + key "authorization": str + key "connector_id": Literal["connector_dropbox", "connector_gmail", "connector_googlecalendar", "connector_googledrive", "connector_microsoftteams", "connector_outlookcalendar", "connector_outlookemail", "connector_sharepoint"] + key "defer_loading": bool + key "description": str + key "headers": Optional[dict[str, str]] + key "name": str + key "project_connection_id": str + key "require_approval": Optional[Union[MCPToolRequireApproval, Literal["always"], Literal["never"]]] + key "server_description": str + key "server_label": Required[str] + key "server_url": str + key "tunnel_id": str + key "type": Required[Literal[ToolboxToolType.MCP]] + allowed_tools: Union[list[str], MCPToolFilter] + authorization: str + connector_id: Literal[connector_dropbox, connector_gmail, connector_googlecalendar, connector_googledrive, connector_microsoftteams, + defer_loading: bool + description: str + headers: dict[str, str] + name: str + project_connection_id: str + require_approval: Union[MCPToolRequireApproval, Literal[always], Literal[never]] + server_description: str + server_label: str + server_url: str + tool_configs: dict[str, ToolConfig] + tunnel_id: str + type: Literal[ToolboxToolType.MCP] + + + class azure.ai.projects.types.ManagedAgentIdentityBlueprintReference(TypedDict, total=False): + key "blueprint_id": Required[str] + key "type": Required[Literal[AgentBlueprintReferenceType.MANAGED_AGENT_IDENTITY_BLUEPRINT]] + blueprint_id: str + type: Literal[AgentBlueprintReferenceType.MANAGED_AGENT_IDENTITY_BLUEPRINT] + + + class azure.ai.projects.types.ManagedAzureAISearchIndex(TypedDict, total=False): + key "description": str + key "id": str + key "name": Required[str] + key "type": Required[Literal[IndexType.MANAGED_AZURE_SEARCH]] + key "vectorStoreId": Required[str] + key "version": Required[str] + description: str + id: str + name: str + tags: dict[str, str] + type: Literal[IndexType.MANAGED_AZURE_SEARCH] + vector_store_id: str + version: str + + + class azure.ai.projects.types.McpProtocolConfiguration(TypedDict, total=False): + + + class azure.ai.projects.types.MemorySearchOptions(TypedDict, total=False): + key "max_memories": int + max_memories: int + + + class azure.ai.projects.types.MemorySearchPreviewTool(TypedDict, total=False): + key "memory_store_name": Required[str] + key "scope": Required[str] + key "type": Required[Literal[ToolType.MEMORY_SEARCH_PREVIEW]] + key "update_delay": int + memory_store_name: str + scope: str + search_options: ForwardRef('MemorySearchOptions', module='types') + type: Literal[ToolType.MEMORY_SEARCH_PREVIEW] + update_delay: int + + + class azure.ai.projects.types.MemoryStoreDefaultDefinition(TypedDict, total=False): + key "chat_model": Required[str] + key "embedding_model": Required[str] + key "kind": Required[Literal[MemoryStoreKind.DEFAULT]] + chat_model: str + embedding_model: str + kind: Literal[MemoryStoreKind.DEFAULT] + options: ForwardRef('MemoryStoreDefaultOptions', module='types') + + + class azure.ai.projects.types.MemoryStoreDefaultOptions(TypedDict, total=False): + key "chat_summary_enabled": Required[bool] + key "default_ttl_seconds": str + key "procedural_memory_enabled": bool + key "user_profile_details": str + key "user_profile_enabled": Required[bool] + chat_summary_enabled: bool + default_ttl_seconds: str + procedural_memory_enabled: bool + user_profile_details: str + user_profile_enabled: bool + + + class azure.ai.projects.types.MemoryStoreDefinition(TypedDict, total=False): + key "chat_model": Required[str] + key "embedding_model": Required[str] + key "kind": Required[Literal[MemoryStoreKind.DEFAULT]] + chat_model: str + embedding_model: str + kind: Literal[MemoryStoreKind.DEFAULT] + options: ForwardRef('MemoryStoreDefaultOptions', module='types') + + + class azure.ai.projects.types.MemoryStoreKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DEFAULT = "default" + + + class azure.ai.projects.types.MicrosoftFabricPreviewTool(TypedDict, total=False): + key "fabric_dataagent_preview": Required[FabricDataAgentToolParameters] + key "type": Required[Literal[ToolType.FABRIC_DATAAGENT_PREVIEW]] + fabric_dataagent_preview: FabricDataAgentToolParameters + type: Literal[ToolType.FABRIC_DATAAGENT_PREVIEW] + + + class azure.ai.projects.types.ModelCredentialRequest(TypedDict, total=False): + key "blobUri": Required[str] + blob_uri: str + + + class azure.ai.projects.types.ModelPendingUploadRequest(TypedDict, total=False): + key "connectionName": str + key "pendingUploadId": str + key "pendingUploadType": Required[Literal[PendingUploadType.TEMPORARY_BLOB_REFERENCE]] + connection_name: str + pending_upload_id: str + pending_upload_type: Literal[PendingUploadType.TEMPORARY_BLOB_REFERENCE] + + + class azure.ai.projects.types.ModelSamplingParams(TypedDict, total=False): + key "max_completion_tokens": int + key "seed": int + key "temperature": float + key "top_p": float + max_completion_tokens: int + seed: int + temperature: float + top_p: float + + + class azure.ai.projects.types.ModelSourceData(TypedDict, total=False): + key "jobId": str + key "sourceType": Union[str, FoundryModelSourceType] + job_id: str + source_type: Union[str, FoundryModelSourceType] + + + class azure.ai.projects.types.ModelVersion(TypedDict, total=False): + key "baseModel": str + key "blobUri": Required[str] + key "description": str + key "id": str + key "name": Required[str] + key "version": Required[str] + key "weightType": Union[str, FoundryModelWeightType] + artifactProfile: ForwardRef('ArtifactProfile', module='types') + artifact_profile: ArtifactProfile + base_model: str + blob_uri: str + description: str + id: str + loraConfig: ForwardRef('LoraConfig', module='types') + lora_config: LoraConfig + name: str + source: ForwardRef('ModelSourceData', module='types') + tags: dict[str, str] + version: str + warnings: list[FoundryModelWarning] + weight_type: Union[str, FoundryModelWeightType] + + + class azure.ai.projects.types.MonthlyRecurrenceSchedule(TypedDict, total=False): + key "daysOfMonth": Required[list[int]] + key "type": Required[Literal[RecurrenceType.MONTHLY]] + days_of_month: list[int] + type: Literal[RecurrenceType.MONTHLY] + + + class azure.ai.projects.types.NamespaceToolParam(TypedDict, total=False): + key "description": Required[str] + key "name": Required[str] + key "tools": Required[list[Union[FunctionToolParam, CustomToolParam]]] + key "type": Required[Literal[ToolType.NAMESPACE]] + description: str + name: str + tools: list[Union[FunctionToolParam, CustomToolParam]] + type: Literal[ToolType.NAMESPACE] + + + class azure.ai.projects.types.OneTimeTrigger(TypedDict, total=False): + key "timeZone": str + key "triggerAt": Required[str] + key "type": Required[Literal[TriggerType.ONE_TIME]] + time_zone: str + trigger_at: str + type: Literal[TriggerType.ONE_TIME] + + + class azure.ai.projects.types.OpenApiAnonymousAuthDetails(TypedDict, total=False): + key "type": Required[Literal[OpenApiAuthType.ANONYMOUS]] + type: Literal[OpenApiAuthType.ANONYMOUS] + + + class azure.ai.projects.types.OpenApiAuthType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ANONYMOUS = "anonymous" + MANAGED_IDENTITY = "managed_identity" + PROJECT_CONNECTION = "project_connection" + + + class azure.ai.projects.types.OpenApiFunctionDefinition(TypedDict, total=False): + key "auth": Required[OpenApiAuthDetails] + key "description": str + key "name": Required[str] + key "spec": Required[dict[str, Any]] + auth: OpenApiAuthDetails + default_params: list[str] + description: str + functions: list[OpenApiFunctionDefinitionFunction] + name: str + spec: dict[str, Any] + + + class azure.ai.projects.types.OpenApiFunctionDefinitionFunction(TypedDict, total=False): + key "description": str + key "name": Required[str] + key "parameters": Required[dict[str, Any]] + description: str + name: str + parameters: dict[str, Any] + + + class azure.ai.projects.types.OpenApiManagedAuthDetails(TypedDict, total=False): + key "security_scheme": Required[OpenApiManagedSecurityScheme] + key "type": Required[Literal[OpenApiAuthType.MANAGED_IDENTITY]] + security_scheme: OpenApiManagedSecurityScheme + type: Literal[OpenApiAuthType.MANAGED_IDENTITY] + + + class azure.ai.projects.types.OpenApiManagedSecurityScheme(TypedDict, total=False): + key "audience": Required[str] + audience: str + + + class azure.ai.projects.types.OpenApiProjectConnectionAuthDetails(TypedDict, total=False): + key "security_scheme": Required[OpenApiProjectConnectionSecurityScheme] + key "type": Required[Literal[OpenApiAuthType.PROJECT_CONNECTION]] + security_scheme: OpenApiProjectConnectionSecurityScheme + type: Literal[OpenApiAuthType.PROJECT_CONNECTION] + + + class azure.ai.projects.types.OpenApiProjectConnectionSecurityScheme(TypedDict, total=False): + key "project_connection_id": Required[str] + project_connection_id: str + + + class azure.ai.projects.types.OpenApiTool(TypedDict, total=False): + key "openapi": Required[OpenApiFunctionDefinition] + key "type": Required[Literal[ToolType.OPENAPI]] + openapi: OpenApiFunctionDefinition + tool_configs: dict[str, ToolConfig] + type: Literal[ToolType.OPENAPI] + + + class azure.ai.projects.types.OpenApiToolboxTool(TypedDict, total=False): + key "description": str + key "name": str + key "openapi": Required[OpenApiFunctionDefinition] + key "type": Required[Literal[ToolboxToolType.OPENAPI]] + description: str + name: str + openapi: OpenApiFunctionDefinition + tool_configs: dict[str, ToolConfig] + type: Literal[ToolboxToolType.OPENAPI] + + + class azure.ai.projects.types.OptimizationAgentIdentifier(TypedDict, total=False): + key "agent_name": Required[str] + key "agent_version": str + agent_name: str + agent_version: str + + + class azure.ai.projects.types.OptimizationCandidate(TypedDict, total=False): + key "avg_score": Required[float] + key "avg_tokens": Required[float] + key "candidate_id": str + key "eval_id": str + key "eval_run_id": str + key "name": Required[str] + avg_score: float + avg_tokens: float + candidate_id: str + eval_id: str + eval_run_id: str + mutations: dict[str, Any] + name: str + promotion: ForwardRef('PromotionInfo', module='types') + + + class azure.ai.projects.types.OptimizationDatasetCriterion(TypedDict, total=False): + key "instruction": Required[str] + key "name": Required[str] + instruction: str + name: str + + + class azure.ai.projects.types.OptimizationDatasetInputType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + INLINE = "inline" + REFERENCE = "reference" + + + class azure.ai.projects.types.OptimizationDatasetItem(TypedDict, total=False): + key "desired_num_turns": int + key "ground_truth": str + key "query": str + criteria: list[OptimizationDatasetCriterion] + desired_num_turns: int + ground_truth: str + query: str + + + class azure.ai.projects.types.OptimizationEvaluatorRef(TypedDict, total=False): + key "name": Required[str] + key "version": str + name: str + version: str + + + class azure.ai.projects.types.OptimizationInlineDatasetInput(TypedDict, total=False): + key "items": Required[list[OptimizationDatasetItem]] + key "type": Required[Literal[OptimizationDatasetInputType.INLINE]] + dataset_items: list[OptimizationDatasetItem] + type: Literal[OptimizationDatasetInputType.INLINE] + + + class azure.ai.projects.types.OptimizationJob(TypedDict, total=False): + key "created_at": Required[int] + key "id": Required[str] + key "status": Required[Union[str, JobStatus]] + key "updated_at": Required[int] + created_at: int + error: ForwardRef('ApiError', module='types') + id: str + inputs: ForwardRef('OptimizationJobInputs', module='types') + progress: ForwardRef('OptimizationJobProgress', module='types') + result: ForwardRef('OptimizationJobResult', module='types') + status: Union[str, JobStatus] + updated_at: int + warnings: list[str] + + + class azure.ai.projects.types.OptimizationJobInputs(TypedDict, total=False): + key "agent": Required[OptimizationAgentIdentifier] + key "evaluators": Required[list[OptimizationEvaluatorRef]] + key "train_dataset": Required[OptimizationDatasetInput] + agent: OptimizationAgentIdentifier + evaluators: list[OptimizationEvaluatorRef] + options: ForwardRef('OptimizationOptions', module='types') + train_dataset: OptimizationDatasetInput + validation_dataset: ForwardRef('OptimizationDatasetInput', module='types') + + + class azure.ai.projects.types.OptimizationJobProgress(TypedDict, total=False): + key "best_score": Required[float] + key "candidates_completed": Required[int] + key "elapsed_seconds": Required[float] + best_score: float + candidates_completed: int + elapsed_seconds: float + + + class azure.ai.projects.types.OptimizationJobResult(TypedDict, total=False): + key "baseline": str + key "best": str + baseline: str + best: str + candidates: list[OptimizationCandidate] + + + class azure.ai.projects.types.OptimizationOptions(TypedDict, total=False): + key "eval_model": str + key "evaluation_level": Union[str, EvaluationLevel] + key "max_candidates": int + key "optimization_model": str + eval_model: str + evaluation_level: Union[str, EvaluationLevel] + max_candidates: int + optimization_config: dict[str, Any] + optimization_model: str + + + class azure.ai.projects.types.OptimizationReferenceDatasetInput(TypedDict, total=False): + key "name": Required[str] + key "type": Required[Literal[OptimizationDatasetInputType.REFERENCE]] + key "version": str + name: str + type: Literal[OptimizationDatasetInputType.REFERENCE] + version: str + + + class azure.ai.projects.types.OtlpTelemetryEndpoint(TypedDict, total=False): + key "data": Required[list[Union[str, TelemetryDataKind]]] + key "endpoint": Required[str] + key "kind": Required[Literal[TelemetryEndpointKind.OTLP]] + key "protocol": Required[Union[str, TelemetryTransportProtocol]] + auth: ForwardRef('TelemetryEndpointAuth', module='types') + data: list[Union[str, TelemetryDataKind]] + endpoint: str + kind: Literal[TelemetryEndpointKind.OTLP] + protocol: Union[str, TelemetryTransportProtocol] + + + class azure.ai.projects.types.PatchAgentObjectRequest(TypedDict, total=False): + agent_card: ForwardRef('AgentCard', module='types') + agent_endpoint: ForwardRef('AgentEndpointConfig', module='types') + + + class azure.ai.projects.types.PendingUploadRequest(TypedDict, total=False): + key "connectionName": str + key "pendingUploadId": str + key "pendingUploadType": Required[Literal[PendingUploadType.BLOB_REFERENCE]] + connection_name: str + pending_upload_id: str + pending_upload_type: Literal[PendingUploadType.BLOB_REFERENCE] + + + class azure.ai.projects.types.PendingUploadType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + BLOB_REFERENCE = "BlobReference" + NONE = "None" + TEMPORARY_BLOB_REFERENCE = "TemporaryBlobReference" + + + class azure.ai.projects.types.PromotionInfo(TypedDict, total=False): + key "agent_name": Required[str] + key "agent_version": Required[str] + key "promoted_at": Required[int] + agent_name: str + agent_version: str + promoted_at: int + + + class azure.ai.projects.types.PromptAgentDefinition(TypedDict, total=False): + key "instructions": Optional[str] + key "kind": Required[Literal[AgentKind.PROMPT]] + key "model": Required[str] + key "reasoning": Optional[Reasoning] + key "temperature": Optional[float] + key "tool_choice": Union[str, ToolChoiceParam] + key "top_p": Optional[float] + instructions: str + kind: Literal[AgentKind.PROMPT] + model: str + rai_config: ForwardRef('RaiConfig', module='types') + reasoning: Reasoning + structured_inputs: dict[str, StructuredInputDefinition] + temperature: float + text: ForwardRef('PromptAgentDefinitionTextOptions', module='types') + tool_choice: Union[str, ToolChoiceParam] + tools: list[Tool] + top_p: float + + + class azure.ai.projects.types.PromptAgentDefinitionTextOptions(TypedDict, total=False): + format: ForwardRef('TextResponseFormat', module='types') + + + class azure.ai.projects.types.PromptBasedEvaluatorDefinition(TypedDict, total=False): + key "prompt_text": Required[str] + key "type": Required[Literal[EvaluatorDefinitionType.PROMPT]] + data_schema: dict[str, Any] + init_parameters: dict[str, Any] + metrics: dict[str, EvaluatorMetric] + prompt_text: str + type: Literal[EvaluatorDefinitionType.PROMPT] + + + class azure.ai.projects.types.PromptDataGenerationJobSource(TypedDict, total=False): + key "description": str + key "prompt": Required[str] + key "type": Required[Literal[DataGenerationJobSourceType.PROMPT]] + description: str + prompt: str + type: Literal[DataGenerationJobSourceType.PROMPT] + + + class azure.ai.projects.types.PromptEvaluatorGenerationJobSource(TypedDict, total=False): + key "description": str + key "prompt": Required[str] + key "type": Required[Literal[EvaluatorGenerationJobSourceType.PROMPT]] + description: str + prompt: str + type: Literal[EvaluatorGenerationJobSourceType.PROMPT] + + + class azure.ai.projects.types.ProtocolConfiguration(TypedDict, total=False): + a2a: ForwardRef('A2AProtocolConfiguration', module='types') + activity: ForwardRef('ActivityProtocolConfiguration', module='types') + invocations: ForwardRef('InvocationsProtocolConfiguration', module='types') + invocations_ws: ForwardRef('InvocationsWsProtocolConfiguration', module='types') + mcp: ForwardRef('McpProtocolConfiguration', module='types') + responses: ForwardRef('ResponsesProtocolConfiguration', module='types') + + + class azure.ai.projects.types.ProtocolVersionRecord(TypedDict, total=False): + key "protocol": Required[Union[str, AgentEndpointProtocol]] + key "version": Required[str] + protocol: Union[str, AgentEndpointProtocol] + version: str + + + class azure.ai.projects.types.RaiConfig(TypedDict, total=False): + key "rai_policy_name": Required[str] + rai_policy_name: str + + + class azure.ai.projects.types.RankingOptions(TypedDict, total=False): + key "ranker": Union[str, RankerVersionType] + key "score_threshold": float + hybrid_search: ForwardRef('HybridSearchOptions', module='types') + ranker: Union[str, RankerVersionType] + score_threshold: float + + + class azure.ai.projects.types.Reasoning(TypedDict, total=False): + key "context": Optional[Literal["auto", "current_turn", "all_turns"]] + key "effort": Optional[Literal["none", "minimal", "low", "medium", "high", "xhigh"]] + key "generate_summary": Optional[Literal["auto", "concise", "detailed"]] + key "summary": Optional[Literal["auto", "concise", "detailed"]] + context: Literal[auto, current_turn, all_turns] + effort: Literal[none, minimal, low, medium, high, xhigh] + generate_summary: Literal[auto, concise, detailed] + summary: Literal[auto, concise, detailed] + + + class azure.ai.projects.types.RecurrenceTrigger(TypedDict, total=False): + key "endTime": str + key "interval": Required[int] + key "schedule": Required[RecurrenceSchedule] + key "startTime": str + key "timeZone": str + key "type": Required[Literal[TriggerType.RECURRENCE]] + end_time: str + interval: int + schedule: RecurrenceSchedule + start_time: str + time_zone: str + type: Literal[TriggerType.RECURRENCE] + + + class azure.ai.projects.types.RecurrenceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DAILY = "Daily" + HOURLY = "Hourly" + MONTHLY = "Monthly" + WEEKLY = "Weekly" + + + class azure.ai.projects.types.RedTeam(TypedDict, total=False): + key "applicationScenario": str + key "displayName": str + key "id": Required[str] + key "numTurns": int + key "simulationOnly": bool + key "status": str + key "target": Required[RedTeamTargetConfig] + application_scenario: str + attackStrategies: list[Union[str, AttackStrategy]] + attack_strategies: list[Union[str, AttackStrategy]] + display_name: str + name: str + num_turns: int + properties: dict[str, str] + riskCategories: list[Union[str, RiskCategory]] + risk_categories: list[Union[str, RiskCategory]] + simulation_only: bool + status: str + tags: dict[str, str] + target: RedTeamTargetConfig + + + class azure.ai.projects.types.RedTeamTargetConfig(TypedDict, total=False): + key "modelDeploymentName": Required[str] + key "type": Required[Literal["AzureOpenAIModel"]] + model_deployment_name: str + type: Literal[AzureOpenAIModel] + + + class azure.ai.projects.types.ReminderPreviewToolboxTool(TypedDict, total=False): + key "description": str + key "name": str + key "type": Required[Literal[ToolboxToolType.REMINDER_PREVIEW]] + description: str + name: str + tool_configs: dict[str, ToolConfig] + type: Literal[ToolboxToolType.REMINDER_PREVIEW] + + + class azure.ai.projects.types.ResponsesProtocolConfiguration(TypedDict, total=False): + + + class azure.ai.projects.types.RoutineActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + INVOKE_AGENT_INVOCATIONS_API = "invoke_agent_invocations_api" + INVOKE_AGENT_RESPONSES_API = "invoke_agent_responses_api" + + + class azure.ai.projects.types.RoutineDispatchPayloadType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + INVOKE_AGENT_INVOCATIONS_API = "invoke_agent_invocations_api" + INVOKE_AGENT_RESPONSES_API = "invoke_agent_responses_api" + + + class azure.ai.projects.types.RoutineTriggerType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CUSTOM = "custom" + GITHUB_ISSUE = "github_issue" + SCHEDULE = "schedule" + TIMER = "timer" + + + class azure.ai.projects.types.RubricBasedEvaluatorDefinition(TypedDict, total=False): + key "dimensions": Required[list[Dimension]] + key "pass_threshold": float + key "type": Required[Literal[EvaluatorDefinitionType.RUBRIC]] + data_schema: dict[str, Any] + dimensions: list[Dimension] + init_parameters: dict[str, Any] + metrics: dict[str, EvaluatorMetric] + pass_threshold: float + type: Literal[EvaluatorDefinitionType.RUBRIC] + + + class azure.ai.projects.types.SampleType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + EVALUATION_RESULT_SAMPLE = "EvaluationResultSample" + + + class azure.ai.projects.types.Schedule(TypedDict, total=False): + key "description": str + key "displayName": str + key "enabled": Required[bool] + key "id": Required[str] + key "provisioningStatus": Union[str, ScheduleProvisioningStatus] + key "systemData": Required[dict[str, str]] + key "task": Required[ScheduleTask] + key "trigger": Required[Trigger] + description: str + display_name: str + enabled: bool + properties: dict[str, str] + provisioning_status: Union[str, ScheduleProvisioningStatus] + schedule_id: str + system_data: dict[str, str] + tags: dict[str, str] + task: ScheduleTask + trigger: Trigger + + + class azure.ai.projects.types.ScheduleRoutineTrigger(TypedDict, total=False): + key "cron_expression": Required[str] + key "time_zone": Required[str] + key "type": Required[Literal[RoutineTriggerType.SCHEDULE]] + cron_expression: str + time_zone: str + type: Literal[RoutineTriggerType.SCHEDULE] + + + class azure.ai.projects.types.ScheduleTaskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + EVALUATION = "Evaluation" + INSIGHT = "Insight" + + + class azure.ai.projects.types.SearchMemoriesRequest(TypedDict, total=False): + key "previous_search_id": str + key "scope": Required[str] + items: list[dict[str, Any]] + options: ForwardRef('MemorySearchOptions', module='types') + previous_search_id: str + scope: str + + + class azure.ai.projects.types.SharepointGroundingToolParameters(TypedDict, total=False): + project_connections: list[ToolProjectConnection] + + + class azure.ai.projects.types.SharepointPreviewTool(TypedDict, total=False): + key "sharepoint_grounding_preview": Required[SharepointGroundingToolParameters] + key "type": Required[Literal[ToolType.SHAREPOINT_GROUNDING_PREVIEW]] + sharepoint_grounding_preview: SharepointGroundingToolParameters + type: Literal[ToolType.SHAREPOINT_GROUNDING_PREVIEW] + + + class azure.ai.projects.types.SimpleQnADataGenerationJobOptions(TypedDict, total=False): + key "max_samples": Required[int] + key "train_split": float + key "type": Required[Literal[DataGenerationJobType.SIMPLE_QNA]] + max_samples: int + model_options: ForwardRef('DataGenerationModelOptions', module='types') + question_types: list[Union[str, SimpleQnAFineTuningQuestionType]] + train_split: float + type: Literal[DataGenerationJobType.SIMPLE_QNA] + + + class azure.ai.projects.types.SkillInlineContent(TypedDict, total=False): + key "compatibility": str + key "description": Required[str] + key "instructions": Required[str] + key "license": str + allowed_tools: list[str] + compatibility: str + description: str + instructions: str + license: str + metadata: dict[str, str] + + + class azure.ai.projects.types.SkillReferenceParam(TypedDict, total=False): + key "skill_id": Required[str] + key "type": Required[Literal[ContainerSkillType.SKILL_REFERENCE]] + key "version": str + skill_id: str + type: Literal[ContainerSkillType.SKILL_REFERENCE] + version: str + + + class azure.ai.projects.types.SpecificApplyPatchParam(TypedDict, total=False): + key "type": Required[Literal[ToolChoiceParamType.APPLY_PATCH]] + type: Literal[ToolChoiceParamType.APPLY_PATCH] + + + class azure.ai.projects.types.SpecificFunctionShellParam(TypedDict, total=False): + key "type": Required[Literal[ToolChoiceParamType.SHELL]] + type: Literal[ToolChoiceParamType.SHELL] + + + class azure.ai.projects.types.StructuredInputDefinition(TypedDict, total=False): + key "default_value": Any + key "description": str + key "required": bool + default_value: Any + description: str + required: bool + schema: dict[str, Any] + + + class azure.ai.projects.types.StructuredOutputDefinition(TypedDict, total=False): + key "description": Required[str] + key "name": Required[str] + key "schema": Required[dict[str, Any]] + key "strict": Required[Optional[bool]] + description: str + name: str + schema: dict[str, Any] + strict: bool + + + class azure.ai.projects.types.TaxonomyCategory(TypedDict, total=False): + key "description": str + key "id": Required[str] + key "name": Required[str] + key "riskCategory": Required[Union[str, RiskCategory]] + key "subCategories": Required[list[TaxonomySubCategory]] + description: str + id: str + name: str + properties: dict[str, str] + risk_category: Union[str, RiskCategory] + sub_categories: list[TaxonomySubCategory] + + + class azure.ai.projects.types.TaxonomySubCategory(TypedDict, total=False): + key "description": str + key "enabled": Required[bool] + key "id": Required[str] + key "name": Required[str] + description: str + enabled: bool + id: str + name: str + properties: dict[str, str] + + + class azure.ai.projects.types.TelemetryConfig(TypedDict, total=False): + key "endpoints": Required[list[TelemetryEndpoint]] + endpoints: list[TelemetryEndpoint] + + + class azure.ai.projects.types.TelemetryEndpoint(TypedDict, total=False): + key "data": Required[list[Union[str, TelemetryDataKind]]] + key "endpoint": Required[str] + key "kind": Required[Literal[TelemetryEndpointKind.OTLP]] + key "protocol": Required[Union[str, TelemetryTransportProtocol]] + auth: ForwardRef('TelemetryEndpointAuth', module='types') + data: list[Union[str, TelemetryDataKind]] + endpoint: str + kind: Literal[TelemetryEndpointKind.OTLP] + protocol: Union[str, TelemetryTransportProtocol] + + + class azure.ai.projects.types.TelemetryEndpointAuth(TypedDict, total=False): + key "header_name": Required[str] + key "secret_id": Required[str] + key "secret_key": Required[str] + key "type": Required[Literal[TelemetryEndpointAuthType.HEADER]] + header_name: str + secret_id: str + secret_key: str + type: Literal[TelemetryEndpointAuthType.HEADER] + + + class azure.ai.projects.types.TelemetryEndpointAuthType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + HEADER = "header" + + + class azure.ai.projects.types.TelemetryEndpointKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): + OTLP = "OTLP" + + + class azure.ai.projects.types.TextResponseFormatConfigurationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + JSON_OBJECT = "json_object" + JSON_SCHEMA = "json_schema" + TEXT = "text" + + + class azure.ai.projects.types.TextResponseFormatJsonObject(TypedDict, total=False): + key "type": Required[Literal[TextResponseFormatConfigurationType.JSON_OBJECT]] + type: Literal[TextResponseFormatConfigurationType.JSON_OBJECT] + + + class azure.ai.projects.types.TextResponseFormatJsonSchema(TypedDict, total=False): + key "description": str + key "name": Required[str] + key "schema": Required[dict[str, Any]] + key "strict": Optional[bool] + key "type": Required[Literal[TextResponseFormatConfigurationType.JSON_SCHEMA]] + description: str + name: str + schema: dict[str, Any] + strict: bool + type: Literal[TextResponseFormatConfigurationType.JSON_SCHEMA] + + + class azure.ai.projects.types.TextResponseFormatText(TypedDict, total=False): + key "type": Required[Literal[TextResponseFormatConfigurationType.TEXT]] + type: Literal[TextResponseFormatConfigurationType.TEXT] + + + class azure.ai.projects.types.TimerRoutineTrigger(TypedDict, total=False): + key "at": int + key "type": Required[Literal[RoutineTriggerType.TIMER]] + at: int + type: Literal[RoutineTriggerType.TIMER] + + + class azure.ai.projects.types.ToolChoiceAllowed(TypedDict, total=False): + key "mode": Required[Literal["auto", "required"]] + key "tools": Required[list[dict[str, Any]]] + key "type": Required[Literal[ToolChoiceParamType.ALLOWED_TOOLS]] + mode: Literal[auto, required] + tools: list[dict[str, Any]] + type: Literal[ToolChoiceParamType.ALLOWED_TOOLS] + + + class azure.ai.projects.types.ToolChoiceCodeInterpreter(TypedDict, total=False): + key "type": Required[Literal[ToolChoiceParamType.CODE_INTERPRETER]] + type: Literal[ToolChoiceParamType.CODE_INTERPRETER] + + + class azure.ai.projects.types.ToolChoiceComputer(TypedDict, total=False): + key "type": Required[Literal[ToolChoiceParamType.COMPUTER]] + type: Literal[ToolChoiceParamType.COMPUTER] + + + class azure.ai.projects.types.ToolChoiceComputerUse(TypedDict, total=False): + key "type": Required[Literal[ToolChoiceParamType.COMPUTER_USE]] + type: Literal[ToolChoiceParamType.COMPUTER_USE] + + + class azure.ai.projects.types.ToolChoiceComputerUsePreview(TypedDict, total=False): + key "type": Required[Literal[ToolChoiceParamType.COMPUTER_USE_PREVIEW]] + type: Literal[ToolChoiceParamType.COMPUTER_USE_PREVIEW] + + + class azure.ai.projects.types.ToolChoiceCustom(TypedDict, total=False): + key "name": Required[str] + key "type": Required[Literal[ToolChoiceParamType.CUSTOM]] + name: str + type: Literal[ToolChoiceParamType.CUSTOM] + + + class azure.ai.projects.types.ToolChoiceFileSearch(TypedDict, total=False): + key "type": Required[Literal[ToolChoiceParamType.FILE_SEARCH]] + type: Literal[ToolChoiceParamType.FILE_SEARCH] + + + class azure.ai.projects.types.ToolChoiceFunction(TypedDict, total=False): + key "name": Required[str] + key "type": Required[Literal[ToolChoiceParamType.FUNCTION]] + name: str + type: Literal[ToolChoiceParamType.FUNCTION] + + + class azure.ai.projects.types.ToolChoiceImageGeneration(TypedDict, total=False): + key "type": Required[Literal[ToolChoiceParamType.IMAGE_GENERATION]] + type: Literal[ToolChoiceParamType.IMAGE_GENERATION] + + + class azure.ai.projects.types.ToolChoiceMCP(TypedDict, total=False): + key "name": Optional[str] + key "server_label": Required[str] + key "type": Required[Literal[ToolChoiceParamType.MCP]] + name: str + server_label: str + type: Literal[ToolChoiceParamType.MCP] + + + class azure.ai.projects.types.ToolChoiceParamType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ALLOWED_TOOLS = "allowed_tools" + APPLY_PATCH = "apply_patch" + CODE_INTERPRETER = "code_interpreter" + COMPUTER = "computer" + COMPUTER_USE = "computer_use" + COMPUTER_USE_PREVIEW = "computer_use_preview" + CUSTOM = "custom" + FILE_SEARCH = "file_search" + FUNCTION = "function" + IMAGE_GENERATION = "image_generation" + MCP = "mcp" + SHELL = "shell" + WEB_SEARCH_PREVIEW = "web_search_preview" + WEB_SEARCH_PREVIEW_2025_03_11 = "web_search_preview_2025_03_11" + + + class azure.ai.projects.types.ToolChoiceWebSearchPreview(TypedDict, total=False): + key "type": Required[Literal[ToolChoiceParamType.WEB_SEARCH_PREVIEW]] + type: Literal[ToolChoiceParamType.WEB_SEARCH_PREVIEW] + + + class azure.ai.projects.types.ToolChoiceWebSearchPreview20250311(TypedDict, total=False): + key "type": Required[Literal[ToolChoiceParamType.WEB_SEARCH_PREVIEW_2025_03_11]] + type: Literal[ToolChoiceParamType.WEB_SEARCH_PREVIEW_2025_03_11] + + + class azure.ai.projects.types.ToolConfig(TypedDict, total=False): + key "additional_search_text": str + key "pin": bool + additional_search_text: str + pin: bool + + + class azure.ai.projects.types.ToolDescription(TypedDict, total=False): + key "description": str + key "name": str + description: str + name: str + + + class azure.ai.projects.types.ToolProjectConnection(TypedDict, total=False): + key "project_connection_id": Required[str] + project_connection_id: str + + + class azure.ai.projects.types.ToolSearchToolParam(TypedDict, total=False): + key "description": Optional[str] + key "execution": Union[str, ToolSearchExecutionType] + key "parameters": Optional[EmptyModelParam] + key "type": Required[Literal[ToolType.TOOL_SEARCH]] + description: str + execution: Union[str, ToolSearchExecutionType] + parameters: EmptyModelParam + type: Literal[ToolType.TOOL_SEARCH] + + + class azure.ai.projects.types.ToolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + A2A_PREVIEW = "a2a_preview" + APPLY_PATCH = "apply_patch" + AZURE_AI_SEARCH = "azure_ai_search" + AZURE_FUNCTION = "azure_function" + BING_CUSTOM_SEARCH_PREVIEW = "bing_custom_search_preview" + BING_GROUNDING = "bing_grounding" + BROWSER_AUTOMATION_PREVIEW = "browser_automation_preview" + CAPTURE_STRUCTURED_OUTPUTS = "capture_structured_outputs" + CODE_INTERPRETER = "code_interpreter" + COMPUTER = "computer" + COMPUTER_USE_PREVIEW = "computer_use_preview" + CUSTOM = "custom" + FABRIC_DATAAGENT_PREVIEW = "fabric_dataagent_preview" + FABRIC_IQ_PREVIEW = "fabric_iq_preview" + FILE_SEARCH = "file_search" + FUNCTION = "function" + IMAGE_GENERATION = "image_generation" + LOCAL_SHELL = "local_shell" + MCP = "mcp" + MEMORY_SEARCH_PREVIEW = "memory_search_preview" + NAMESPACE = "namespace" + OPENAPI = "openapi" + SHAREPOINT_GROUNDING_PREVIEW = "sharepoint_grounding_preview" + SHELL = "shell" + TOOLBOX_SEARCH_PREVIEW = "toolbox_search_preview" + TOOL_SEARCH = "tool_search" + WEB_SEARCH = "web_search" + WEB_SEARCH_PREVIEW = "web_search_preview" + WORK_IQ_PREVIEW = "work_iq_preview" + + + class azure.ai.projects.types.ToolUseFineTuningDataGenerationJobOptions(TypedDict, total=False): + key "max_samples": Required[int] + key "train_split": float + key "type": Required[Literal[DataGenerationJobType.TOOL_USE]] + max_samples: int + model_options: ForwardRef('DataGenerationModelOptions', module='types') + train_split: float + type: Literal[DataGenerationJobType.TOOL_USE] + + + class azure.ai.projects.types.ToolboxPolicies(TypedDict, total=False): + rai_config: ForwardRef('RaiConfig', module='types') + + + class azure.ai.projects.types.ToolboxSearchPreviewToolboxTool(TypedDict, total=False): + key "description": str + key "name": str + key "type": Required[Literal[ToolboxToolType.TOOLBOX_SEARCH_PREVIEW]] + description: str + name: str + tool_configs: dict[str, ToolConfig] + type: Literal[ToolboxToolType.TOOLBOX_SEARCH_PREVIEW] + + + class azure.ai.projects.types.ToolboxSkill(TypedDict, total=False): + key "name": Required[str] + key "type": Required[Literal["skill_reference"]] + key "version": str + name: str + type: Literal[skill_reference] + version: str + + + class azure.ai.projects.types.ToolboxSkillReference(TypedDict, total=False): + key "name": Required[str] + key "type": Required[Literal["skill_reference"]] + key "version": str + name: str + type: Literal[skill_reference] + version: str + + + class azure.ai.projects.types.ToolboxToolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + A2A_PREVIEW = "a2a_preview" + AZURE_AI_SEARCH = "azure_ai_search" + BROWSER_AUTOMATION_PREVIEW = "browser_automation_preview" + CODE_INTERPRETER = "code_interpreter" + FABRIC_IQ_PREVIEW = "fabric_iq_preview" + FILE_SEARCH = "file_search" + MCP = "mcp" + OPENAPI = "openapi" + REMINDER_PREVIEW = "reminder_preview" + TOOLBOX_SEARCH_PREVIEW = "toolbox_search_preview" + WEB_SEARCH = "web_search" + WORK_IQ_PREVIEW = "work_iq_preview" + + + class azure.ai.projects.types.TracesDataGenerationJobOptions(TypedDict, total=False): + key "max_samples": Required[int] + key "train_split": float + key "type": Required[Literal[DataGenerationJobType.TRACES]] + max_samples: int + model_options: ForwardRef('DataGenerationModelOptions', module='types') + train_split: float + type: Literal[DataGenerationJobType.TRACES] + + + class azure.ai.projects.types.TracesDataGenerationJobSource(TypedDict, total=False): + key "agent_id": str + key "agent_name": str + key "agent_version": str + key "description": str + key "end_time": int + key "start_time": Required[int] + key "type": Required[Literal[DataGenerationJobSourceType.TRACES]] + agent_id: str + agent_name: str + agent_version: str + description: str + end_time: int + start_time: int + type: Literal[DataGenerationJobSourceType.TRACES] + + + class azure.ai.projects.types.TracesEvaluatorGenerationJobSource(TypedDict, total=False): + key "agent_id": str + key "agent_name": str + key "agent_version": str + key "description": str + key "end_time": int + key "start_time": Required[int] + key "type": Required[Literal[EvaluatorGenerationJobSourceType.TRACES]] + agent_id: str + agent_name: str + agent_version: str + description: str + end_time: int + start_time: int + type: Literal[EvaluatorGenerationJobSourceType.TRACES] + + + class azure.ai.projects.types.TriggerType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CRON = "Cron" + ONE_TIME = "OneTime" + RECURRENCE = "Recurrence" + + + class azure.ai.projects.types.UpdateMemoriesRequest(TypedDict, total=False): + key "previous_update_id": str + key "scope": Required[str] + key "update_delay": int + items: list[dict[str, Any]] + items_property: list[dict[str, Any]] + previous_update_id: str + scope: str + update_delay: int + + + class azure.ai.projects.types.UpdateMemoryRequest(TypedDict, total=False): + key "content": Required[str] + content: str + + + class azure.ai.projects.types.UpdateMemoryStoreRequest(TypedDict, total=False): + key "description": str + description: str + metadata: dict[str, str] + + + class azure.ai.projects.types.UpdateModelVersionRequest(TypedDict, total=False): + key "description": str + description: str + tags: dict[str, str] + + + class azure.ai.projects.types.UpdateSkillRequest(TypedDict, total=False): + key "default_version": Required[str] + default_version: str + + + class azure.ai.projects.types.UpdateToolboxRequest(TypedDict, total=False): + key "default_version": Required[str] + default_version: str + + + class azure.ai.projects.types.UpdateToolboxRequest1(TypedDict, total=False): + key "default_version": Required[str] + default_version: str + + + class azure.ai.projects.types.VersionIndicator(TypedDict, total=False): + key "agent_version": Required[str] + key "type": Required[Literal[VersionIndicatorType.VERSION_REF]] + agent_version: str + type: Literal[VersionIndicatorType.VERSION_REF] + + + class azure.ai.projects.types.VersionIndicatorType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + VERSION_REF = "version_ref" + + + class azure.ai.projects.types.VersionRefIndicator(TypedDict, total=False): + key "agent_version": Required[str] + key "type": Required[Literal[VersionIndicatorType.VERSION_REF]] + agent_version: str + type: Literal[VersionIndicatorType.VERSION_REF] + + + class azure.ai.projects.types.VersionSelectionRule(TypedDict, total=False): + key "agent_version": Required[str] + key "traffic_percentage": Required[int] + key "type": Required[Literal[VersionSelectorType.FIXED_RATIO]] + agent_version: str + traffic_percentage: int + type: Literal[VersionSelectorType.FIXED_RATIO] + + + class azure.ai.projects.types.VersionSelector(TypedDict, total=False): + key "version_selection_rules": Required[list[VersionSelectionRule]] + version_selection_rules: list[VersionSelectionRule] + + + class azure.ai.projects.types.VersionSelectorType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + FIXED_RATIO = "FixedRatio" + + + class azure.ai.projects.types.WebSearchApproximateLocation(TypedDict, total=False): + key "city": Optional[str] + key "country": Optional[str] + key "region": Optional[str] + key "timezone": Optional[str] + key "type": Required[Literal["approximate"]] + city: str + country: str + region: str + timezone: str + type: Literal[approximate] + + + class azure.ai.projects.types.WebSearchConfiguration(TypedDict, total=False): + key "instance_name": Required[str] + key "project_connection_id": Required[str] + instance_name: str + project_connection_id: str + + + class azure.ai.projects.types.WebSearchPreviewTool(TypedDict, total=False): + key "search_context_size": Union[str, SearchContextSize] + key "type": Required[Literal[ToolType.WEB_SEARCH_PREVIEW]] + key "user_location": Optional[ApproximateLocation] + search_content_types: list[Union[str, SearchContentType]] + search_context_size: Union[str, SearchContextSize] + type: Literal[ToolType.WEB_SEARCH_PREVIEW] + user_location: ApproximateLocation + + + class azure.ai.projects.types.WebSearchTool(TypedDict, total=False): + key "description": str + key "filters": Optional[WebSearchToolFilters] + key "name": str + key "search_context_size": Literal["low", "medium", "high"] + key "type": Required[Literal[ToolType.WEB_SEARCH]] + key "user_location": Optional[WebSearchApproximateLocation] + custom_search_configuration: ForwardRef('WebSearchConfiguration', module='types') + description: str + filters: WebSearchToolFilters + name: str + search_context_size: Literal[low, medium, high] + tool_configs: dict[str, ToolConfig] + type: Literal[ToolType.WEB_SEARCH] + user_location: WebSearchApproximateLocation + + + class azure.ai.projects.types.WebSearchToolFilters(TypedDict, total=False): + key "allowed_domains": Optional[list[str]] + allowed_domains: list[str] + + + class azure.ai.projects.types.WebSearchToolboxTool(TypedDict, total=False): + key "description": str + key "filters": Optional[WebSearchToolFilters] + key "name": str + key "search_context_size": Literal["low", "medium", "high"] + key "type": Required[Literal[ToolboxToolType.WEB_SEARCH]] + key "user_location": Optional[WebSearchApproximateLocation] + custom_search_configuration: ForwardRef('WebSearchConfiguration', module='types') + description: str + filters: WebSearchToolFilters + name: str + search_context_size: Literal[low, medium, high] + tool_configs: dict[str, ToolConfig] + type: Literal[ToolboxToolType.WEB_SEARCH] + user_location: WebSearchApproximateLocation + + + class azure.ai.projects.types.WeeklyRecurrenceSchedule(TypedDict, total=False): + key "daysOfWeek": Required[list[Union[str, DayOfWeek]]] + key "type": Required[Literal[RecurrenceType.WEEKLY]] + days_of_week: list[Union[str, DayOfWeek]] + type: Literal[RecurrenceType.WEEKLY] + + + class azure.ai.projects.types.WorkIQPreviewTool(TypedDict, total=False): + key "project_connection_id": Required[str] + key "type": Required[Literal[ToolType.WORK_IQ_PREVIEW]] + project_connection_id: str + type: Literal[ToolType.WORK_IQ_PREVIEW] + + + class azure.ai.projects.types.WorkIQPreviewToolboxTool(TypedDict, total=False): + key "description": str + key "name": str + key "project_connection_id": Required[str] + key "type": Required[Literal[ToolboxToolType.WORK_IQ_PREVIEW]] + description: str + name: str + project_connection_id: str + tool_configs: dict[str, ToolConfig] + type: Literal[ToolboxToolType.WORK_IQ_PREVIEW] + + + class azure.ai.projects.types.WorkflowAgentDefinition(TypedDict, total=False): + key "kind": Required[Literal[AgentKind.WORKFLOW]] + key "workflow": str + kind: Literal[AgentKind.WORKFLOW] + rai_config: ForwardRef('RaiConfig', module='types') + workflow: str + + ``` \ No newline at end of file diff --git a/sdk/ai/azure-ai-projects/api.metadata.yml b/sdk/ai/azure-ai-projects/api.metadata.yml index 30461e1b3794..3fb347030c69 100644 --- a/sdk/ai/azure-ai-projects/api.metadata.yml +++ b/sdk/ai/azure-ai-projects/api.metadata.yml @@ -1,3 +1,3 @@ -apiMdSha256: 3769cdd6d12da4829d90f71066b705ee8951c33eac0288d5a5cc3ebc002e6df0 +apiMdSha256: 3b0b5cd93d04002c38a81fda60b2db38f473ca7b36af2d6e7f94041e567eedb3 parserVersion: 0.3.28 pythonVersion: 3.14.3 diff --git a/sdk/ai/azure-ai-projects/apiview-properties.json b/sdk/ai/azure-ai-projects/apiview-properties.json index fa141e2c53cf..d38b13b2aa23 100644 --- a/sdk/ai/azure-ai-projects/apiview-properties.json +++ b/sdk/ai/azure-ai-projects/apiview-properties.json @@ -279,7 +279,6 @@ "azure.ai.projects.models.Reasoning": "OpenAI.Reasoning", "azure.ai.projects.models.RecurrenceTrigger": "Azure.AI.Projects.RecurrenceTrigger", "azure.ai.projects.models.RedTeam": "Azure.AI.Projects.RedTeam", - "azure.ai.projects.models.ReminderPreviewTool": "Azure.AI.Projects.ReminderPreviewTool", "azure.ai.projects.models.ReminderPreviewToolboxTool": "Azure.AI.Projects.ReminderPreviewToolboxTool", "azure.ai.projects.models.ResponsesProtocolConfiguration": "Azure.AI.Projects.ResponsesProtocolConfiguration", "azure.ai.projects.models.ResponseUsageInputTokensDetails": "OpenAI.ResponseUsageInputTokensDetails", @@ -541,5 +540,5 @@ "azure.ai.projects.operations.ToolboxesOperations.delete_version": "Azure.AI.Projects.Toolboxes.deleteToolboxVersion", "azure.ai.projects.aio.operations.ToolboxesOperations.delete_version": "Azure.AI.Projects.Toolboxes.deleteToolboxVersion" }, - "CrossLanguageVersion": "32a086fb0432" + "CrossLanguageVersion": "a25984f23931" } \ No newline at end of file diff --git a/sdk/ai/azure-ai-projects/azure/ai/projects/_unions.py b/sdk/ai/azure-ai-projects/azure/ai/projects/_unions.py new file mode 100644 index 000000000000..abad0c3afee4 --- /dev/null +++ b/sdk/ai/azure-ai-projects/azure/ai/projects/_unions.py @@ -0,0 +1,14 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING, Union + +if TYPE_CHECKING: + from . import models as _models +Filters = Union["_models.ComparisonFilter", "_models.CompoundFilter"] +RoutineRunStatus = str diff --git a/sdk/ai/azure-ai-projects/azure/ai/projects/aio/operations/_operations.py b/sdk/ai/azure-ai-projects/azure/ai/projects/aio/operations/_operations.py index ba856252bdd8..37bce51261e6 100644 --- a/sdk/ai/azure-ai-projects/azure/ai/projects/aio/operations/_operations.py +++ b/sdk/ai/azure-ai-projects/azure/ai/projects/aio/operations/_operations.py @@ -32,7 +32,7 @@ from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict -from ... import models as _models +from ... import models as _models, types as _types from ..._utils.model_base import Model as _Model, SdkJSONEncoder, _deserialize, _failsafe_deserialize from ..._utils.serialization import Deserializer, Serializer from ..._utils.utils import prepare_multipart_form_data @@ -522,7 +522,12 @@ async def create_version( @overload async def create_version( - self, agent_name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + agent_name: str, + body: _types.CreateAgentVersionRequest, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.AgentVersionDetails: """Create an agent version. @@ -536,7 +541,7 @@ async def create_version( * Must not exceed 63 characters. Required. :type agent_name: str :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.CreateAgentVersionRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -574,7 +579,7 @@ async def create_version( async def create_version( self, agent_name: str, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.CreateAgentVersionRequest, IO[bytes]] = _Unset, *, definition: _models.AgentDefinition = _Unset, metadata: Optional[dict[str, str]] = None, @@ -594,8 +599,9 @@ async def create_version( * Can contain hyphens in the middle * Must not exceed 63 characters. Required. :type agent_name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, CreateAgentVersionRequest, IO[bytes] + Required. + :type body: JSON or ~azure.ai.projects.types.CreateAgentVersionRequest or IO[bytes] :keyword definition: The agent definition. This can be a workflow, hosted agent, or a simple agent definition. Required. :paramtype definition: ~azure.ai.projects.models.AgentDefinition @@ -742,7 +748,12 @@ async def create_version_from_manifest( @overload async def create_version_from_manifest( - self, agent_name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + agent_name: str, + body: _types.CreateAgentVersionFromManifestRequest, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.AgentVersionDetails: """Create an agent version from manifest. @@ -756,7 +767,7 @@ async def create_version_from_manifest( * Must not exceed 63 characters. Required. :type agent_name: str :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.CreateAgentVersionFromManifestRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -794,7 +805,7 @@ async def create_version_from_manifest( async def create_version_from_manifest( self, agent_name: str, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.CreateAgentVersionFromManifestRequest, IO[bytes]] = _Unset, *, manifest_id: str = _Unset, parameter_values: dict[str, Any] = _Unset, @@ -813,8 +824,9 @@ async def create_version_from_manifest( * Can contain hyphens in the middle * Must not exceed 63 characters. Required. :type agent_name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, CreateAgentVersionFromManifestRequest, + IO[bytes] Required. + :type body: JSON or ~azure.ai.projects.types.CreateAgentVersionFromManifestRequest or IO[bytes] :keyword manifest_id: The manifest ID to import the agent version from. Required. :paramtype manifest_id: str :keyword parameter_values: The inputs to the manifest that will result in a fully materialized @@ -1193,7 +1205,12 @@ async def update_details( @overload async def update_details( - self, agent_name: str, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any + self, + agent_name: str, + body: _types.PatchAgentObjectRequest, + *, + content_type: str = "application/merge-patch+json", + **kwargs: Any ) -> _models.AgentDetails: """Update an agent endpoint. @@ -1202,7 +1219,7 @@ async def update_details( :param agent_name: The name of the agent to retrieve. Required. :type agent_name: str :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.PatchAgentObjectRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/merge-patch+json". :paramtype content_type: str @@ -1235,7 +1252,7 @@ async def update_details( async def update_details( self, agent_name: str, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.PatchAgentObjectRequest, IO[bytes]] = _Unset, *, agent_endpoint: Optional[_models.AgentEndpointConfig] = None, agent_card: Optional[_models.AgentCard] = None, @@ -1247,8 +1264,8 @@ async def update_details( :param agent_name: The name of the agent to retrieve. Required. :type agent_name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, PatchAgentObjectRequest, IO[bytes] Required. + :type body: JSON or ~azure.ai.projects.types.PatchAgentObjectRequest or IO[bytes] :keyword agent_endpoint: The endpoint configuration for the agent. Default value is None. :paramtype agent_endpoint: ~azure.ai.projects.models.AgentEndpointConfig :keyword agent_card: Optional agent card for the agent. Default value is None. @@ -1336,14 +1353,19 @@ async def _create_version_from_code( ) -> _models.AgentVersionDetails: ... @overload async def _create_version_from_code( - self, agent_name: str, content: JSON, *, code_zip_sha256: str, **kwargs: Any + self, + agent_name: str, + content: _types._CreateAgentVersionFromCodeContent, + *, + code_zip_sha256: str, + **kwargs: Any ) -> _models.AgentVersionDetails: ... @distributed_trace_async async def _create_version_from_code( self, agent_name: str, - content: Union[_models._models._CreateAgentVersionFromCodeContent, JSON], + content: Union[_models._models._CreateAgentVersionFromCodeContent, _types._CreateAgentVersionFromCodeContent], *, code_zip_sha256: str, **kwargs: Any @@ -1362,8 +1384,9 @@ async def _create_version_from_code( * Can contain hyphens in the middle * Must not exceed 63 characters. Required. :type agent_name: str - :param content: Is either a _CreateAgentVersionFromCodeContent type or a JSON type. Required. - :type content: ~azure.ai.projects.models._models._CreateAgentVersionFromCodeContent or JSON + :param content: Is one of the following types: _CreateAgentVersionFromCodeContent Required. + :type content: ~azure.ai.projects.models._models._CreateAgentVersionFromCodeContent or + ~azure.ai.projects.types._CreateAgentVersionFromCodeContent :keyword code_zip_sha256: SHA-256 hex digest of the uploaded code zip. Used for change detection (dedup) and integrity verification. Required. :paramtype code_zip_sha256: str @@ -1660,7 +1683,12 @@ async def create_session( @overload async def create_session( - self, agent_name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + agent_name: str, + body: _types.CreateSessionRequest, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.AgentSessionResource: """Create a session. @@ -1671,7 +1699,7 @@ async def create_session( :param agent_name: The name of the agent to create a session for. Required. :type agent_name: str :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.CreateSessionRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1706,7 +1734,7 @@ async def create_session( async def create_session( self, agent_name: str, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.CreateSessionRequest, IO[bytes]] = _Unset, *, version_indicator: _models.VersionIndicator = _Unset, agent_session_id: Optional[str] = None, @@ -1720,8 +1748,8 @@ async def create_session( :param agent_name: The name of the agent to create a session for. Required. :type agent_name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, CreateSessionRequest, IO[bytes] Required. + :type body: JSON or ~azure.ai.projects.types.CreateSessionRequest or IO[bytes] :keyword version_indicator: Determines which agent version backs the session. Required. :paramtype version_indicator: ~azure.ai.projects.models.VersionIndicator :keyword agent_session_id: Optional caller-provided session ID. If specified, it must be unique @@ -2673,7 +2701,7 @@ async def create_or_update( @overload async def create_or_update( - self, id: str, evaluation_rule: JSON, *, content_type: str = "application/json", **kwargs: Any + self, id: str, evaluation_rule: _types.EvaluationRule, *, content_type: str = "application/json", **kwargs: Any ) -> _models.EvaluationRule: """Create or update an evaluation rule. @@ -2682,7 +2710,7 @@ async def create_or_update( :param id: Unique identifier for the evaluation rule. Required. :type id: str :param evaluation_rule: Evaluation rule resource. Required. - :type evaluation_rule: JSON + :type evaluation_rule: ~azure.ai.projects.types.EvaluationRule :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -2713,7 +2741,7 @@ async def create_or_update( @distributed_trace_async async def create_or_update( - self, id: str, evaluation_rule: Union[_models.EvaluationRule, JSON, IO[bytes]], **kwargs: Any + self, id: str, evaluation_rule: Union[_models.EvaluationRule, _types.EvaluationRule, IO[bytes]], **kwargs: Any ) -> _models.EvaluationRule: """Create or update an evaluation rule. @@ -2721,9 +2749,10 @@ async def create_or_update( :param id: Unique identifier for the evaluation rule. Required. :type id: str - :param evaluation_rule: Evaluation rule resource. Is one of the following types: - EvaluationRule, JSON, IO[bytes] Required. - :type evaluation_rule: ~azure.ai.projects.models.EvaluationRule or JSON or IO[bytes] + :param evaluation_rule: Evaluation rule resource. Is either a EvaluationRule type or a + IO[bytes] type. Required. + :type evaluation_rule: ~azure.ai.projects.models.EvaluationRule or + ~azure.ai.projects.types.EvaluationRule or IO[bytes] :return: EvaluationRule. The EvaluationRule is compatible with MutableMapping :rtype: ~azure.ai.projects.models.EvaluationRule :raises ~azure.core.exceptions.HttpResponseError: @@ -3513,7 +3542,7 @@ async def create_or_update( self, name: str, version: str, - dataset_version: JSON, + dataset_version: _types.DatasetVersion, *, content_type: str = "application/merge-patch+json", **kwargs: Any @@ -3527,7 +3556,7 @@ async def create_or_update( :param version: The specific version id of the DatasetVersion to create or update. Required. :type version: str :param dataset_version: The DatasetVersion to create or update. Required. - :type dataset_version: JSON + :type dataset_version: ~azure.ai.projects.types.DatasetVersion :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/merge-patch+json". :paramtype content_type: str @@ -3566,7 +3595,11 @@ async def create_or_update( @distributed_trace_async async def create_or_update( - self, name: str, version: str, dataset_version: Union[_models.DatasetVersion, JSON, IO[bytes]], **kwargs: Any + self, + name: str, + version: str, + dataset_version: Union[_models.DatasetVersion, _types.DatasetVersion, IO[bytes]], + **kwargs: Any ) -> _models.DatasetVersion: """Create or update a version. @@ -3576,9 +3609,10 @@ async def create_or_update( :type name: str :param version: The specific version id of the DatasetVersion to create or update. Required. :type version: str - :param dataset_version: The DatasetVersion to create or update. Is one of the following types: - DatasetVersion, JSON, IO[bytes] Required. - :type dataset_version: ~azure.ai.projects.models.DatasetVersion or JSON or IO[bytes] + :param dataset_version: The DatasetVersion to create or update. Is either a DatasetVersion type + or a IO[bytes] type. Required. + :type dataset_version: ~azure.ai.projects.models.DatasetVersion or + ~azure.ai.projects.types.DatasetVersion or IO[bytes] :return: DatasetVersion. The DatasetVersion is compatible with MutableMapping :rtype: ~azure.ai.projects.models.DatasetVersion :raises ~azure.core.exceptions.HttpResponseError: @@ -3678,7 +3712,7 @@ async def pending_upload( self, name: str, version: str, - pending_upload_request: JSON, + pending_upload_request: _types.PendingUploadRequest, *, content_type: str = "application/json", **kwargs: Any @@ -3692,7 +3726,7 @@ async def pending_upload( :param version: The specific version id of the DatasetVersion to operate on. Required. :type version: str :param pending_upload_request: The pending upload request parameters. Required. - :type pending_upload_request: JSON + :type pending_upload_request: ~azure.ai.projects.types.PendingUploadRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -3734,7 +3768,7 @@ async def pending_upload( self, name: str, version: str, - pending_upload_request: Union[_models.PendingUploadRequest, JSON, IO[bytes]], + pending_upload_request: Union[_models.PendingUploadRequest, _types.PendingUploadRequest, IO[bytes]], **kwargs: Any ) -> _models.PendingUploadResponse: """Start a pending upload. @@ -3745,10 +3779,10 @@ async def pending_upload( :type name: str :param version: The specific version id of the DatasetVersion to operate on. Required. :type version: str - :param pending_upload_request: The pending upload request parameters. Is one of the following - types: PendingUploadRequest, JSON, IO[bytes] Required. - :type pending_upload_request: ~azure.ai.projects.models.PendingUploadRequest or JSON or - IO[bytes] + :param pending_upload_request: The pending upload request parameters. Is either a + PendingUploadRequest type or a IO[bytes] type. Required. + :type pending_upload_request: ~azure.ai.projects.models.PendingUploadRequest or + ~azure.ai.projects.types.PendingUploadRequest or IO[bytes] :return: PendingUploadResponse. The PendingUploadResponse is compatible with MutableMapping :rtype: ~azure.ai.projects.models.PendingUploadResponse :raises ~azure.core.exceptions.HttpResponseError: @@ -4428,7 +4462,13 @@ async def create_or_update( @overload async def create_or_update( - self, name: str, version: str, index: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any + self, + name: str, + version: str, + index: _types.Index, + *, + content_type: str = "application/merge-patch+json", + **kwargs: Any ) -> _models.Index: """Create or update a version. @@ -4439,7 +4479,7 @@ async def create_or_update( :param version: The specific version id of the Index to create or update. Required. :type version: str :param index: The Index to create or update. Required. - :type index: JSON + :type index: ~azure.ai.projects.types.Index :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/merge-patch+json". :paramtype content_type: str @@ -4478,7 +4518,7 @@ async def create_or_update( @distributed_trace_async async def create_or_update( - self, name: str, version: str, index: Union[_models.Index, JSON, IO[bytes]], **kwargs: Any + self, name: str, version: str, index: Union[_models.Index, _types.Index, IO[bytes]], **kwargs: Any ) -> _models.Index: """Create or update a version. @@ -4488,9 +4528,9 @@ async def create_or_update( :type name: str :param version: The specific version id of the Index to create or update. Required. :type version: str - :param index: The Index to create or update. Is one of the following types: Index, JSON, - IO[bytes] Required. - :type index: ~azure.ai.projects.models.Index or JSON or IO[bytes] + :param index: The Index to create or update. Is either a Index type or a IO[bytes] type. + Required. + :type index: ~azure.ai.projects.models.Index or ~azure.ai.projects.types.Index or IO[bytes] :return: Index. The Index is compatible with MutableMapping :rtype: ~azure.ai.projects.models.Index :raises ~azure.core.exceptions.HttpResponseError: @@ -4618,7 +4658,12 @@ async def create_version( @overload async def create_version( - self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + name: str, + body: _types.CreateToolboxVersionRequest, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.ToolboxVersionObject: """Create a new version of a toolbox. @@ -4628,7 +4673,7 @@ async def create_version( Required. :type name: str :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.CreateToolboxVersionRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -4662,7 +4707,7 @@ async def create_version( async def create_version( self, name: str, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.CreateToolboxVersionRequest, IO[bytes]] = _Unset, *, tools: List[_models.ToolboxTool] = _Unset, description: Optional[str] = None, @@ -4678,8 +4723,9 @@ async def create_version( :param name: The name of the toolbox. If the toolbox does not exist, it will be created. Required. :type name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, CreateToolboxVersionRequest, IO[bytes] + Required. + :type body: JSON or ~azure.ai.projects.types.CreateToolboxVersionRequest or IO[bytes] :keyword tools: The list of tools to include in this version. Required. :paramtype tools: list[~azure.ai.projects.models.ToolboxTool] :keyword description: A human-readable description of the toolbox. Default value is None. @@ -5121,7 +5167,7 @@ async def update( @overload async def update( - self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, name: str, body: _types.UpdateToolboxRequest1, *, content_type: str = "application/json", **kwargs: Any ) -> _models.ToolboxObject: """Update a toolbox to point to a specific version. @@ -5130,7 +5176,7 @@ async def update( :param name: The name of the toolbox to update. Required. :type name: str :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.UpdateToolboxRequest1 :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -5161,7 +5207,12 @@ async def update( @distributed_trace_async async def update( - self, name: str, body: Union[JSON, IO[bytes]] = _Unset, *, default_version: str = _Unset, **kwargs: Any + self, + name: str, + body: Union[JSON, _types.UpdateToolboxRequest1, IO[bytes]] = _Unset, + *, + default_version: str = _Unset, + **kwargs: Any ) -> _models.ToolboxObject: """Update a toolbox to point to a specific version. @@ -5169,8 +5220,8 @@ async def update( :param name: The name of the toolbox to update. Required. :type name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, UpdateToolboxRequest1, IO[bytes] Required. + :type body: JSON or ~azure.ai.projects.types.UpdateToolboxRequest1 or IO[bytes] :keyword default_version: The version identifier that the toolbox should point to. When set, the toolbox's default version will resolve to this version instead of the latest. Required. :paramtype default_version: str @@ -5611,7 +5662,7 @@ async def create( @overload async def create( - self, name: str, taxonomy: JSON, *, content_type: str = "application/json", **kwargs: Any + self, name: str, taxonomy: _types.EvaluationTaxonomy, *, content_type: str = "application/json", **kwargs: Any ) -> _models.EvaluationTaxonomy: """Create an evaluation taxonomy. @@ -5620,7 +5671,7 @@ async def create( :param name: The name of the evaluation taxonomy. Required. :type name: str :param taxonomy: The evaluation taxonomy. Required. - :type taxonomy: JSON + :type taxonomy: ~azure.ai.projects.types.EvaluationTaxonomy :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -5651,7 +5702,10 @@ async def create( @distributed_trace_async async def create( - self, name: str, taxonomy: Union[_models.EvaluationTaxonomy, JSON, IO[bytes]], **kwargs: Any + self, + name: str, + taxonomy: Union[_models.EvaluationTaxonomy, _types.EvaluationTaxonomy, IO[bytes]], + **kwargs: Any ) -> _models.EvaluationTaxonomy: """Create an evaluation taxonomy. @@ -5659,9 +5713,10 @@ async def create( :param name: The name of the evaluation taxonomy. Required. :type name: str - :param taxonomy: The evaluation taxonomy. Is one of the following types: EvaluationTaxonomy, - JSON, IO[bytes] Required. - :type taxonomy: ~azure.ai.projects.models.EvaluationTaxonomy or JSON or IO[bytes] + :param taxonomy: The evaluation taxonomy. Is either a EvaluationTaxonomy type or a IO[bytes] + type. Required. + :type taxonomy: ~azure.ai.projects.models.EvaluationTaxonomy or + ~azure.ai.projects.types.EvaluationTaxonomy or IO[bytes] :return: EvaluationTaxonomy. The EvaluationTaxonomy is compatible with MutableMapping :rtype: ~azure.ai.projects.models.EvaluationTaxonomy :raises ~azure.core.exceptions.HttpResponseError: @@ -5749,7 +5804,7 @@ async def update( @overload async def update( - self, name: str, taxonomy: JSON, *, content_type: str = "application/json", **kwargs: Any + self, name: str, taxonomy: _types.EvaluationTaxonomy, *, content_type: str = "application/json", **kwargs: Any ) -> _models.EvaluationTaxonomy: """Update an evaluation taxonomy. @@ -5758,7 +5813,7 @@ async def update( :param name: The name of the evaluation taxonomy. Required. :type name: str :param taxonomy: The evaluation taxonomy. Required. - :type taxonomy: JSON + :type taxonomy: ~azure.ai.projects.types.EvaluationTaxonomy :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -5789,7 +5844,10 @@ async def update( @distributed_trace_async async def update( - self, name: str, taxonomy: Union[_models.EvaluationTaxonomy, JSON, IO[bytes]], **kwargs: Any + self, + name: str, + taxonomy: Union[_models.EvaluationTaxonomy, _types.EvaluationTaxonomy, IO[bytes]], + **kwargs: Any ) -> _models.EvaluationTaxonomy: """Update an evaluation taxonomy. @@ -5797,9 +5855,10 @@ async def update( :param name: The name of the evaluation taxonomy. Required. :type name: str - :param taxonomy: The evaluation taxonomy. Is one of the following types: EvaluationTaxonomy, - JSON, IO[bytes] Required. - :type taxonomy: ~azure.ai.projects.models.EvaluationTaxonomy or JSON or IO[bytes] + :param taxonomy: The evaluation taxonomy. Is either a EvaluationTaxonomy type or a IO[bytes] + type. Required. + :type taxonomy: ~azure.ai.projects.models.EvaluationTaxonomy or + ~azure.ai.projects.types.EvaluationTaxonomy or IO[bytes] :return: EvaluationTaxonomy. The EvaluationTaxonomy is compatible with MutableMapping :rtype: ~azure.ai.projects.models.EvaluationTaxonomy :raises ~azure.core.exceptions.HttpResponseError: @@ -6243,7 +6302,12 @@ async def create_version( @overload async def create_version( - self, name: str, evaluator_version: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + name: str, + evaluator_version: _types.EvaluatorVersion, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.EvaluatorVersion: """Create an evaluator version. @@ -6252,7 +6316,7 @@ async def create_version( :param name: The name of the resource. Required. :type name: str :param evaluator_version: Required. - :type evaluator_version: JSON + :type evaluator_version: ~azure.ai.projects.types.EvaluatorVersion :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -6283,7 +6347,10 @@ async def create_version( @distributed_trace_async async def create_version( - self, name: str, evaluator_version: Union[_models.EvaluatorVersion, JSON, IO[bytes]], **kwargs: Any + self, + name: str, + evaluator_version: Union[_models.EvaluatorVersion, _types.EvaluatorVersion, IO[bytes]], + **kwargs: Any ) -> _models.EvaluatorVersion: """Create an evaluator version. @@ -6291,9 +6358,9 @@ async def create_version( :param name: The name of the resource. Required. :type name: str - :param evaluator_version: Is one of the following types: EvaluatorVersion, JSON, IO[bytes] - Required. - :type evaluator_version: ~azure.ai.projects.models.EvaluatorVersion or JSON or IO[bytes] + :param evaluator_version: Is either a EvaluatorVersion type or a IO[bytes] type. Required. + :type evaluator_version: ~azure.ai.projects.models.EvaluatorVersion or + ~azure.ai.projects.types.EvaluatorVersion or IO[bytes] :return: EvaluatorVersion. The EvaluatorVersion is compatible with MutableMapping :rtype: ~azure.ai.projects.models.EvaluatorVersion :raises ~azure.core.exceptions.HttpResponseError: @@ -6389,7 +6456,13 @@ async def update_version( @overload async def update_version( - self, name: str, version: str, evaluator_version: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + name: str, + version: str, + evaluator_version: _types.EvaluatorVersion, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.EvaluatorVersion: """Update an evaluator version. @@ -6400,7 +6473,7 @@ async def update_version( :param version: The version of the EvaluatorVersion to update. Required. :type version: str :param evaluator_version: Evaluator resource. Required. - :type evaluator_version: JSON + :type evaluator_version: ~azure.ai.projects.types.EvaluatorVersion :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -6442,7 +6515,7 @@ async def update_version( self, name: str, version: str, - evaluator_version: Union[_models.EvaluatorVersion, JSON, IO[bytes]], + evaluator_version: Union[_models.EvaluatorVersion, _types.EvaluatorVersion, IO[bytes]], **kwargs: Any ) -> _models.EvaluatorVersion: """Update an evaluator version. @@ -6453,9 +6526,10 @@ async def update_version( :type name: str :param version: The version of the EvaluatorVersion to update. Required. :type version: str - :param evaluator_version: Evaluator resource. Is one of the following types: EvaluatorVersion, - JSON, IO[bytes] Required. - :type evaluator_version: ~azure.ai.projects.models.EvaluatorVersion or JSON or IO[bytes] + :param evaluator_version: Evaluator resource. Is either a EvaluatorVersion type or a IO[bytes] + type. Required. + :type evaluator_version: ~azure.ai.projects.models.EvaluatorVersion or + ~azure.ai.projects.types.EvaluatorVersion or IO[bytes] :return: EvaluatorVersion. The EvaluatorVersion is compatible with MutableMapping :rtype: ~azure.ai.projects.models.EvaluatorVersion :raises ~azure.core.exceptions.HttpResponseError: @@ -6556,7 +6630,7 @@ async def pending_upload( self, name: str, version: str, - pending_upload_request: JSON, + pending_upload_request: _types.PendingUploadRequest, *, content_type: str = "application/json", **kwargs: Any @@ -6571,7 +6645,7 @@ async def pending_upload( :param version: The specific version id of the EvaluatorVersion to operate on. Required. :type version: str :param pending_upload_request: The pending upload request parameters. Required. - :type pending_upload_request: JSON + :type pending_upload_request: ~azure.ai.projects.types.PendingUploadRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -6614,7 +6688,7 @@ async def pending_upload( self, name: str, version: str, - pending_upload_request: Union[_models.PendingUploadRequest, JSON, IO[bytes]], + pending_upload_request: Union[_models.PendingUploadRequest, _types.PendingUploadRequest, IO[bytes]], **kwargs: Any ) -> _models.PendingUploadResponse: """Start a pending upload. @@ -6626,10 +6700,10 @@ async def pending_upload( :type name: str :param version: The specific version id of the EvaluatorVersion to operate on. Required. :type version: str - :param pending_upload_request: The pending upload request parameters. Is one of the following - types: PendingUploadRequest, JSON, IO[bytes] Required. - :type pending_upload_request: ~azure.ai.projects.models.PendingUploadRequest or JSON or - IO[bytes] + :param pending_upload_request: The pending upload request parameters. Is either a + PendingUploadRequest type or a IO[bytes] type. Required. + :type pending_upload_request: ~azure.ai.projects.models.PendingUploadRequest or + ~azure.ai.projects.types.PendingUploadRequest or IO[bytes] :return: PendingUploadResponse. The PendingUploadResponse is compatible with MutableMapping :rtype: ~azure.ai.projects.models.PendingUploadResponse :raises ~azure.core.exceptions.HttpResponseError: @@ -6734,7 +6808,7 @@ async def get_credentials( self, name: str, version: str, - credential_request: JSON, + credential_request: _types.EvaluatorCredentialRequest, *, content_type: str = "application/json", **kwargs: Any @@ -6749,7 +6823,7 @@ async def get_credentials( :param version: The specific version id of the EvaluatorVersion to operate on. Required. :type version: str :param credential_request: The credential request parameters. Required. - :type credential_request: JSON + :type credential_request: ~azure.ai.projects.types.EvaluatorCredentialRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -6792,7 +6866,7 @@ async def get_credentials( self, name: str, version: str, - credential_request: Union[_models.EvaluatorCredentialRequest, JSON, IO[bytes]], + credential_request: Union[_models.EvaluatorCredentialRequest, _types.EvaluatorCredentialRequest, IO[bytes]], **kwargs: Any ) -> _models.DatasetCredential: """Get evaluator credentials. @@ -6804,10 +6878,10 @@ async def get_credentials( :type name: str :param version: The specific version id of the EvaluatorVersion to operate on. Required. :type version: str - :param credential_request: The credential request parameters. Is one of the following types: - EvaluatorCredentialRequest, JSON, IO[bytes] Required. - :type credential_request: ~azure.ai.projects.models.EvaluatorCredentialRequest or JSON or - IO[bytes] + :param credential_request: The credential request parameters. Is either a + EvaluatorCredentialRequest type or a IO[bytes] type. Required. + :type credential_request: ~azure.ai.projects.models.EvaluatorCredentialRequest or + ~azure.ai.projects.types.EvaluatorCredentialRequest or IO[bytes] :return: DatasetCredential. The DatasetCredential is compatible with MutableMapping :rtype: ~azure.ai.projects.models.DatasetCredential :raises ~azure.core.exceptions.HttpResponseError: @@ -6907,7 +6981,12 @@ async def create_generation_job( @overload async def create_generation_job( - self, job: JSON, *, operation_id: Optional[str] = None, content_type: str = "application/json", **kwargs: Any + self, + job: _types.EvaluatorGenerationJob, + *, + operation_id: Optional[str] = None, + content_type: str = "application/json", + **kwargs: Any ) -> _models.EvaluatorGenerationJob: """Create an evaluator generation job. @@ -6915,7 +6994,7 @@ async def create_generation_job( from the provided source materials asynchronously. :param job: The job to create. Required. - :type job: JSON + :type job: ~azure.ai.projects.types.EvaluatorGenerationJob :keyword operation_id: Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. Default value is None. :paramtype operation_id: str @@ -6957,7 +7036,7 @@ async def create_generation_job( @distributed_trace_async async def create_generation_job( self, - job: Union[_models.EvaluatorGenerationJob, JSON, IO[bytes]], + job: Union[_models.EvaluatorGenerationJob, _types.EvaluatorGenerationJob, IO[bytes]], *, operation_id: Optional[str] = None, **kwargs: Any @@ -6967,9 +7046,10 @@ async def create_generation_job( Creates an evaluator generation job. The service generates rubric-based evaluator definitions from the provided source materials asynchronously. - :param job: The job to create. Is one of the following types: EvaluatorGenerationJob, JSON, - IO[bytes] Required. - :type job: ~azure.ai.projects.models.EvaluatorGenerationJob or JSON or IO[bytes] + :param job: The job to create. Is either a EvaluatorGenerationJob type or a IO[bytes] type. + Required. + :type job: ~azure.ai.projects.models.EvaluatorGenerationJob or + ~azure.ai.projects.types.EvaluatorGenerationJob or IO[bytes] :keyword operation_id: Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. Default value is None. :paramtype operation_id: str @@ -7372,7 +7452,7 @@ async def generate( @overload async def generate( - self, insight: JSON, *, content_type: str = "application/json", **kwargs: Any + self, insight: _types.Insight, *, content_type: str = "application/json", **kwargs: Any ) -> _models.Insight: """Generate insights. @@ -7380,7 +7460,7 @@ async def generate( :param insight: Complete evaluation configuration including data source, evaluators, and result settings. Required. - :type insight: JSON + :type insight: ~azure.ai.projects.types.Insight :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -7409,14 +7489,17 @@ async def generate( """ @distributed_trace_async - async def generate(self, insight: Union[_models.Insight, JSON, IO[bytes]], **kwargs: Any) -> _models.Insight: + async def generate( + self, insight: Union[_models.Insight, _types.Insight, IO[bytes]], **kwargs: Any + ) -> _models.Insight: """Generate insights. Generates an insights report from the provided evaluation configuration. :param insight: Complete evaluation configuration including data source, evaluators, and result - settings. Is one of the following types: Insight, JSON, IO[bytes] Required. - :type insight: ~azure.ai.projects.models.Insight or JSON or IO[bytes] + settings. Is either a Insight type or a IO[bytes] type. Required. + :type insight: ~azure.ai.projects.models.Insight or ~azure.ai.projects.types.Insight or + IO[bytes] :return: Insight. The Insight is compatible with MutableMapping :rtype: ~azure.ai.projects.models.Insight :raises ~azure.core.exceptions.HttpResponseError: @@ -7730,14 +7813,14 @@ async def create( @overload async def create( - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, body: _types.CreateMemoryStoreRequest, *, content_type: str = "application/json", **kwargs: Any ) -> _models.MemoryStoreDetails: """Create a memory store. Creates a memory store resource with the provided configuration. :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.CreateMemoryStoreRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -7767,7 +7850,7 @@ async def create( @distributed_trace_async async def create( self, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.CreateMemoryStoreRequest, IO[bytes]] = _Unset, *, name: str = _Unset, definition: _models.MemoryStoreDefinition = _Unset, @@ -7779,8 +7862,8 @@ async def create( Creates a memory store resource with the provided configuration. - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, CreateMemoryStoreRequest, IO[bytes] Required. + :type body: JSON or ~azure.ai.projects.types.CreateMemoryStoreRequest or IO[bytes] :keyword name: The name of the memory store. Required. :paramtype name: str :keyword definition: The memory store definition. Required. @@ -7896,7 +7979,7 @@ async def update( @overload async def update( - self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, name: str, body: _types.UpdateMemoryStoreRequest, *, content_type: str = "application/json", **kwargs: Any ) -> _models.MemoryStoreDetails: """Update a memory store. @@ -7905,7 +7988,7 @@ async def update( :param name: The name of the memory store to update. Required. :type name: str :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.UpdateMemoryStoreRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -7938,7 +8021,7 @@ async def update( async def update( self, name: str, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.UpdateMemoryStoreRequest, IO[bytes]] = _Unset, *, description: Optional[str] = None, metadata: Optional[dict[str, str]] = None, @@ -7950,8 +8033,8 @@ async def update( :param name: The name of the memory store to update. Required. :type name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, UpdateMemoryStoreRequest, IO[bytes] Required. + :type body: JSON or ~azure.ai.projects.types.UpdateMemoryStoreRequest or IO[bytes] :keyword description: A human-readable description of the memory store. Default value is None. :paramtype description: str :keyword metadata: Arbitrary key-value metadata to associate with the memory store. Default @@ -8269,7 +8352,7 @@ async def _search_memories( ) -> _models.MemoryStoreSearchResult: ... @overload async def _search_memories( - self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, name: str, body: _types.SearchMemoriesRequest, *, content_type: str = "application/json", **kwargs: Any ) -> _models.MemoryStoreSearchResult: ... @overload async def _search_memories( @@ -8280,7 +8363,7 @@ async def _search_memories( async def _search_memories( self, name: str, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.SearchMemoriesRequest, IO[bytes]] = _Unset, *, scope: str = _Unset, items: Optional[List[dict[str, Any]]] = None, @@ -8294,8 +8377,8 @@ async def _search_memories( :param name: The name of the memory store to search. Required. :type name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, SearchMemoriesRequest, IO[bytes] Required. + :type body: JSON or ~azure.ai.projects.types.SearchMemoriesRequest or IO[bytes] :keyword scope: The namespace that logically groups and isolates memories, such as a user ID. Required. :paramtype scope: str @@ -8383,7 +8466,7 @@ async def _search_memories( async def _update_memories_initial( self, name: str, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.UpdateMemoriesRequest, IO[bytes]] = _Unset, *, scope: str = _Unset, items: Optional[List[dict[str, Any]]] = None, @@ -8479,7 +8562,7 @@ async def _begin_update_memories( ) -> AsyncLROPoller[_models.MemoryStoreUpdateCompletedResult]: ... @overload async def _begin_update_memories( - self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, name: str, body: _types.UpdateMemoriesRequest, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.MemoryStoreUpdateCompletedResult]: ... @overload async def _begin_update_memories( @@ -8490,7 +8573,7 @@ async def _begin_update_memories( async def _begin_update_memories( self, name: str, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.UpdateMemoriesRequest, IO[bytes]] = _Unset, *, scope: str = _Unset, items: Optional[List[dict[str, Any]]] = None, @@ -8505,8 +8588,8 @@ async def _begin_update_memories( :param name: The name of the memory store to update. Required. :type name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, UpdateMemoriesRequest, IO[bytes] Required. + :type body: JSON or ~azure.ai.projects.types.UpdateMemoriesRequest or IO[bytes] :keyword scope: The namespace that logically groups and isolates memories, such as a user ID. Required. :paramtype scope: str @@ -8612,7 +8695,7 @@ async def delete_scope( @overload async def delete_scope( - self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, name: str, body: _types.DeleteScopeRequest, *, content_type: str = "application/json", **kwargs: Any ) -> _models.MemoryStoreDeleteScopeResult: """Delete memories by scope. @@ -8621,7 +8704,7 @@ async def delete_scope( :param name: The name of the memory store. Required. :type name: str :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.DeleteScopeRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -8654,7 +8737,12 @@ async def delete_scope( @distributed_trace_async async def delete_scope( - self, name: str, body: Union[JSON, IO[bytes]] = _Unset, *, scope: str = _Unset, **kwargs: Any + self, + name: str, + body: Union[JSON, _types.DeleteScopeRequest, IO[bytes]] = _Unset, + *, + scope: str = _Unset, + **kwargs: Any ) -> _models.MemoryStoreDeleteScopeResult: """Delete memories by scope. @@ -8662,8 +8750,8 @@ async def delete_scope( :param name: The name of the memory store. Required. :type name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, DeleteScopeRequest, IO[bytes] Required. + :type body: JSON or ~azure.ai.projects.types.DeleteScopeRequest or IO[bytes] :keyword scope: The namespace that logically groups and isolates memories to delete, such as a user ID. Required. :paramtype scope: str @@ -8777,7 +8865,7 @@ async def create_memory( @overload async def create_memory( - self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, name: str, body: _types.CreateMemoryRequest, *, content_type: str = "application/json", **kwargs: Any ) -> _models.MemoryItem: """Create a memory item. @@ -8786,7 +8874,7 @@ async def create_memory( :param name: The name of the memory store. Required. :type name: str :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.CreateMemoryRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -8819,7 +8907,7 @@ async def create_memory( async def create_memory( self, name: str, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.CreateMemoryRequest, IO[bytes]] = _Unset, *, scope: str = _Unset, content: str = _Unset, @@ -8832,8 +8920,8 @@ async def create_memory( :param name: The name of the memory store. Required. :type name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, CreateMemoryRequest, IO[bytes] Required. + :type body: JSON or ~azure.ai.projects.types.CreateMemoryRequest or IO[bytes] :keyword scope: The namespace that logically groups and isolates memories, such as a user ID. Required. :paramtype scope: str @@ -8944,7 +9032,13 @@ async def update_memory( @overload async def update_memory( - self, name: str, memory_id: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + name: str, + memory_id: str, + body: _types.UpdateMemoryRequest, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.MemoryItem: """Update a memory item. @@ -8955,7 +9049,7 @@ async def update_memory( :param memory_id: The ID of the memory item to update. Required. :type memory_id: str :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.UpdateMemoryRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -8988,7 +9082,13 @@ async def update_memory( @distributed_trace_async async def update_memory( - self, name: str, memory_id: str, body: Union[JSON, IO[bytes]] = _Unset, *, content: str = _Unset, **kwargs: Any + self, + name: str, + memory_id: str, + body: Union[JSON, _types.UpdateMemoryRequest, IO[bytes]] = _Unset, + *, + content: str = _Unset, + **kwargs: Any ) -> _models.MemoryItem: """Update a memory item. @@ -8998,8 +9098,8 @@ async def update_memory( :type name: str :param memory_id: The ID of the memory item to update. Required. :type memory_id: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, UpdateMemoryRequest, IO[bytes] Required. + :type body: JSON or ~azure.ai.projects.types.UpdateMemoryRequest or IO[bytes] :keyword content: The updated content of the memory. Required. :paramtype content: str :return: MemoryItem. The MemoryItem is compatible with MutableMapping @@ -9198,7 +9298,7 @@ def list_memories( def list_memories( self, name: str, - body: JSON, + body: _types.ListMemoriesRequest, *, kind: Optional[Union[str, _models.MemoryItemKind]] = None, limit: Optional[int] = None, @@ -9214,7 +9314,7 @@ def list_memories( :param name: The name of the memory store. Required. :type name: str :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.ListMemoriesRequest :keyword kind: The kind of the memory item. Known values are: "user_profile", "chat_summary", and "procedural". Default value is None. :paramtype kind: str or ~azure.ai.projects.models.MemoryItemKind @@ -9290,7 +9390,7 @@ def list_memories( def list_memories( self, name: str, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.ListMemoriesRequest, IO[bytes]] = _Unset, *, scope: str = _Unset, kind: Optional[Union[str, _models.MemoryItemKind]] = None, @@ -9305,8 +9405,8 @@ def list_memories( :param name: The name of the memory store. Required. :type name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, ListMemoriesRequest, IO[bytes] Required. + :type body: JSON or ~azure.ai.projects.types.ListMemoriesRequest or IO[bytes] :keyword scope: The namespace that logically groups and isolates memories, such as a user ID. Required. :paramtype scope: str @@ -9833,7 +9933,7 @@ async def update( self, name: str, version: str, - model_version_update: JSON, + model_version_update: _types.UpdateModelVersionRequest, *, content_type: str = "application/merge-patch+json", **kwargs: Any @@ -9848,7 +9948,7 @@ async def update( Required. :type version: str :param model_version_update: The UpdateModelVersionRequest to create or update. Required. - :type model_version_update: JSON + :type model_version_update: ~azure.ai.projects.types.UpdateModelVersionRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/merge-patch+json". :paramtype content_type: str @@ -9891,7 +9991,7 @@ async def update( self, name: str, version: str, - model_version_update: Union[_models.UpdateModelVersionRequest, JSON, IO[bytes]], + model_version_update: Union[_models.UpdateModelVersionRequest, _types.UpdateModelVersionRequest, IO[bytes]], **kwargs: Any ) -> _models.ModelVersion: """Update a model version. @@ -9903,10 +10003,10 @@ async def update( :param version: The specific version id of the UpdateModelVersionRequest to create or update. Required. :type version: str - :param model_version_update: The UpdateModelVersionRequest to create or update. Is one of the - following types: UpdateModelVersionRequest, JSON, IO[bytes] Required. - :type model_version_update: ~azure.ai.projects.models.UpdateModelVersionRequest or JSON or - IO[bytes] + :param model_version_update: The UpdateModelVersionRequest to create or update. Is either a + UpdateModelVersionRequest type or a IO[bytes] type. Required. + :type model_version_update: ~azure.ai.projects.models.UpdateModelVersionRequest or + ~azure.ai.projects.types.UpdateModelVersionRequest or IO[bytes] :return: ModelVersion. The ModelVersion is compatible with MutableMapping :rtype: ~azure.ai.projects.models.ModelVersion :raises ~azure.core.exceptions.HttpResponseError: @@ -10004,7 +10104,13 @@ async def pending_create_version( @overload async def pending_create_version( - self, name: str, version: str, model_version: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + name: str, + version: str, + model_version: _types.ModelVersion, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.CreateAsyncResponse: """Create a model version async. @@ -10016,7 +10122,7 @@ async def pending_create_version( :param version: Version of the model. Required. :type version: str :param model_version: Model version to create. Required. - :type model_version: JSON + :type model_version: ~azure.ai.projects.types.ModelVersion :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -10056,7 +10162,11 @@ async def pending_create_version( @distributed_trace_async async def pending_create_version( - self, name: str, version: str, model_version: Union[_models.ModelVersion, JSON, IO[bytes]], **kwargs: Any + self, + name: str, + version: str, + model_version: Union[_models.ModelVersion, _types.ModelVersion, IO[bytes]], + **kwargs: Any ) -> _models.CreateAsyncResponse: """Create a model version async. @@ -10067,9 +10177,10 @@ async def pending_create_version( :type name: str :param version: Version of the model. Required. :type version: str - :param model_version: Model version to create. Is one of the following types: ModelVersion, - JSON, IO[bytes] Required. - :type model_version: ~azure.ai.projects.models.ModelVersion or JSON or IO[bytes] + :param model_version: Model version to create. Is either a ModelVersion type or a IO[bytes] + type. Required. + :type model_version: ~azure.ai.projects.models.ModelVersion or + ~azure.ai.projects.types.ModelVersion or IO[bytes] :return: CreateAsyncResponse. The CreateAsyncResponse is compatible with MutableMapping :rtype: ~azure.ai.projects.models.CreateAsyncResponse :raises ~azure.core.exceptions.HttpResponseError: @@ -10173,7 +10284,7 @@ async def pending_upload( self, name: str, version: str, - pending_upload_request: JSON, + pending_upload_request: _types.ModelPendingUploadRequest, *, content_type: str = "application/json", **kwargs: Any @@ -10187,7 +10298,7 @@ async def pending_upload( :param version: Version of the model. Required. :type version: str :param pending_upload_request: Required. - :type pending_upload_request: JSON + :type pending_upload_request: ~azure.ai.projects.types.ModelPendingUploadRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -10231,7 +10342,7 @@ async def pending_upload( self, name: str, version: str, - pending_upload_request: Union[_models.ModelPendingUploadRequest, JSON, IO[bytes]], + pending_upload_request: Union[_models.ModelPendingUploadRequest, _types.ModelPendingUploadRequest, IO[bytes]], **kwargs: Any ) -> _models.ModelPendingUploadResponse: """Start a pending upload. @@ -10242,10 +10353,10 @@ async def pending_upload( :type name: str :param version: Version of the model. Required. :type version: str - :param pending_upload_request: Is one of the following types: ModelPendingUploadRequest, JSON, - IO[bytes] Required. - :type pending_upload_request: ~azure.ai.projects.models.ModelPendingUploadRequest or JSON or - IO[bytes] + :param pending_upload_request: Is either a ModelPendingUploadRequest type or a IO[bytes] type. + Required. + :type pending_upload_request: ~azure.ai.projects.models.ModelPendingUploadRequest or + ~azure.ai.projects.types.ModelPendingUploadRequest or IO[bytes] :return: ModelPendingUploadResponse. The ModelPendingUploadResponse is compatible with MutableMapping :rtype: ~azure.ai.projects.models.ModelPendingUploadResponse @@ -10346,7 +10457,7 @@ async def get_credentials( self, name: str, version: str, - credential_request: JSON, + credential_request: _types.ModelCredentialRequest, *, content_type: str = "application/json", **kwargs: Any @@ -10360,7 +10471,7 @@ async def get_credentials( :param version: Version of the model. Required. :type version: str :param credential_request: Required. - :type credential_request: JSON + :type credential_request: ~azure.ai.projects.types.ModelCredentialRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -10402,7 +10513,7 @@ async def get_credentials( self, name: str, version: str, - credential_request: Union[_models.ModelCredentialRequest, JSON, IO[bytes]], + credential_request: Union[_models.ModelCredentialRequest, _types.ModelCredentialRequest, IO[bytes]], **kwargs: Any ) -> _models.DatasetCredential: """Get model asset credentials. @@ -10413,9 +10524,10 @@ async def get_credentials( :type name: str :param version: Version of the model. Required. :type version: str - :param credential_request: Is one of the following types: ModelCredentialRequest, JSON, - IO[bytes] Required. - :type credential_request: ~azure.ai.projects.models.ModelCredentialRequest or JSON or IO[bytes] + :param credential_request: Is either a ModelCredentialRequest type or a IO[bytes] type. + Required. + :type credential_request: ~azure.ai.projects.models.ModelCredentialRequest or + ~azure.ai.projects.types.ModelCredentialRequest or IO[bytes] :return: DatasetCredential. The DatasetCredential is compatible with MutableMapping :rtype: ~azure.ai.projects.models.DatasetCredential :raises ~azure.core.exceptions.HttpResponseError: @@ -10672,13 +10784,15 @@ async def create( """ @overload - async def create(self, red_team: JSON, *, content_type: str = "application/json", **kwargs: Any) -> _models.RedTeam: + async def create( + self, red_team: _types.RedTeam, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.RedTeam: """Create a redteam run. Submits a new redteam run for execution with the provided configuration. :param red_team: Redteam to be run. Required. - :type red_team: JSON + :type red_team: ~azure.ai.projects.types.RedTeam :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -10706,14 +10820,16 @@ async def create( """ @distributed_trace_async - async def create(self, red_team: Union[_models.RedTeam, JSON, IO[bytes]], **kwargs: Any) -> _models.RedTeam: + async def create( + self, red_team: Union[_models.RedTeam, _types.RedTeam, IO[bytes]], **kwargs: Any + ) -> _models.RedTeam: """Create a redteam run. Submits a new redteam run for execution with the provided configuration. - :param red_team: Redteam to be run. Is one of the following types: RedTeam, JSON, IO[bytes] - Required. - :type red_team: ~azure.ai.projects.models.RedTeam or JSON or IO[bytes] + :param red_team: Redteam to be run. Is either a RedTeam type or a IO[bytes] type. Required. + :type red_team: ~azure.ai.projects.models.RedTeam or ~azure.ai.projects.types.RedTeam or + IO[bytes] :return: RedTeam. The RedTeam is compatible with MutableMapping :rtype: ~azure.ai.projects.models.RedTeam :raises ~azure.core.exceptions.HttpResponseError: @@ -10837,7 +10953,12 @@ async def create_or_update( @overload async def create_or_update( - self, routine_name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + routine_name: str, + body: _types.CreateOrUpdateRoutineRequest, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.Routine: """Create or update a routine. @@ -10846,7 +10967,7 @@ async def create_or_update( :param routine_name: The unique name of the routine. Required. :type routine_name: str :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.CreateOrUpdateRoutineRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -10879,7 +11000,7 @@ async def create_or_update( async def create_or_update( self, routine_name: str, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.CreateOrUpdateRoutineRequest, IO[bytes]] = _Unset, *, description: Optional[str] = None, enabled: Optional[bool] = None, @@ -10893,8 +11014,9 @@ async def create_or_update( :param routine_name: The unique name of the routine. Required. :type routine_name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, CreateOrUpdateRoutineRequest, IO[bytes] + Required. + :type body: JSON or ~azure.ai.projects.types.CreateOrUpdateRoutineRequest or IO[bytes] :keyword description: A human-readable description of the routine. Default value is None. :paramtype description: str :keyword enabled: Whether the routine is enabled. Default value is None. @@ -11435,7 +11557,12 @@ async def dispatch( @overload async def dispatch( - self, routine_name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + routine_name: str, + body: _types.DispatchRoutineAsyncRequest, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.DispatchRoutineResult: """Queue an asynchronous routine dispatch. @@ -11444,7 +11571,7 @@ async def dispatch( :param routine_name: The unique name of the routine. Required. :type routine_name: str :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.DispatchRoutineAsyncRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -11477,7 +11604,7 @@ async def dispatch( async def dispatch( self, routine_name: str, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.DispatchRoutineAsyncRequest, IO[bytes]] = _Unset, *, payload: Optional[_models.RoutineDispatchPayload] = None, **kwargs: Any @@ -11488,8 +11615,9 @@ async def dispatch( :param routine_name: The unique name of the routine. Required. :type routine_name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, DispatchRoutineAsyncRequest, IO[bytes] + Required. + :type body: JSON or ~azure.ai.projects.types.DispatchRoutineAsyncRequest or IO[bytes] :keyword payload: A direct action-input override sent downstream when testing a routine. Default value is None. :paramtype payload: ~azure.ai.projects.models.RoutineDispatchPayload @@ -11821,7 +11949,7 @@ async def create_or_update( @overload async def create_or_update( - self, schedule_id: str, schedule: JSON, *, content_type: str = "application/json", **kwargs: Any + self, schedule_id: str, schedule: _types.Schedule, *, content_type: str = "application/json", **kwargs: Any ) -> _models.Schedule: """Create or update a schedule. @@ -11830,7 +11958,7 @@ async def create_or_update( :param schedule_id: Identifier of the schedule. Required. :type schedule_id: str :param schedule: The resource instance. Required. - :type schedule: JSON + :type schedule: ~azure.ai.projects.types.Schedule :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -11861,7 +11989,7 @@ async def create_or_update( @distributed_trace_async async def create_or_update( - self, schedule_id: str, schedule: Union[_models.Schedule, JSON, IO[bytes]], **kwargs: Any + self, schedule_id: str, schedule: Union[_models.Schedule, _types.Schedule, IO[bytes]], **kwargs: Any ) -> _models.Schedule: """Create or update a schedule. @@ -11869,9 +11997,10 @@ async def create_or_update( :param schedule_id: Identifier of the schedule. Required. :type schedule_id: str - :param schedule: The resource instance. Is one of the following types: Schedule, JSON, - IO[bytes] Required. - :type schedule: ~azure.ai.projects.models.Schedule or JSON or IO[bytes] + :param schedule: The resource instance. Is either a Schedule type or a IO[bytes] type. + Required. + :type schedule: ~azure.ai.projects.models.Schedule or ~azure.ai.projects.types.Schedule or + IO[bytes] :return: Schedule. The Schedule is compatible with MutableMapping :rtype: ~azure.ai.projects.models.Schedule :raises ~azure.core.exceptions.HttpResponseError: @@ -12314,7 +12443,7 @@ async def update( @overload async def update( - self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, name: str, body: _types.UpdateSkillRequest, *, content_type: str = "application/json", **kwargs: Any ) -> _models.SkillDetails: """Update a skill. @@ -12323,7 +12452,7 @@ async def update( :param name: The name of the skill to update. Required. :type name: str :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.UpdateSkillRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -12354,7 +12483,12 @@ async def update( @distributed_trace_async async def update( - self, name: str, body: Union[JSON, IO[bytes]] = _Unset, *, default_version: str = _Unset, **kwargs: Any + self, + name: str, + body: Union[JSON, _types.UpdateSkillRequest, IO[bytes]] = _Unset, + *, + default_version: str = _Unset, + **kwargs: Any ) -> _models.SkillDetails: """Update a skill. @@ -12362,8 +12496,8 @@ async def update( :param name: The name of the skill to update. Required. :type name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, UpdateSkillRequest, IO[bytes] Required. + :type body: JSON or ~azure.ai.projects.types.UpdateSkillRequest or IO[bytes] :keyword default_version: The version identifier that the skill should point to. When set, the skill's default version will resolve to this version instead of the latest. Required. :paramtype default_version: str @@ -12539,7 +12673,12 @@ async def create( @overload async def create( - self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + name: str, + body: _types.CreateSkillVersionRequest, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.SkillVersion: """Create a new version of a skill. @@ -12548,7 +12687,7 @@ async def create( :param name: The name of the skill. If the skill does not exist, it will be created. Required. :type name: str :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.CreateSkillVersionRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -12581,7 +12720,7 @@ async def create( async def create( self, name: str, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.CreateSkillVersionRequest, IO[bytes]] = _Unset, *, inline_content: Optional[_models.SkillInlineContent] = None, default: Optional[bool] = None, @@ -12593,8 +12732,9 @@ async def create( :param name: The name of the skill. If the skill does not exist, it will be created. Required. :type name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, CreateSkillVersionRequest, IO[bytes] + Required. + :type body: JSON or ~azure.ai.projects.types.CreateSkillVersionRequest or IO[bytes] :keyword inline_content: Inline skill content for simple skills without file uploads. Foundry-specific extension. Default value is None. :paramtype inline_content: ~azure.ai.projects.models.SkillInlineContent @@ -12690,7 +12830,9 @@ async def create_from_files( """ @overload - async def create_from_files(self, name: str, content: JSON, **kwargs: Any) -> _models.SkillVersion: + async def create_from_files( + self, name: str, content: _types.CreateSkillVersionFromFilesBody, **kwargs: Any + ) -> _models.SkillVersion: """Create a skill version from uploaded files. Creates a new version of a skill from uploaded files via multipart form data. @@ -12698,7 +12840,7 @@ async def create_from_files(self, name: str, content: JSON, **kwargs: Any) -> _m :param name: The name of the skill. Required. :type name: str :param content: Required. - :type content: JSON + :type content: ~azure.ai.projects.types.CreateSkillVersionFromFilesBody :return: SkillVersion. The SkillVersion is compatible with MutableMapping :rtype: ~azure.ai.projects.models.SkillVersion :raises ~azure.core.exceptions.HttpResponseError: @@ -12706,7 +12848,10 @@ async def create_from_files(self, name: str, content: JSON, **kwargs: Any) -> _m @distributed_trace_async async def create_from_files( - self, name: str, content: Union[_models.CreateSkillVersionFromFilesBody, JSON], **kwargs: Any + self, + name: str, + content: Union[_models.CreateSkillVersionFromFilesBody, _types.CreateSkillVersionFromFilesBody], + **kwargs: Any ) -> _models.SkillVersion: """Create a skill version from uploaded files. @@ -12714,8 +12859,9 @@ async def create_from_files( :param name: The name of the skill. Required. :type name: str - :param content: Is either a CreateSkillVersionFromFilesBody type or a JSON type. Required. - :type content: ~azure.ai.projects.models.CreateSkillVersionFromFilesBody or JSON + :param content: Is one of the following types: CreateSkillVersionFromFilesBody Required. + :type content: ~azure.ai.projects.models.CreateSkillVersionFromFilesBody or + ~azure.ai.projects.types.CreateSkillVersionFromFilesBody :return: SkillVersion. The SkillVersion is compatible with MutableMapping :rtype: ~azure.ai.projects.models.SkillVersion :raises ~azure.core.exceptions.HttpResponseError: @@ -13363,14 +13509,19 @@ async def create_generation_job( @overload async def create_generation_job( - self, job: JSON, *, operation_id: Optional[str] = None, content_type: str = "application/json", **kwargs: Any + self, + job: _types.DataGenerationJob, + *, + operation_id: Optional[str] = None, + content_type: str = "application/json", + **kwargs: Any ) -> _models.DataGenerationJob: """Create a data generation job. Submits a new data generation job for asynchronous execution. :param job: The job to create. Required. - :type job: JSON + :type job: ~azure.ai.projects.types.DataGenerationJob :keyword operation_id: Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. Default value is None. :paramtype operation_id: str @@ -13411,7 +13562,7 @@ async def create_generation_job( @distributed_trace_async async def create_generation_job( self, - job: Union[_models.DataGenerationJob, JSON, IO[bytes]], + job: Union[_models.DataGenerationJob, _types.DataGenerationJob, IO[bytes]], *, operation_id: Optional[str] = None, **kwargs: Any @@ -13420,9 +13571,10 @@ async def create_generation_job( Submits a new data generation job for asynchronous execution. - :param job: The job to create. Is one of the following types: DataGenerationJob, JSON, - IO[bytes] Required. - :type job: ~azure.ai.projects.models.DataGenerationJob or JSON or IO[bytes] + :param job: The job to create. Is either a DataGenerationJob type or a IO[bytes] type. + Required. + :type job: ~azure.ai.projects.models.DataGenerationJob or + ~azure.ai.projects.types.DataGenerationJob or IO[bytes] :keyword operation_id: Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. Default value is None. :paramtype operation_id: str @@ -13667,7 +13819,12 @@ async def create_optimization_job( @overload async def create_optimization_job( - self, job: JSON, *, operation_id: Optional[str] = None, content_type: str = "application/json", **kwargs: Any + self, + job: _types.OptimizationJob, + *, + operation_id: Optional[str] = None, + content_type: str = "application/json", + **kwargs: Any ) -> _models.OptimizationJob: """Creates an agent optimization job. @@ -13675,7 +13832,7 @@ async def create_optimization_job( idempotent retry. :param job: The job to create. Required. - :type job: JSON + :type job: ~azure.ai.projects.types.OptimizationJob :keyword operation_id: Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. Default value is None. :paramtype operation_id: str @@ -13716,16 +13873,20 @@ async def create_optimization_job( @distributed_trace_async async def create_optimization_job( - self, job: Union[_models.OptimizationJob, JSON, IO[bytes]], *, operation_id: Optional[str] = None, **kwargs: Any + self, + job: Union[_models.OptimizationJob, _types.OptimizationJob, IO[bytes]], + *, + operation_id: Optional[str] = None, + **kwargs: Any ) -> _models.OptimizationJob: """Creates an agent optimization job. Create an optimization job. Returns 201 with the queued job. Honours ``Operation-Id`` for idempotent retry. - :param job: The job to create. Is one of the following types: OptimizationJob, JSON, IO[bytes] - Required. - :type job: ~azure.ai.projects.models.OptimizationJob or JSON or IO[bytes] + :param job: The job to create. Is either a OptimizationJob type or a IO[bytes] type. Required. + :type job: ~azure.ai.projects.models.OptimizationJob or + ~azure.ai.projects.types.OptimizationJob or IO[bytes] :keyword operation_id: Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. Default value is None. :paramtype operation_id: str diff --git a/sdk/ai/azure-ai-projects/azure/ai/projects/aio/operations/_patch_agents_async.py b/sdk/ai/azure-ai-projects/azure/ai/projects/aio/operations/_patch_agents_async.py index cd906a8d8498..e8420339b184 100644 --- a/sdk/ai/azure-ai-projects/azure/ai/projects/aio/operations/_patch_agents_async.py +++ b/sdk/ai/azure-ai-projects/azure/ai/projects/aio/operations/_patch_agents_async.py @@ -11,8 +11,9 @@ from typing import Union, Optional, Any, IO, overload from azure.core.exceptions import HttpResponseError from azure.core.tracing.decorator_async import distributed_trace_async -from ._operations import AgentsOperations as GeneratedAgentsOperations, JSON, _Unset +from ._operations import AgentsOperations as GeneratedAgentsOperations, _Unset from ... import models as _models +from ... import types as _types from ...operations._patch_agents import _compute_sha256_from_stream from ...models._patch import ( _FOUNDRY_FEATURES_HEADER_NAME, @@ -86,7 +87,12 @@ async def create_version( @overload async def create_version( - self, agent_name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + agent_name: str, + body: _types.CreateAgentVersionRequest, + *, + content_type: str = "application/json", + **kwargs: Any, ) -> _models.AgentVersionDetails: """Create an agent version. @@ -100,7 +106,7 @@ async def create_version( * Must not exceed 63 characters. Required. :type agent_name: str :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.CreateAgentVersionRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -138,7 +144,7 @@ async def create_version( async def create_version( self, agent_name: str, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[_types.CreateAgentVersionRequest, IO[bytes]] = _Unset, *, definition: _models.AgentDefinition = _Unset, metadata: Optional[dict[str, str]] = None, @@ -158,8 +164,9 @@ async def create_version( * Can contain hyphens in the middle * Must not exceed 63 characters. Required. :type agent_name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: CreateAgentVersionRequest, IO[bytes] + Required. + :type body: ~azure.ai.projects.types.CreateAgentVersionRequest or IO[bytes] :keyword definition: The agent definition. This can be a workflow, hosted agent, or a simple agent definition. Required. :paramtype definition: ~azure.ai.projects.models.AgentDefinition @@ -193,14 +200,20 @@ async def create_version( kwargs["headers"] = headers try: + if body is _Unset: + return await super().create_version( + agent_name, + definition=definition, + metadata=metadata, + description=description, + blueprint_reference=blueprint_reference, + draft=draft, + **kwargs, + ) + return await super().create_version( agent_name, body, - definition=definition, - metadata=metadata, - description=description, - blueprint_reference=blueprint_reference, - draft=draft, **kwargs, ) except HttpResponseError as exc: diff --git a/sdk/ai/azure-ai-projects/azure/ai/projects/aio/operations/_patch_evaluation_rules_async.py b/sdk/ai/azure-ai-projects/azure/ai/projects/aio/operations/_patch_evaluation_rules_async.py index 7e61eeb2866c..6104e6989700 100644 --- a/sdk/ai/azure-ai-projects/azure/ai/projects/aio/operations/_patch_evaluation_rules_async.py +++ b/sdk/ai/azure-ai-projects/azure/ai/projects/aio/operations/_patch_evaluation_rules_async.py @@ -11,8 +11,9 @@ from typing import Union, Any, IO, overload from azure.core.exceptions import HttpResponseError from azure.core.tracing.decorator_async import distributed_trace_async -from ._operations import EvaluationRulesOperations as GeneratedEvaluationRulesOperations, JSON +from ._operations import EvaluationRulesOperations as GeneratedEvaluationRulesOperations from ... import models as _models +from ... import types as _types from ...models._enums import _FoundryFeaturesOptInKeys from ...models._patch import ( _FOUNDRY_FEATURES_HEADER_NAME, @@ -53,14 +54,16 @@ async def create_or_update( @overload async def create_or_update( - self, id: str, evaluation_rule: JSON, *, content_type: str = "application/json", **kwargs: Any + self, id: str, evaluation_rule: _types.EvaluationRule, *, content_type: str = "application/json", **kwargs: Any ) -> _models.EvaluationRule: """Create or update an evaluation rule. + Creates a new evaluation rule, or replaces the existing rule when the identifier matches. + :param id: Unique identifier for the evaluation rule. Required. :type id: str :param evaluation_rule: Evaluation rule resource. Required. - :type evaluation_rule: JSON + :type evaluation_rule: ~azure.ai.projects.types.EvaluationRule :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -91,15 +94,18 @@ async def create_or_update( @distributed_trace_async async def create_or_update( - self, id: str, evaluation_rule: Union[_models.EvaluationRule, JSON, IO[bytes]], **kwargs: Any + self, id: str, evaluation_rule: Union[_models.EvaluationRule, _types.EvaluationRule, IO[bytes]], **kwargs: Any ) -> _models.EvaluationRule: """Create or update an evaluation rule. + Creates a new evaluation rule, or replaces the existing rule when the identifier matches. + :param id: Unique identifier for the evaluation rule. Required. :type id: str - :param evaluation_rule: Evaluation rule resource. Is one of the following types: - EvaluationRule, JSON, IO[bytes] Required. - :type evaluation_rule: ~azure.ai.projects.models.EvaluationRule or JSON or IO[bytes] + :param evaluation_rule: Evaluation rule resource. Is either a EvaluationRule type or a + IO[bytes] type. Required. + :type evaluation_rule: ~azure.ai.projects.models.EvaluationRule or + ~azure.ai.projects.types.EvaluationRule or IO[bytes] :return: EvaluationRule. The EvaluationRule is compatible with MutableMapping :rtype: ~azure.ai.projects.models.EvaluationRule :raises ~azure.core.exceptions.HttpResponseError: diff --git a/sdk/ai/azure-ai-projects/azure/ai/projects/models/_models.py b/sdk/ai/azure-ai-projects/azure/ai/projects/models/_models.py index 529b03a4859a..e60e1afec05a 100644 --- a/sdk/ai/azure-ai-projects/azure/ai/projects/models/_models.py +++ b/sdk/ai/azure-ai-projects/azure/ai/projects/models/_models.py @@ -58,7 +58,7 @@ ) if TYPE_CHECKING: - from .. import _types, models as _models + from .. import _unions, models as _models class _CreateAgentVersionFromCodeContent(_Model): @@ -161,17 +161,16 @@ class Tool(_Model): CaptureStructuredOutputsTool, CodeInterpreterTool, ComputerTool, ComputerUsePreviewTool, CustomToolParam, MicrosoftFabricPreviewTool, FabricIQPreviewTool, FileSearchTool, FunctionTool, ImageGenTool, LocalShellToolParam, MCPTool, MemorySearchPreviewTool, NamespaceToolParam, - OpenApiTool, SharepointPreviewTool, FunctionShellToolParam, - ToolSearchToolParam, WebSearchTool, WebSearchPreviewTool, WorkIQPreviewTool + OpenApiTool, SharepointPreviewTool, FunctionShellToolParam, ToolSearchToolParam, WebSearchTool, + WebSearchPreviewTool, WorkIQPreviewTool :ivar type: Required. Known values are: "function", "file_search", "computer", "computer_use_preview", "web_search", "mcp", "code_interpreter", "image_generation", "local_shell", "shell", "custom", "namespace", "tool_search", "web_search_preview", "apply_patch", "a2a_preview", "bing_custom_search_preview", "browser_automation_preview", "fabric_dataagent_preview", "sharepoint_grounding_preview", "memory_search_preview", - "work_iq_preview", "fabric_iq_preview", "toolbox_search_preview", - "azure_ai_search", "azure_function", "bing_grounding", "capture_structured_outputs", and - "openapi". + "work_iq_preview", "fabric_iq_preview", "toolbox_search_preview", "azure_ai_search", + "azure_function", "bing_grounding", "capture_structured_outputs", and "openapi". :vartype type: str or ~azure.ai.projects.models.ToolType """ @@ -7332,7 +7331,7 @@ class FileSearchTool(Tool, discriminator="file_search"): visibility=["read", "create", "update", "delete", "query"] ) """Ranking options for search.""" - filters: Optional["_types.Filters"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + filters: Optional["_unions.Filters"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Is either a ComparisonFilter type or a CompoundFilter type.""" name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Deprecated. This property is deprecated and will be removed in a future version.""" @@ -7350,7 +7349,7 @@ def __init__( vector_store_ids: list[str], max_num_results: Optional[int] = None, ranking_options: Optional["_models.RankingOptions"] = None, - filters: Optional["_types.Filters"] = None, + filters: Optional["_unions.Filters"] = None, name: Optional[str] = None, description: Optional[str] = None, tool_configs: Optional[dict[str, "_models.ToolConfig"]] = None, @@ -7401,7 +7400,7 @@ class FileSearchToolboxTool(ToolboxTool, discriminator="file_search"): visibility=["read", "create", "update", "delete", "query"] ) """Ranking options for search.""" - filters: Optional["_types.Filters"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + filters: Optional["_unions.Filters"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Is either a ComparisonFilter type or a CompoundFilter type.""" vector_store_ids: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The IDs of the vector stores to search.""" @@ -7415,7 +7414,7 @@ def __init__( tool_configs: Optional[dict[str, "_models.ToolConfig"]] = None, max_num_results: Optional[int] = None, ranking_options: Optional["_models.RankingOptions"] = None, - filters: Optional["_types.Filters"] = None, + filters: Optional["_unions.Filters"] = None, vector_store_ids: Optional[list[str]] = None, ) -> None: ... @@ -9170,12 +9169,13 @@ class MCPTool(Tool, discriminator="mcp"): :vartype type: str or ~azure.ai.projects.models.MCP :ivar server_label: A label for this MCP server, used to identify it in tool calls. Required. :vartype server_label: str - :ivar server_url: The URL for the MCP server. One of ``server_url`` or ``connector_id`` must be - provided. + :ivar server_url: The URL for the MCP server. One of ``server_url``, ``connector_id``, or + ``tunnel_id`` must be provided. :vartype server_url: str :ivar connector_id: Identifier for service connectors, like those available in ChatGPT. One of - ``server_url`` or ``connector_id`` must be provided. Learn more about service connectors `here - `_. Currently supported ``connector_id`` values are: + ``server_url``, ``connector_id``, or ``tunnel_id`` must be provided. Learn more about service + connectors `here `_. Currently supported + ``connector_id`` values are: * Dropbox: `connector_dropbox` * Gmail: `connector_gmail` @@ -9190,6 +9190,9 @@ class MCPTool(Tool, discriminator="mcp"): Literal["connector_outlookcalendar"], Literal["connector_outlookemail"], Literal["connector_sharepoint"] :vartype connector_id: str or str or str or str or str or str or str or str + :ivar tunnel_id: The Secure MCP Tunnel ID to use instead of a direct server URL. One of + ``server_url``, ``connector_id``, or ``tunnel_id`` must be provided. + :vartype tunnel_id: str :ivar authorization: An OAuth access token that can be used with a remote MCP server, either with a custom MCP server URL or a service connector. Your application must handle the OAuth authorization flow and provide the token here. @@ -9219,7 +9222,8 @@ class MCPTool(Tool, discriminator="mcp"): server_label: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """A label for this MCP server, used to identify it in tool calls. Required.""" server_url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The URL for the MCP server. One of ``server_url`` or ``connector_id`` must be provided.""" + """The URL for the MCP server. One of ``server_url``, ``connector_id``, or ``tunnel_id`` must be + provided.""" connector_id: Optional[ Literal[ "connector_dropbox", @@ -9232,8 +9236,8 @@ class MCPTool(Tool, discriminator="mcp"): "connector_sharepoint", ] ] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Identifier for service connectors, like those available in ChatGPT. One of ``server_url`` or - ``connector_id`` must be provided. Learn more about service connectors `here + """Identifier for service connectors, like those available in ChatGPT. One of ``server_url``, + ``connector_id``, or ``tunnel_id`` must be provided. Learn more about service connectors `here `_. Currently supported ``connector_id`` values are: * Dropbox: `connector_dropbox` @@ -9248,6 +9252,9 @@ class MCPTool(Tool, discriminator="mcp"): Literal[\"connector_googlecalendar\"], Literal[\"connector_googledrive\"], Literal[\"connector_microsoftteams\"], Literal[\"connector_outlookcalendar\"], Literal[\"connector_outlookemail\"], Literal[\"connector_sharepoint\"]""" + tunnel_id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The Secure MCP Tunnel ID to use instead of a direct server URL. One of ``server_url``, + ``connector_id``, or ``tunnel_id`` must be provided.""" authorization: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """An OAuth access token that can be used with a remote MCP server, either with a custom MCP server URL or a service connector. Your application must handle the OAuth authorization flow @@ -9291,6 +9298,7 @@ def __init__( "connector_sharepoint", ] ] = None, + tunnel_id: Optional[str] = None, authorization: Optional[str] = None, server_description: Optional[str] = None, headers: Optional[dict[str, str]] = None, @@ -9328,12 +9336,13 @@ class MCPToolboxTool(ToolboxTool, discriminator="mcp"): :vartype type: str or ~azure.ai.projects.models.MCP :ivar server_label: A label for this MCP server, used to identify it in tool calls. Required. :vartype server_label: str - :ivar server_url: The URL for the MCP server. One of ``server_url`` or ``connector_id`` must be - provided. + :ivar server_url: The URL for the MCP server. One of ``server_url``, ``connector_id``, or + ``tunnel_id`` must be provided. :vartype server_url: str :ivar connector_id: Identifier for service connectors, like those available in ChatGPT. One of - ``server_url`` or ``connector_id`` must be provided. Learn more about service connectors `here - `_. Currently supported ``connector_id`` values are: + ``server_url``, ``connector_id``, or ``tunnel_id`` must be provided. Learn more about service + connectors `here `_. Currently supported + ``connector_id`` values are: * Dropbox: `connector_dropbox` * Gmail: `connector_gmail` @@ -9348,6 +9357,9 @@ class MCPToolboxTool(ToolboxTool, discriminator="mcp"): Literal["connector_outlookcalendar"], Literal["connector_outlookemail"], Literal["connector_sharepoint"] :vartype connector_id: str or str or str or str or str or str or str or str + :ivar tunnel_id: The Secure MCP Tunnel ID to use instead of a direct server URL. One of + ``server_url``, ``connector_id``, or ``tunnel_id`` must be provided. + :vartype tunnel_id: str :ivar authorization: An OAuth access token that can be used with a remote MCP server, either with a custom MCP server URL or a service connector. Your application must handle the OAuth authorization flow and provide the token here. @@ -9374,7 +9386,8 @@ class MCPToolboxTool(ToolboxTool, discriminator="mcp"): server_label: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """A label for this MCP server, used to identify it in tool calls. Required.""" server_url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The URL for the MCP server. One of ``server_url`` or ``connector_id`` must be provided.""" + """The URL for the MCP server. One of ``server_url``, ``connector_id``, or ``tunnel_id`` must be + provided.""" connector_id: Optional[ Literal[ "connector_dropbox", @@ -9387,8 +9400,8 @@ class MCPToolboxTool(ToolboxTool, discriminator="mcp"): "connector_sharepoint", ] ] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Identifier for service connectors, like those available in ChatGPT. One of ``server_url`` or - ``connector_id`` must be provided. Learn more about service connectors `here + """Identifier for service connectors, like those available in ChatGPT. One of ``server_url``, + ``connector_id``, or ``tunnel_id`` must be provided. Learn more about service connectors `here `_. Currently supported ``connector_id`` values are: * Dropbox: `connector_dropbox` @@ -9403,6 +9416,9 @@ class MCPToolboxTool(ToolboxTool, discriminator="mcp"): Literal[\"connector_googlecalendar\"], Literal[\"connector_googledrive\"], Literal[\"connector_microsoftteams\"], Literal[\"connector_outlookcalendar\"], Literal[\"connector_outlookemail\"], Literal[\"connector_sharepoint\"]""" + tunnel_id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The Secure MCP Tunnel ID to use instead of a direct server URL. One of ``server_url``, + ``connector_id``, or ``tunnel_id`` must be provided.""" authorization: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """An OAuth access token that can be used with a remote MCP server, either with a custom MCP server URL or a service connector. Your application must handle the OAuth authorization flow @@ -9445,6 +9461,7 @@ def __init__( "connector_sharepoint", ] ] = None, + tunnel_id: Optional[str] = None, authorization: Optional[str] = None, server_description: Optional[str] = None, headers: Optional[dict[str, str]] = None, @@ -12437,6 +12454,9 @@ class Reasoning(_Model): :ivar summary: Is one of the following types: Literal["auto"], Literal["concise"], Literal["detailed"] :vartype summary: str or str or str + :ivar context: Is one of the following types: Literal["auto"], Literal["current_turn"], + Literal["all_turns"] + :vartype context: str or str or str :ivar generate_summary: Is one of the following types: Literal["auto"], Literal["concise"], Literal["detailed"] :vartype generate_summary: str or str or str @@ -12451,6 +12471,11 @@ class Reasoning(_Model): visibility=["read", "create", "update", "delete", "query"] ) """Is one of the following types: Literal[\"auto\"], Literal[\"concise\"], Literal[\"detailed\"]""" + context: Optional[Literal["auto", "current_turn", "all_turns"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Is one of the following types: Literal[\"auto\"], Literal[\"current_turn\"], + Literal[\"all_turns\"]""" generate_summary: Optional[Literal["auto", "concise", "detailed"]] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) @@ -12462,6 +12487,7 @@ def __init__( *, effort: Optional[Literal["none", "minimal", "low", "medium", "high", "xhigh"]] = None, summary: Optional[Literal["auto", "concise", "detailed"]] = None, + context: Optional[Literal["auto", "current_turn", "all_turns"]] = None, generate_summary: Optional[Literal["auto", "concise", "detailed"]] = None, ) -> None: ... @@ -12849,7 +12875,9 @@ class RoutineRun(_Model): id: str = rest_field(visibility=["read"]) """The unique run identifier for the routine attempt. Required.""" - status: Optional["_types.RoutineRunStatus"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + status: Optional["_unions.RoutineRunStatus"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The run status. Is one of the following types: str""" phase: Optional[Union[str, "_models.RoutineRunPhase"]] = rest_field( visibility=["read", "create", "update", "delete", "query"] @@ -12920,7 +12948,7 @@ class RoutineRun(_Model): def __init__( self, *, - status: Optional["_types.RoutineRunStatus"] = None, + status: Optional["_unions.RoutineRunStatus"] = None, phase: Optional[Union[str, "_models.RoutineRunPhase"]] = None, trigger_type: Optional[Union[str, "_models.RoutineTriggerType"]] = None, trigger_name: Optional[str] = None, diff --git a/sdk/ai/azure-ai-projects/azure/ai/projects/operations/_operations.py b/sdk/ai/azure-ai-projects/azure/ai/projects/operations/_operations.py index aca7d018ae15..00622740aa37 100644 --- a/sdk/ai/azure-ai-projects/azure/ai/projects/operations/_operations.py +++ b/sdk/ai/azure-ai-projects/azure/ai/projects/operations/_operations.py @@ -33,7 +33,7 @@ from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict -from .. import models as _models +from .. import models as _models, types as _types from .._configuration import AIProjectClientConfiguration from .._utils.model_base import Model as _Model, SdkJSONEncoder, _deserialize, _failsafe_deserialize from .._utils.serialization import Deserializer, Serializer @@ -3944,7 +3944,12 @@ def create_version( @overload def create_version( - self, agent_name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + agent_name: str, + body: _types.CreateAgentVersionRequest, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.AgentVersionDetails: """Create an agent version. @@ -3958,7 +3963,7 @@ def create_version( * Must not exceed 63 characters. Required. :type agent_name: str :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.CreateAgentVersionRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -3996,7 +4001,7 @@ def create_version( def create_version( self, agent_name: str, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.CreateAgentVersionRequest, IO[bytes]] = _Unset, *, definition: _models.AgentDefinition = _Unset, metadata: Optional[dict[str, str]] = None, @@ -4016,8 +4021,9 @@ def create_version( * Can contain hyphens in the middle * Must not exceed 63 characters. Required. :type agent_name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, CreateAgentVersionRequest, IO[bytes] + Required. + :type body: JSON or ~azure.ai.projects.types.CreateAgentVersionRequest or IO[bytes] :keyword definition: The agent definition. This can be a workflow, hosted agent, or a simple agent definition. Required. :paramtype definition: ~azure.ai.projects.models.AgentDefinition @@ -4164,7 +4170,12 @@ def create_version_from_manifest( @overload def create_version_from_manifest( - self, agent_name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + agent_name: str, + body: _types.CreateAgentVersionFromManifestRequest, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.AgentVersionDetails: """Create an agent version from manifest. @@ -4178,7 +4189,7 @@ def create_version_from_manifest( * Must not exceed 63 characters. Required. :type agent_name: str :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.CreateAgentVersionFromManifestRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -4216,7 +4227,7 @@ def create_version_from_manifest( def create_version_from_manifest( self, agent_name: str, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.CreateAgentVersionFromManifestRequest, IO[bytes]] = _Unset, *, manifest_id: str = _Unset, parameter_values: dict[str, Any] = _Unset, @@ -4235,8 +4246,9 @@ def create_version_from_manifest( * Can contain hyphens in the middle * Must not exceed 63 characters. Required. :type agent_name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, CreateAgentVersionFromManifestRequest, + IO[bytes] Required. + :type body: JSON or ~azure.ai.projects.types.CreateAgentVersionFromManifestRequest or IO[bytes] :keyword manifest_id: The manifest ID to import the agent version from. Required. :paramtype manifest_id: str :keyword parameter_values: The inputs to the manifest that will result in a fully materialized @@ -4615,7 +4627,12 @@ def update_details( @overload def update_details( - self, agent_name: str, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any + self, + agent_name: str, + body: _types.PatchAgentObjectRequest, + *, + content_type: str = "application/merge-patch+json", + **kwargs: Any ) -> _models.AgentDetails: """Update an agent endpoint. @@ -4624,7 +4641,7 @@ def update_details( :param agent_name: The name of the agent to retrieve. Required. :type agent_name: str :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.PatchAgentObjectRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/merge-patch+json". :paramtype content_type: str @@ -4657,7 +4674,7 @@ def update_details( def update_details( self, agent_name: str, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.PatchAgentObjectRequest, IO[bytes]] = _Unset, *, agent_endpoint: Optional[_models.AgentEndpointConfig] = None, agent_card: Optional[_models.AgentCard] = None, @@ -4669,8 +4686,8 @@ def update_details( :param agent_name: The name of the agent to retrieve. Required. :type agent_name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, PatchAgentObjectRequest, IO[bytes] Required. + :type body: JSON or ~azure.ai.projects.types.PatchAgentObjectRequest or IO[bytes] :keyword agent_endpoint: The endpoint configuration for the agent. Default value is None. :paramtype agent_endpoint: ~azure.ai.projects.models.AgentEndpointConfig :keyword agent_card: Optional agent card for the agent. Default value is None. @@ -4758,14 +4775,19 @@ def _create_version_from_code( ) -> _models.AgentVersionDetails: ... @overload def _create_version_from_code( - self, agent_name: str, content: JSON, *, code_zip_sha256: str, **kwargs: Any + self, + agent_name: str, + content: _types._CreateAgentVersionFromCodeContent, + *, + code_zip_sha256: str, + **kwargs: Any ) -> _models.AgentVersionDetails: ... @distributed_trace def _create_version_from_code( self, agent_name: str, - content: Union[_models._models._CreateAgentVersionFromCodeContent, JSON], + content: Union[_models._models._CreateAgentVersionFromCodeContent, _types._CreateAgentVersionFromCodeContent], *, code_zip_sha256: str, **kwargs: Any @@ -4784,8 +4806,9 @@ def _create_version_from_code( * Can contain hyphens in the middle * Must not exceed 63 characters. Required. :type agent_name: str - :param content: Is either a _CreateAgentVersionFromCodeContent type or a JSON type. Required. - :type content: ~azure.ai.projects.models._models._CreateAgentVersionFromCodeContent or JSON + :param content: Is one of the following types: _CreateAgentVersionFromCodeContent Required. + :type content: ~azure.ai.projects.models._models._CreateAgentVersionFromCodeContent or + ~azure.ai.projects.types._CreateAgentVersionFromCodeContent :keyword code_zip_sha256: SHA-256 hex digest of the uploaded code zip. Used for change detection (dedup) and integrity verification. Required. :paramtype code_zip_sha256: str @@ -5080,7 +5103,12 @@ def create_session( @overload def create_session( - self, agent_name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + agent_name: str, + body: _types.CreateSessionRequest, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.AgentSessionResource: """Create a session. @@ -5091,7 +5119,7 @@ def create_session( :param agent_name: The name of the agent to create a session for. Required. :type agent_name: str :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.CreateSessionRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -5126,7 +5154,7 @@ def create_session( def create_session( self, agent_name: str, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.CreateSessionRequest, IO[bytes]] = _Unset, *, version_indicator: _models.VersionIndicator = _Unset, agent_session_id: Optional[str] = None, @@ -5140,8 +5168,8 @@ def create_session( :param agent_name: The name of the agent to create a session for. Required. :type agent_name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, CreateSessionRequest, IO[bytes] Required. + :type body: JSON or ~azure.ai.projects.types.CreateSessionRequest or IO[bytes] :keyword version_indicator: Determines which agent version backs the session. Required. :paramtype version_indicator: ~azure.ai.projects.models.VersionIndicator :keyword agent_session_id: Optional caller-provided session ID. If specified, it must be unique @@ -6094,7 +6122,7 @@ def create_or_update( @overload def create_or_update( - self, id: str, evaluation_rule: JSON, *, content_type: str = "application/json", **kwargs: Any + self, id: str, evaluation_rule: _types.EvaluationRule, *, content_type: str = "application/json", **kwargs: Any ) -> _models.EvaluationRule: """Create or update an evaluation rule. @@ -6103,7 +6131,7 @@ def create_or_update( :param id: Unique identifier for the evaluation rule. Required. :type id: str :param evaluation_rule: Evaluation rule resource. Required. - :type evaluation_rule: JSON + :type evaluation_rule: ~azure.ai.projects.types.EvaluationRule :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -6134,7 +6162,7 @@ def create_or_update( @distributed_trace def create_or_update( - self, id: str, evaluation_rule: Union[_models.EvaluationRule, JSON, IO[bytes]], **kwargs: Any + self, id: str, evaluation_rule: Union[_models.EvaluationRule, _types.EvaluationRule, IO[bytes]], **kwargs: Any ) -> _models.EvaluationRule: """Create or update an evaluation rule. @@ -6142,9 +6170,10 @@ def create_or_update( :param id: Unique identifier for the evaluation rule. Required. :type id: str - :param evaluation_rule: Evaluation rule resource. Is one of the following types: - EvaluationRule, JSON, IO[bytes] Required. - :type evaluation_rule: ~azure.ai.projects.models.EvaluationRule or JSON or IO[bytes] + :param evaluation_rule: Evaluation rule resource. Is either a EvaluationRule type or a + IO[bytes] type. Required. + :type evaluation_rule: ~azure.ai.projects.models.EvaluationRule or + ~azure.ai.projects.types.EvaluationRule or IO[bytes] :return: EvaluationRule. The EvaluationRule is compatible with MutableMapping :rtype: ~azure.ai.projects.models.EvaluationRule :raises ~azure.core.exceptions.HttpResponseError: @@ -6934,7 +6963,7 @@ def create_or_update( self, name: str, version: str, - dataset_version: JSON, + dataset_version: _types.DatasetVersion, *, content_type: str = "application/merge-patch+json", **kwargs: Any @@ -6948,7 +6977,7 @@ def create_or_update( :param version: The specific version id of the DatasetVersion to create or update. Required. :type version: str :param dataset_version: The DatasetVersion to create or update. Required. - :type dataset_version: JSON + :type dataset_version: ~azure.ai.projects.types.DatasetVersion :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/merge-patch+json". :paramtype content_type: str @@ -6987,7 +7016,11 @@ def create_or_update( @distributed_trace def create_or_update( - self, name: str, version: str, dataset_version: Union[_models.DatasetVersion, JSON, IO[bytes]], **kwargs: Any + self, + name: str, + version: str, + dataset_version: Union[_models.DatasetVersion, _types.DatasetVersion, IO[bytes]], + **kwargs: Any ) -> _models.DatasetVersion: """Create or update a version. @@ -6997,9 +7030,10 @@ def create_or_update( :type name: str :param version: The specific version id of the DatasetVersion to create or update. Required. :type version: str - :param dataset_version: The DatasetVersion to create or update. Is one of the following types: - DatasetVersion, JSON, IO[bytes] Required. - :type dataset_version: ~azure.ai.projects.models.DatasetVersion or JSON or IO[bytes] + :param dataset_version: The DatasetVersion to create or update. Is either a DatasetVersion type + or a IO[bytes] type. Required. + :type dataset_version: ~azure.ai.projects.models.DatasetVersion or + ~azure.ai.projects.types.DatasetVersion or IO[bytes] :return: DatasetVersion. The DatasetVersion is compatible with MutableMapping :rtype: ~azure.ai.projects.models.DatasetVersion :raises ~azure.core.exceptions.HttpResponseError: @@ -7099,7 +7133,7 @@ def pending_upload( self, name: str, version: str, - pending_upload_request: JSON, + pending_upload_request: _types.PendingUploadRequest, *, content_type: str = "application/json", **kwargs: Any @@ -7113,7 +7147,7 @@ def pending_upload( :param version: The specific version id of the DatasetVersion to operate on. Required. :type version: str :param pending_upload_request: The pending upload request parameters. Required. - :type pending_upload_request: JSON + :type pending_upload_request: ~azure.ai.projects.types.PendingUploadRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -7155,7 +7189,7 @@ def pending_upload( self, name: str, version: str, - pending_upload_request: Union[_models.PendingUploadRequest, JSON, IO[bytes]], + pending_upload_request: Union[_models.PendingUploadRequest, _types.PendingUploadRequest, IO[bytes]], **kwargs: Any ) -> _models.PendingUploadResponse: """Start a pending upload. @@ -7166,10 +7200,10 @@ def pending_upload( :type name: str :param version: The specific version id of the DatasetVersion to operate on. Required. :type version: str - :param pending_upload_request: The pending upload request parameters. Is one of the following - types: PendingUploadRequest, JSON, IO[bytes] Required. - :type pending_upload_request: ~azure.ai.projects.models.PendingUploadRequest or JSON or - IO[bytes] + :param pending_upload_request: The pending upload request parameters. Is either a + PendingUploadRequest type or a IO[bytes] type. Required. + :type pending_upload_request: ~azure.ai.projects.models.PendingUploadRequest or + ~azure.ai.projects.types.PendingUploadRequest or IO[bytes] :return: PendingUploadResponse. The PendingUploadResponse is compatible with MutableMapping :rtype: ~azure.ai.projects.models.PendingUploadResponse :raises ~azure.core.exceptions.HttpResponseError: @@ -7849,7 +7883,13 @@ def create_or_update( @overload def create_or_update( - self, name: str, version: str, index: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any + self, + name: str, + version: str, + index: _types.Index, + *, + content_type: str = "application/merge-patch+json", + **kwargs: Any ) -> _models.Index: """Create or update a version. @@ -7860,7 +7900,7 @@ def create_or_update( :param version: The specific version id of the Index to create or update. Required. :type version: str :param index: The Index to create or update. Required. - :type index: JSON + :type index: ~azure.ai.projects.types.Index :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/merge-patch+json". :paramtype content_type: str @@ -7899,7 +7939,7 @@ def create_or_update( @distributed_trace def create_or_update( - self, name: str, version: str, index: Union[_models.Index, JSON, IO[bytes]], **kwargs: Any + self, name: str, version: str, index: Union[_models.Index, _types.Index, IO[bytes]], **kwargs: Any ) -> _models.Index: """Create or update a version. @@ -7909,9 +7949,9 @@ def create_or_update( :type name: str :param version: The specific version id of the Index to create or update. Required. :type version: str - :param index: The Index to create or update. Is one of the following types: Index, JSON, - IO[bytes] Required. - :type index: ~azure.ai.projects.models.Index or JSON or IO[bytes] + :param index: The Index to create or update. Is either a Index type or a IO[bytes] type. + Required. + :type index: ~azure.ai.projects.models.Index or ~azure.ai.projects.types.Index or IO[bytes] :return: Index. The Index is compatible with MutableMapping :rtype: ~azure.ai.projects.models.Index :raises ~azure.core.exceptions.HttpResponseError: @@ -8039,7 +8079,12 @@ def create_version( @overload def create_version( - self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + name: str, + body: _types.CreateToolboxVersionRequest, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.ToolboxVersionObject: """Create a new version of a toolbox. @@ -8049,7 +8094,7 @@ def create_version( Required. :type name: str :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.CreateToolboxVersionRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -8083,7 +8128,7 @@ def create_version( def create_version( self, name: str, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.CreateToolboxVersionRequest, IO[bytes]] = _Unset, *, tools: List[_models.ToolboxTool] = _Unset, description: Optional[str] = None, @@ -8099,8 +8144,9 @@ def create_version( :param name: The name of the toolbox. If the toolbox does not exist, it will be created. Required. :type name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, CreateToolboxVersionRequest, IO[bytes] + Required. + :type body: JSON or ~azure.ai.projects.types.CreateToolboxVersionRequest or IO[bytes] :keyword tools: The list of tools to include in this version. Required. :paramtype tools: list[~azure.ai.projects.models.ToolboxTool] :keyword description: A human-readable description of the toolbox. Default value is None. @@ -8542,7 +8588,7 @@ def update( @overload def update( - self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, name: str, body: _types.UpdateToolboxRequest1, *, content_type: str = "application/json", **kwargs: Any ) -> _models.ToolboxObject: """Update a toolbox to point to a specific version. @@ -8551,7 +8597,7 @@ def update( :param name: The name of the toolbox to update. Required. :type name: str :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.UpdateToolboxRequest1 :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -8582,7 +8628,12 @@ def update( @distributed_trace def update( - self, name: str, body: Union[JSON, IO[bytes]] = _Unset, *, default_version: str = _Unset, **kwargs: Any + self, + name: str, + body: Union[JSON, _types.UpdateToolboxRequest1, IO[bytes]] = _Unset, + *, + default_version: str = _Unset, + **kwargs: Any ) -> _models.ToolboxObject: """Update a toolbox to point to a specific version. @@ -8590,8 +8641,8 @@ def update( :param name: The name of the toolbox to update. Required. :type name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, UpdateToolboxRequest1, IO[bytes] Required. + :type body: JSON or ~azure.ai.projects.types.UpdateToolboxRequest1 or IO[bytes] :keyword default_version: The version identifier that the toolbox should point to. When set, the toolbox's default version will resolve to this version instead of the latest. Required. :paramtype default_version: str @@ -9034,7 +9085,7 @@ def create( @overload def create( - self, name: str, taxonomy: JSON, *, content_type: str = "application/json", **kwargs: Any + self, name: str, taxonomy: _types.EvaluationTaxonomy, *, content_type: str = "application/json", **kwargs: Any ) -> _models.EvaluationTaxonomy: """Create an evaluation taxonomy. @@ -9043,7 +9094,7 @@ def create( :param name: The name of the evaluation taxonomy. Required. :type name: str :param taxonomy: The evaluation taxonomy. Required. - :type taxonomy: JSON + :type taxonomy: ~azure.ai.projects.types.EvaluationTaxonomy :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -9074,7 +9125,10 @@ def create( @distributed_trace def create( - self, name: str, taxonomy: Union[_models.EvaluationTaxonomy, JSON, IO[bytes]], **kwargs: Any + self, + name: str, + taxonomy: Union[_models.EvaluationTaxonomy, _types.EvaluationTaxonomy, IO[bytes]], + **kwargs: Any ) -> _models.EvaluationTaxonomy: """Create an evaluation taxonomy. @@ -9082,9 +9136,10 @@ def create( :param name: The name of the evaluation taxonomy. Required. :type name: str - :param taxonomy: The evaluation taxonomy. Is one of the following types: EvaluationTaxonomy, - JSON, IO[bytes] Required. - :type taxonomy: ~azure.ai.projects.models.EvaluationTaxonomy or JSON or IO[bytes] + :param taxonomy: The evaluation taxonomy. Is either a EvaluationTaxonomy type or a IO[bytes] + type. Required. + :type taxonomy: ~azure.ai.projects.models.EvaluationTaxonomy or + ~azure.ai.projects.types.EvaluationTaxonomy or IO[bytes] :return: EvaluationTaxonomy. The EvaluationTaxonomy is compatible with MutableMapping :rtype: ~azure.ai.projects.models.EvaluationTaxonomy :raises ~azure.core.exceptions.HttpResponseError: @@ -9172,7 +9227,7 @@ def update( @overload def update( - self, name: str, taxonomy: JSON, *, content_type: str = "application/json", **kwargs: Any + self, name: str, taxonomy: _types.EvaluationTaxonomy, *, content_type: str = "application/json", **kwargs: Any ) -> _models.EvaluationTaxonomy: """Update an evaluation taxonomy. @@ -9181,7 +9236,7 @@ def update( :param name: The name of the evaluation taxonomy. Required. :type name: str :param taxonomy: The evaluation taxonomy. Required. - :type taxonomy: JSON + :type taxonomy: ~azure.ai.projects.types.EvaluationTaxonomy :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -9212,7 +9267,10 @@ def update( @distributed_trace def update( - self, name: str, taxonomy: Union[_models.EvaluationTaxonomy, JSON, IO[bytes]], **kwargs: Any + self, + name: str, + taxonomy: Union[_models.EvaluationTaxonomy, _types.EvaluationTaxonomy, IO[bytes]], + **kwargs: Any ) -> _models.EvaluationTaxonomy: """Update an evaluation taxonomy. @@ -9220,9 +9278,10 @@ def update( :param name: The name of the evaluation taxonomy. Required. :type name: str - :param taxonomy: The evaluation taxonomy. Is one of the following types: EvaluationTaxonomy, - JSON, IO[bytes] Required. - :type taxonomy: ~azure.ai.projects.models.EvaluationTaxonomy or JSON or IO[bytes] + :param taxonomy: The evaluation taxonomy. Is either a EvaluationTaxonomy type or a IO[bytes] + type. Required. + :type taxonomy: ~azure.ai.projects.models.EvaluationTaxonomy or + ~azure.ai.projects.types.EvaluationTaxonomy or IO[bytes] :return: EvaluationTaxonomy. The EvaluationTaxonomy is compatible with MutableMapping :rtype: ~azure.ai.projects.models.EvaluationTaxonomy :raises ~azure.core.exceptions.HttpResponseError: @@ -9668,7 +9727,12 @@ def create_version( @overload def create_version( - self, name: str, evaluator_version: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + name: str, + evaluator_version: _types.EvaluatorVersion, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.EvaluatorVersion: """Create an evaluator version. @@ -9677,7 +9741,7 @@ def create_version( :param name: The name of the resource. Required. :type name: str :param evaluator_version: Required. - :type evaluator_version: JSON + :type evaluator_version: ~azure.ai.projects.types.EvaluatorVersion :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -9708,7 +9772,10 @@ def create_version( @distributed_trace def create_version( - self, name: str, evaluator_version: Union[_models.EvaluatorVersion, JSON, IO[bytes]], **kwargs: Any + self, + name: str, + evaluator_version: Union[_models.EvaluatorVersion, _types.EvaluatorVersion, IO[bytes]], + **kwargs: Any ) -> _models.EvaluatorVersion: """Create an evaluator version. @@ -9716,9 +9783,9 @@ def create_version( :param name: The name of the resource. Required. :type name: str - :param evaluator_version: Is one of the following types: EvaluatorVersion, JSON, IO[bytes] - Required. - :type evaluator_version: ~azure.ai.projects.models.EvaluatorVersion or JSON or IO[bytes] + :param evaluator_version: Is either a EvaluatorVersion type or a IO[bytes] type. Required. + :type evaluator_version: ~azure.ai.projects.models.EvaluatorVersion or + ~azure.ai.projects.types.EvaluatorVersion or IO[bytes] :return: EvaluatorVersion. The EvaluatorVersion is compatible with MutableMapping :rtype: ~azure.ai.projects.models.EvaluatorVersion :raises ~azure.core.exceptions.HttpResponseError: @@ -9814,7 +9881,13 @@ def update_version( @overload def update_version( - self, name: str, version: str, evaluator_version: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + name: str, + version: str, + evaluator_version: _types.EvaluatorVersion, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.EvaluatorVersion: """Update an evaluator version. @@ -9825,7 +9898,7 @@ def update_version( :param version: The version of the EvaluatorVersion to update. Required. :type version: str :param evaluator_version: Evaluator resource. Required. - :type evaluator_version: JSON + :type evaluator_version: ~azure.ai.projects.types.EvaluatorVersion :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -9867,7 +9940,7 @@ def update_version( self, name: str, version: str, - evaluator_version: Union[_models.EvaluatorVersion, JSON, IO[bytes]], + evaluator_version: Union[_models.EvaluatorVersion, _types.EvaluatorVersion, IO[bytes]], **kwargs: Any ) -> _models.EvaluatorVersion: """Update an evaluator version. @@ -9878,9 +9951,10 @@ def update_version( :type name: str :param version: The version of the EvaluatorVersion to update. Required. :type version: str - :param evaluator_version: Evaluator resource. Is one of the following types: EvaluatorVersion, - JSON, IO[bytes] Required. - :type evaluator_version: ~azure.ai.projects.models.EvaluatorVersion or JSON or IO[bytes] + :param evaluator_version: Evaluator resource. Is either a EvaluatorVersion type or a IO[bytes] + type. Required. + :type evaluator_version: ~azure.ai.projects.models.EvaluatorVersion or + ~azure.ai.projects.types.EvaluatorVersion or IO[bytes] :return: EvaluatorVersion. The EvaluatorVersion is compatible with MutableMapping :rtype: ~azure.ai.projects.models.EvaluatorVersion :raises ~azure.core.exceptions.HttpResponseError: @@ -9981,7 +10055,7 @@ def pending_upload( self, name: str, version: str, - pending_upload_request: JSON, + pending_upload_request: _types.PendingUploadRequest, *, content_type: str = "application/json", **kwargs: Any @@ -9996,7 +10070,7 @@ def pending_upload( :param version: The specific version id of the EvaluatorVersion to operate on. Required. :type version: str :param pending_upload_request: The pending upload request parameters. Required. - :type pending_upload_request: JSON + :type pending_upload_request: ~azure.ai.projects.types.PendingUploadRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -10039,7 +10113,7 @@ def pending_upload( self, name: str, version: str, - pending_upload_request: Union[_models.PendingUploadRequest, JSON, IO[bytes]], + pending_upload_request: Union[_models.PendingUploadRequest, _types.PendingUploadRequest, IO[bytes]], **kwargs: Any ) -> _models.PendingUploadResponse: """Start a pending upload. @@ -10051,10 +10125,10 @@ def pending_upload( :type name: str :param version: The specific version id of the EvaluatorVersion to operate on. Required. :type version: str - :param pending_upload_request: The pending upload request parameters. Is one of the following - types: PendingUploadRequest, JSON, IO[bytes] Required. - :type pending_upload_request: ~azure.ai.projects.models.PendingUploadRequest or JSON or - IO[bytes] + :param pending_upload_request: The pending upload request parameters. Is either a + PendingUploadRequest type or a IO[bytes] type. Required. + :type pending_upload_request: ~azure.ai.projects.models.PendingUploadRequest or + ~azure.ai.projects.types.PendingUploadRequest or IO[bytes] :return: PendingUploadResponse. The PendingUploadResponse is compatible with MutableMapping :rtype: ~azure.ai.projects.models.PendingUploadResponse :raises ~azure.core.exceptions.HttpResponseError: @@ -10159,7 +10233,7 @@ def get_credentials( self, name: str, version: str, - credential_request: JSON, + credential_request: _types.EvaluatorCredentialRequest, *, content_type: str = "application/json", **kwargs: Any @@ -10174,7 +10248,7 @@ def get_credentials( :param version: The specific version id of the EvaluatorVersion to operate on. Required. :type version: str :param credential_request: The credential request parameters. Required. - :type credential_request: JSON + :type credential_request: ~azure.ai.projects.types.EvaluatorCredentialRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -10217,7 +10291,7 @@ def get_credentials( self, name: str, version: str, - credential_request: Union[_models.EvaluatorCredentialRequest, JSON, IO[bytes]], + credential_request: Union[_models.EvaluatorCredentialRequest, _types.EvaluatorCredentialRequest, IO[bytes]], **kwargs: Any ) -> _models.DatasetCredential: """Get evaluator credentials. @@ -10229,10 +10303,10 @@ def get_credentials( :type name: str :param version: The specific version id of the EvaluatorVersion to operate on. Required. :type version: str - :param credential_request: The credential request parameters. Is one of the following types: - EvaluatorCredentialRequest, JSON, IO[bytes] Required. - :type credential_request: ~azure.ai.projects.models.EvaluatorCredentialRequest or JSON or - IO[bytes] + :param credential_request: The credential request parameters. Is either a + EvaluatorCredentialRequest type or a IO[bytes] type. Required. + :type credential_request: ~azure.ai.projects.models.EvaluatorCredentialRequest or + ~azure.ai.projects.types.EvaluatorCredentialRequest or IO[bytes] :return: DatasetCredential. The DatasetCredential is compatible with MutableMapping :rtype: ~azure.ai.projects.models.DatasetCredential :raises ~azure.core.exceptions.HttpResponseError: @@ -10332,7 +10406,12 @@ def create_generation_job( @overload def create_generation_job( - self, job: JSON, *, operation_id: Optional[str] = None, content_type: str = "application/json", **kwargs: Any + self, + job: _types.EvaluatorGenerationJob, + *, + operation_id: Optional[str] = None, + content_type: str = "application/json", + **kwargs: Any ) -> _models.EvaluatorGenerationJob: """Create an evaluator generation job. @@ -10340,7 +10419,7 @@ def create_generation_job( from the provided source materials asynchronously. :param job: The job to create. Required. - :type job: JSON + :type job: ~azure.ai.projects.types.EvaluatorGenerationJob :keyword operation_id: Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. Default value is None. :paramtype operation_id: str @@ -10382,7 +10461,7 @@ def create_generation_job( @distributed_trace def create_generation_job( self, - job: Union[_models.EvaluatorGenerationJob, JSON, IO[bytes]], + job: Union[_models.EvaluatorGenerationJob, _types.EvaluatorGenerationJob, IO[bytes]], *, operation_id: Optional[str] = None, **kwargs: Any @@ -10392,9 +10471,10 @@ def create_generation_job( Creates an evaluator generation job. The service generates rubric-based evaluator definitions from the provided source materials asynchronously. - :param job: The job to create. Is one of the following types: EvaluatorGenerationJob, JSON, - IO[bytes] Required. - :type job: ~azure.ai.projects.models.EvaluatorGenerationJob or JSON or IO[bytes] + :param job: The job to create. Is either a EvaluatorGenerationJob type or a IO[bytes] type. + Required. + :type job: ~azure.ai.projects.models.EvaluatorGenerationJob or + ~azure.ai.projects.types.EvaluatorGenerationJob or IO[bytes] :keyword operation_id: Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. Default value is None. :paramtype operation_id: str @@ -10797,14 +10877,16 @@ def generate( """ @overload - def generate(self, insight: JSON, *, content_type: str = "application/json", **kwargs: Any) -> _models.Insight: + def generate( + self, insight: _types.Insight, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.Insight: """Generate insights. Generates an insights report from the provided evaluation configuration. :param insight: Complete evaluation configuration including data source, evaluators, and result settings. Required. - :type insight: JSON + :type insight: ~azure.ai.projects.types.Insight :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -10831,14 +10913,15 @@ def generate(self, insight: IO[bytes], *, content_type: str = "application/json" """ @distributed_trace - def generate(self, insight: Union[_models.Insight, JSON, IO[bytes]], **kwargs: Any) -> _models.Insight: + def generate(self, insight: Union[_models.Insight, _types.Insight, IO[bytes]], **kwargs: Any) -> _models.Insight: """Generate insights. Generates an insights report from the provided evaluation configuration. :param insight: Complete evaluation configuration including data source, evaluators, and result - settings. Is one of the following types: Insight, JSON, IO[bytes] Required. - :type insight: ~azure.ai.projects.models.Insight or JSON or IO[bytes] + settings. Is either a Insight type or a IO[bytes] type. Required. + :type insight: ~azure.ai.projects.models.Insight or ~azure.ai.projects.types.Insight or + IO[bytes] :return: Insight. The Insight is compatible with MutableMapping :rtype: ~azure.ai.projects.models.Insight :raises ~azure.core.exceptions.HttpResponseError: @@ -11150,14 +11233,14 @@ def create( @overload def create( - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, body: _types.CreateMemoryStoreRequest, *, content_type: str = "application/json", **kwargs: Any ) -> _models.MemoryStoreDetails: """Create a memory store. Creates a memory store resource with the provided configuration. :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.CreateMemoryStoreRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -11187,7 +11270,7 @@ def create( @distributed_trace def create( self, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.CreateMemoryStoreRequest, IO[bytes]] = _Unset, *, name: str = _Unset, definition: _models.MemoryStoreDefinition = _Unset, @@ -11199,8 +11282,8 @@ def create( Creates a memory store resource with the provided configuration. - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, CreateMemoryStoreRequest, IO[bytes] Required. + :type body: JSON or ~azure.ai.projects.types.CreateMemoryStoreRequest or IO[bytes] :keyword name: The name of the memory store. Required. :paramtype name: str :keyword definition: The memory store definition. Required. @@ -11316,7 +11399,7 @@ def update( @overload def update( - self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, name: str, body: _types.UpdateMemoryStoreRequest, *, content_type: str = "application/json", **kwargs: Any ) -> _models.MemoryStoreDetails: """Update a memory store. @@ -11325,7 +11408,7 @@ def update( :param name: The name of the memory store to update. Required. :type name: str :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.UpdateMemoryStoreRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -11358,7 +11441,7 @@ def update( def update( self, name: str, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.UpdateMemoryStoreRequest, IO[bytes]] = _Unset, *, description: Optional[str] = None, metadata: Optional[dict[str, str]] = None, @@ -11370,8 +11453,8 @@ def update( :param name: The name of the memory store to update. Required. :type name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, UpdateMemoryStoreRequest, IO[bytes] Required. + :type body: JSON or ~azure.ai.projects.types.UpdateMemoryStoreRequest or IO[bytes] :keyword description: A human-readable description of the memory store. Default value is None. :paramtype description: str :keyword metadata: Arbitrary key-value metadata to associate with the memory store. Default @@ -11689,7 +11772,7 @@ def _search_memories( ) -> _models.MemoryStoreSearchResult: ... @overload def _search_memories( - self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, name: str, body: _types.SearchMemoriesRequest, *, content_type: str = "application/json", **kwargs: Any ) -> _models.MemoryStoreSearchResult: ... @overload def _search_memories( @@ -11700,7 +11783,7 @@ def _search_memories( def _search_memories( self, name: str, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.SearchMemoriesRequest, IO[bytes]] = _Unset, *, scope: str = _Unset, items: Optional[List[dict[str, Any]]] = None, @@ -11714,8 +11797,8 @@ def _search_memories( :param name: The name of the memory store to search. Required. :type name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, SearchMemoriesRequest, IO[bytes] Required. + :type body: JSON or ~azure.ai.projects.types.SearchMemoriesRequest or IO[bytes] :keyword scope: The namespace that logically groups and isolates memories, such as a user ID. Required. :paramtype scope: str @@ -11803,7 +11886,7 @@ def _search_memories( def _update_memories_initial( self, name: str, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.UpdateMemoriesRequest, IO[bytes]] = _Unset, *, scope: str = _Unset, items: Optional[List[dict[str, Any]]] = None, @@ -11899,7 +11982,7 @@ def _begin_update_memories( ) -> LROPoller[_models.MemoryStoreUpdateCompletedResult]: ... @overload def _begin_update_memories( - self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, name: str, body: _types.UpdateMemoriesRequest, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.MemoryStoreUpdateCompletedResult]: ... @overload def _begin_update_memories( @@ -11910,7 +11993,7 @@ def _begin_update_memories( def _begin_update_memories( self, name: str, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.UpdateMemoriesRequest, IO[bytes]] = _Unset, *, scope: str = _Unset, items: Optional[List[dict[str, Any]]] = None, @@ -11925,8 +12008,8 @@ def _begin_update_memories( :param name: The name of the memory store to update. Required. :type name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, UpdateMemoriesRequest, IO[bytes] Required. + :type body: JSON or ~azure.ai.projects.types.UpdateMemoriesRequest or IO[bytes] :keyword scope: The namespace that logically groups and isolates memories, such as a user ID. Required. :paramtype scope: str @@ -12031,7 +12114,7 @@ def delete_scope( @overload def delete_scope( - self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, name: str, body: _types.DeleteScopeRequest, *, content_type: str = "application/json", **kwargs: Any ) -> _models.MemoryStoreDeleteScopeResult: """Delete memories by scope. @@ -12040,7 +12123,7 @@ def delete_scope( :param name: The name of the memory store. Required. :type name: str :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.DeleteScopeRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -12073,7 +12156,12 @@ def delete_scope( @distributed_trace def delete_scope( - self, name: str, body: Union[JSON, IO[bytes]] = _Unset, *, scope: str = _Unset, **kwargs: Any + self, + name: str, + body: Union[JSON, _types.DeleteScopeRequest, IO[bytes]] = _Unset, + *, + scope: str = _Unset, + **kwargs: Any ) -> _models.MemoryStoreDeleteScopeResult: """Delete memories by scope. @@ -12081,8 +12169,8 @@ def delete_scope( :param name: The name of the memory store. Required. :type name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, DeleteScopeRequest, IO[bytes] Required. + :type body: JSON or ~azure.ai.projects.types.DeleteScopeRequest or IO[bytes] :keyword scope: The namespace that logically groups and isolates memories to delete, such as a user ID. Required. :paramtype scope: str @@ -12196,7 +12284,7 @@ def create_memory( @overload def create_memory( - self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, name: str, body: _types.CreateMemoryRequest, *, content_type: str = "application/json", **kwargs: Any ) -> _models.MemoryItem: """Create a memory item. @@ -12205,7 +12293,7 @@ def create_memory( :param name: The name of the memory store. Required. :type name: str :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.CreateMemoryRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -12238,7 +12326,7 @@ def create_memory( def create_memory( self, name: str, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.CreateMemoryRequest, IO[bytes]] = _Unset, *, scope: str = _Unset, content: str = _Unset, @@ -12251,8 +12339,8 @@ def create_memory( :param name: The name of the memory store. Required. :type name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, CreateMemoryRequest, IO[bytes] Required. + :type body: JSON or ~azure.ai.projects.types.CreateMemoryRequest or IO[bytes] :keyword scope: The namespace that logically groups and isolates memories, such as a user ID. Required. :paramtype scope: str @@ -12363,7 +12451,13 @@ def update_memory( @overload def update_memory( - self, name: str, memory_id: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + name: str, + memory_id: str, + body: _types.UpdateMemoryRequest, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.MemoryItem: """Update a memory item. @@ -12374,7 +12468,7 @@ def update_memory( :param memory_id: The ID of the memory item to update. Required. :type memory_id: str :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.UpdateMemoryRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -12407,7 +12501,13 @@ def update_memory( @distributed_trace def update_memory( - self, name: str, memory_id: str, body: Union[JSON, IO[bytes]] = _Unset, *, content: str = _Unset, **kwargs: Any + self, + name: str, + memory_id: str, + body: Union[JSON, _types.UpdateMemoryRequest, IO[bytes]] = _Unset, + *, + content: str = _Unset, + **kwargs: Any ) -> _models.MemoryItem: """Update a memory item. @@ -12417,8 +12517,8 @@ def update_memory( :type name: str :param memory_id: The ID of the memory item to update. Required. :type memory_id: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, UpdateMemoryRequest, IO[bytes] Required. + :type body: JSON or ~azure.ai.projects.types.UpdateMemoryRequest or IO[bytes] :keyword content: The updated content of the memory. Required. :paramtype content: str :return: MemoryItem. The MemoryItem is compatible with MutableMapping @@ -12617,7 +12717,7 @@ def list_memories( def list_memories( self, name: str, - body: JSON, + body: _types.ListMemoriesRequest, *, kind: Optional[Union[str, _models.MemoryItemKind]] = None, limit: Optional[int] = None, @@ -12633,7 +12733,7 @@ def list_memories( :param name: The name of the memory store. Required. :type name: str :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.ListMemoriesRequest :keyword kind: The kind of the memory item. Known values are: "user_profile", "chat_summary", and "procedural". Default value is None. :paramtype kind: str or ~azure.ai.projects.models.MemoryItemKind @@ -12709,7 +12809,7 @@ def list_memories( def list_memories( self, name: str, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.ListMemoriesRequest, IO[bytes]] = _Unset, *, scope: str = _Unset, kind: Optional[Union[str, _models.MemoryItemKind]] = None, @@ -12724,8 +12824,8 @@ def list_memories( :param name: The name of the memory store. Required. :type name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, ListMemoriesRequest, IO[bytes] Required. + :type body: JSON or ~azure.ai.projects.types.ListMemoriesRequest or IO[bytes] :keyword scope: The namespace that logically groups and isolates memories, such as a user ID. Required. :paramtype scope: str @@ -13252,7 +13352,7 @@ def update( self, name: str, version: str, - model_version_update: JSON, + model_version_update: _types.UpdateModelVersionRequest, *, content_type: str = "application/merge-patch+json", **kwargs: Any @@ -13267,7 +13367,7 @@ def update( Required. :type version: str :param model_version_update: The UpdateModelVersionRequest to create or update. Required. - :type model_version_update: JSON + :type model_version_update: ~azure.ai.projects.types.UpdateModelVersionRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/merge-patch+json". :paramtype content_type: str @@ -13310,7 +13410,7 @@ def update( self, name: str, version: str, - model_version_update: Union[_models.UpdateModelVersionRequest, JSON, IO[bytes]], + model_version_update: Union[_models.UpdateModelVersionRequest, _types.UpdateModelVersionRequest, IO[bytes]], **kwargs: Any ) -> _models.ModelVersion: """Update a model version. @@ -13322,10 +13422,10 @@ def update( :param version: The specific version id of the UpdateModelVersionRequest to create or update. Required. :type version: str - :param model_version_update: The UpdateModelVersionRequest to create or update. Is one of the - following types: UpdateModelVersionRequest, JSON, IO[bytes] Required. - :type model_version_update: ~azure.ai.projects.models.UpdateModelVersionRequest or JSON or - IO[bytes] + :param model_version_update: The UpdateModelVersionRequest to create or update. Is either a + UpdateModelVersionRequest type or a IO[bytes] type. Required. + :type model_version_update: ~azure.ai.projects.models.UpdateModelVersionRequest or + ~azure.ai.projects.types.UpdateModelVersionRequest or IO[bytes] :return: ModelVersion. The ModelVersion is compatible with MutableMapping :rtype: ~azure.ai.projects.models.ModelVersion :raises ~azure.core.exceptions.HttpResponseError: @@ -13423,7 +13523,13 @@ def pending_create_version( @overload def pending_create_version( - self, name: str, version: str, model_version: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + name: str, + version: str, + model_version: _types.ModelVersion, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.CreateAsyncResponse: """Create a model version async. @@ -13435,7 +13541,7 @@ def pending_create_version( :param version: Version of the model. Required. :type version: str :param model_version: Model version to create. Required. - :type model_version: JSON + :type model_version: ~azure.ai.projects.types.ModelVersion :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -13475,7 +13581,11 @@ def pending_create_version( @distributed_trace def pending_create_version( - self, name: str, version: str, model_version: Union[_models.ModelVersion, JSON, IO[bytes]], **kwargs: Any + self, + name: str, + version: str, + model_version: Union[_models.ModelVersion, _types.ModelVersion, IO[bytes]], + **kwargs: Any ) -> _models.CreateAsyncResponse: """Create a model version async. @@ -13486,9 +13596,10 @@ def pending_create_version( :type name: str :param version: Version of the model. Required. :type version: str - :param model_version: Model version to create. Is one of the following types: ModelVersion, - JSON, IO[bytes] Required. - :type model_version: ~azure.ai.projects.models.ModelVersion or JSON or IO[bytes] + :param model_version: Model version to create. Is either a ModelVersion type or a IO[bytes] + type. Required. + :type model_version: ~azure.ai.projects.models.ModelVersion or + ~azure.ai.projects.types.ModelVersion or IO[bytes] :return: CreateAsyncResponse. The CreateAsyncResponse is compatible with MutableMapping :rtype: ~azure.ai.projects.models.CreateAsyncResponse :raises ~azure.core.exceptions.HttpResponseError: @@ -13592,7 +13703,7 @@ def pending_upload( self, name: str, version: str, - pending_upload_request: JSON, + pending_upload_request: _types.ModelPendingUploadRequest, *, content_type: str = "application/json", **kwargs: Any @@ -13606,7 +13717,7 @@ def pending_upload( :param version: Version of the model. Required. :type version: str :param pending_upload_request: Required. - :type pending_upload_request: JSON + :type pending_upload_request: ~azure.ai.projects.types.ModelPendingUploadRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -13650,7 +13761,7 @@ def pending_upload( self, name: str, version: str, - pending_upload_request: Union[_models.ModelPendingUploadRequest, JSON, IO[bytes]], + pending_upload_request: Union[_models.ModelPendingUploadRequest, _types.ModelPendingUploadRequest, IO[bytes]], **kwargs: Any ) -> _models.ModelPendingUploadResponse: """Start a pending upload. @@ -13661,10 +13772,10 @@ def pending_upload( :type name: str :param version: Version of the model. Required. :type version: str - :param pending_upload_request: Is one of the following types: ModelPendingUploadRequest, JSON, - IO[bytes] Required. - :type pending_upload_request: ~azure.ai.projects.models.ModelPendingUploadRequest or JSON or - IO[bytes] + :param pending_upload_request: Is either a ModelPendingUploadRequest type or a IO[bytes] type. + Required. + :type pending_upload_request: ~azure.ai.projects.models.ModelPendingUploadRequest or + ~azure.ai.projects.types.ModelPendingUploadRequest or IO[bytes] :return: ModelPendingUploadResponse. The ModelPendingUploadResponse is compatible with MutableMapping :rtype: ~azure.ai.projects.models.ModelPendingUploadResponse @@ -13765,7 +13876,7 @@ def get_credentials( self, name: str, version: str, - credential_request: JSON, + credential_request: _types.ModelCredentialRequest, *, content_type: str = "application/json", **kwargs: Any @@ -13779,7 +13890,7 @@ def get_credentials( :param version: Version of the model. Required. :type version: str :param credential_request: Required. - :type credential_request: JSON + :type credential_request: ~azure.ai.projects.types.ModelCredentialRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -13821,7 +13932,7 @@ def get_credentials( self, name: str, version: str, - credential_request: Union[_models.ModelCredentialRequest, JSON, IO[bytes]], + credential_request: Union[_models.ModelCredentialRequest, _types.ModelCredentialRequest, IO[bytes]], **kwargs: Any ) -> _models.DatasetCredential: """Get model asset credentials. @@ -13832,9 +13943,10 @@ def get_credentials( :type name: str :param version: Version of the model. Required. :type version: str - :param credential_request: Is one of the following types: ModelCredentialRequest, JSON, - IO[bytes] Required. - :type credential_request: ~azure.ai.projects.models.ModelCredentialRequest or JSON or IO[bytes] + :param credential_request: Is either a ModelCredentialRequest type or a IO[bytes] type. + Required. + :type credential_request: ~azure.ai.projects.models.ModelCredentialRequest or + ~azure.ai.projects.types.ModelCredentialRequest or IO[bytes] :return: DatasetCredential. The DatasetCredential is compatible with MutableMapping :rtype: ~azure.ai.projects.models.DatasetCredential :raises ~azure.core.exceptions.HttpResponseError: @@ -14091,13 +14203,15 @@ def create( """ @overload - def create(self, red_team: JSON, *, content_type: str = "application/json", **kwargs: Any) -> _models.RedTeam: + def create( + self, red_team: _types.RedTeam, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.RedTeam: """Create a redteam run. Submits a new redteam run for execution with the provided configuration. :param red_team: Redteam to be run. Required. - :type red_team: JSON + :type red_team: ~azure.ai.projects.types.RedTeam :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -14123,14 +14237,14 @@ def create(self, red_team: IO[bytes], *, content_type: str = "application/json", """ @distributed_trace - def create(self, red_team: Union[_models.RedTeam, JSON, IO[bytes]], **kwargs: Any) -> _models.RedTeam: + def create(self, red_team: Union[_models.RedTeam, _types.RedTeam, IO[bytes]], **kwargs: Any) -> _models.RedTeam: """Create a redteam run. Submits a new redteam run for execution with the provided configuration. - :param red_team: Redteam to be run. Is one of the following types: RedTeam, JSON, IO[bytes] - Required. - :type red_team: ~azure.ai.projects.models.RedTeam or JSON or IO[bytes] + :param red_team: Redteam to be run. Is either a RedTeam type or a IO[bytes] type. Required. + :type red_team: ~azure.ai.projects.models.RedTeam or ~azure.ai.projects.types.RedTeam or + IO[bytes] :return: RedTeam. The RedTeam is compatible with MutableMapping :rtype: ~azure.ai.projects.models.RedTeam :raises ~azure.core.exceptions.HttpResponseError: @@ -14254,7 +14368,12 @@ def create_or_update( @overload def create_or_update( - self, routine_name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + routine_name: str, + body: _types.CreateOrUpdateRoutineRequest, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.Routine: """Create or update a routine. @@ -14263,7 +14382,7 @@ def create_or_update( :param routine_name: The unique name of the routine. Required. :type routine_name: str :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.CreateOrUpdateRoutineRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -14296,7 +14415,7 @@ def create_or_update( def create_or_update( self, routine_name: str, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.CreateOrUpdateRoutineRequest, IO[bytes]] = _Unset, *, description: Optional[str] = None, enabled: Optional[bool] = None, @@ -14310,8 +14429,9 @@ def create_or_update( :param routine_name: The unique name of the routine. Required. :type routine_name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, CreateOrUpdateRoutineRequest, IO[bytes] + Required. + :type body: JSON or ~azure.ai.projects.types.CreateOrUpdateRoutineRequest or IO[bytes] :keyword description: A human-readable description of the routine. Default value is None. :paramtype description: str :keyword enabled: Whether the routine is enabled. Default value is None. @@ -14852,7 +14972,12 @@ def dispatch( @overload def dispatch( - self, routine_name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + routine_name: str, + body: _types.DispatchRoutineAsyncRequest, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.DispatchRoutineResult: """Queue an asynchronous routine dispatch. @@ -14861,7 +14986,7 @@ def dispatch( :param routine_name: The unique name of the routine. Required. :type routine_name: str :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.DispatchRoutineAsyncRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -14894,7 +15019,7 @@ def dispatch( def dispatch( self, routine_name: str, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.DispatchRoutineAsyncRequest, IO[bytes]] = _Unset, *, payload: Optional[_models.RoutineDispatchPayload] = None, **kwargs: Any @@ -14905,8 +15030,9 @@ def dispatch( :param routine_name: The unique name of the routine. Required. :type routine_name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, DispatchRoutineAsyncRequest, IO[bytes] + Required. + :type body: JSON or ~azure.ai.projects.types.DispatchRoutineAsyncRequest or IO[bytes] :keyword payload: A direct action-input override sent downstream when testing a routine. Default value is None. :paramtype payload: ~azure.ai.projects.models.RoutineDispatchPayload @@ -15238,7 +15364,7 @@ def create_or_update( @overload def create_or_update( - self, schedule_id: str, schedule: JSON, *, content_type: str = "application/json", **kwargs: Any + self, schedule_id: str, schedule: _types.Schedule, *, content_type: str = "application/json", **kwargs: Any ) -> _models.Schedule: """Create or update a schedule. @@ -15247,7 +15373,7 @@ def create_or_update( :param schedule_id: Identifier of the schedule. Required. :type schedule_id: str :param schedule: The resource instance. Required. - :type schedule: JSON + :type schedule: ~azure.ai.projects.types.Schedule :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -15278,7 +15404,7 @@ def create_or_update( @distributed_trace def create_or_update( - self, schedule_id: str, schedule: Union[_models.Schedule, JSON, IO[bytes]], **kwargs: Any + self, schedule_id: str, schedule: Union[_models.Schedule, _types.Schedule, IO[bytes]], **kwargs: Any ) -> _models.Schedule: """Create or update a schedule. @@ -15286,9 +15412,10 @@ def create_or_update( :param schedule_id: Identifier of the schedule. Required. :type schedule_id: str - :param schedule: The resource instance. Is one of the following types: Schedule, JSON, - IO[bytes] Required. - :type schedule: ~azure.ai.projects.models.Schedule or JSON or IO[bytes] + :param schedule: The resource instance. Is either a Schedule type or a IO[bytes] type. + Required. + :type schedule: ~azure.ai.projects.models.Schedule or ~azure.ai.projects.types.Schedule or + IO[bytes] :return: Schedule. The Schedule is compatible with MutableMapping :rtype: ~azure.ai.projects.models.Schedule :raises ~azure.core.exceptions.HttpResponseError: @@ -15731,7 +15858,7 @@ def update( @overload def update( - self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, name: str, body: _types.UpdateSkillRequest, *, content_type: str = "application/json", **kwargs: Any ) -> _models.SkillDetails: """Update a skill. @@ -15740,7 +15867,7 @@ def update( :param name: The name of the skill to update. Required. :type name: str :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.UpdateSkillRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -15771,7 +15898,12 @@ def update( @distributed_trace def update( - self, name: str, body: Union[JSON, IO[bytes]] = _Unset, *, default_version: str = _Unset, **kwargs: Any + self, + name: str, + body: Union[JSON, _types.UpdateSkillRequest, IO[bytes]] = _Unset, + *, + default_version: str = _Unset, + **kwargs: Any ) -> _models.SkillDetails: """Update a skill. @@ -15779,8 +15911,8 @@ def update( :param name: The name of the skill to update. Required. :type name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, UpdateSkillRequest, IO[bytes] Required. + :type body: JSON or ~azure.ai.projects.types.UpdateSkillRequest or IO[bytes] :keyword default_version: The version identifier that the skill should point to. When set, the skill's default version will resolve to this version instead of the latest. Required. :paramtype default_version: str @@ -15956,7 +16088,12 @@ def create( @overload def create( - self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + name: str, + body: _types.CreateSkillVersionRequest, + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.SkillVersion: """Create a new version of a skill. @@ -15965,7 +16102,7 @@ def create( :param name: The name of the skill. If the skill does not exist, it will be created. Required. :type name: str :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.CreateSkillVersionRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -15998,7 +16135,7 @@ def create( def create( self, name: str, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.CreateSkillVersionRequest, IO[bytes]] = _Unset, *, inline_content: Optional[_models.SkillInlineContent] = None, default: Optional[bool] = None, @@ -16010,8 +16147,9 @@ def create( :param name: The name of the skill. If the skill does not exist, it will be created. Required. :type name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, CreateSkillVersionRequest, IO[bytes] + Required. + :type body: JSON or ~azure.ai.projects.types.CreateSkillVersionRequest or IO[bytes] :keyword inline_content: Inline skill content for simple skills without file uploads. Foundry-specific extension. Default value is None. :paramtype inline_content: ~azure.ai.projects.models.SkillInlineContent @@ -16107,7 +16245,9 @@ def create_from_files( """ @overload - def create_from_files(self, name: str, content: JSON, **kwargs: Any) -> _models.SkillVersion: + def create_from_files( + self, name: str, content: _types.CreateSkillVersionFromFilesBody, **kwargs: Any + ) -> _models.SkillVersion: """Create a skill version from uploaded files. Creates a new version of a skill from uploaded files via multipart form data. @@ -16115,7 +16255,7 @@ def create_from_files(self, name: str, content: JSON, **kwargs: Any) -> _models. :param name: The name of the skill. Required. :type name: str :param content: Required. - :type content: JSON + :type content: ~azure.ai.projects.types.CreateSkillVersionFromFilesBody :return: SkillVersion. The SkillVersion is compatible with MutableMapping :rtype: ~azure.ai.projects.models.SkillVersion :raises ~azure.core.exceptions.HttpResponseError: @@ -16123,7 +16263,10 @@ def create_from_files(self, name: str, content: JSON, **kwargs: Any) -> _models. @distributed_trace def create_from_files( - self, name: str, content: Union[_models.CreateSkillVersionFromFilesBody, JSON], **kwargs: Any + self, + name: str, + content: Union[_models.CreateSkillVersionFromFilesBody, _types.CreateSkillVersionFromFilesBody], + **kwargs: Any ) -> _models.SkillVersion: """Create a skill version from uploaded files. @@ -16131,8 +16274,9 @@ def create_from_files( :param name: The name of the skill. Required. :type name: str - :param content: Is either a CreateSkillVersionFromFilesBody type or a JSON type. Required. - :type content: ~azure.ai.projects.models.CreateSkillVersionFromFilesBody or JSON + :param content: Is one of the following types: CreateSkillVersionFromFilesBody Required. + :type content: ~azure.ai.projects.models.CreateSkillVersionFromFilesBody or + ~azure.ai.projects.types.CreateSkillVersionFromFilesBody :return: SkillVersion. The SkillVersion is compatible with MutableMapping :rtype: ~azure.ai.projects.models.SkillVersion :raises ~azure.core.exceptions.HttpResponseError: @@ -16780,14 +16924,19 @@ def create_generation_job( @overload def create_generation_job( - self, job: JSON, *, operation_id: Optional[str] = None, content_type: str = "application/json", **kwargs: Any + self, + job: _types.DataGenerationJob, + *, + operation_id: Optional[str] = None, + content_type: str = "application/json", + **kwargs: Any ) -> _models.DataGenerationJob: """Create a data generation job. Submits a new data generation job for asynchronous execution. :param job: The job to create. Required. - :type job: JSON + :type job: ~azure.ai.projects.types.DataGenerationJob :keyword operation_id: Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. Default value is None. :paramtype operation_id: str @@ -16828,7 +16977,7 @@ def create_generation_job( @distributed_trace def create_generation_job( self, - job: Union[_models.DataGenerationJob, JSON, IO[bytes]], + job: Union[_models.DataGenerationJob, _types.DataGenerationJob, IO[bytes]], *, operation_id: Optional[str] = None, **kwargs: Any @@ -16837,9 +16986,10 @@ def create_generation_job( Submits a new data generation job for asynchronous execution. - :param job: The job to create. Is one of the following types: DataGenerationJob, JSON, - IO[bytes] Required. - :type job: ~azure.ai.projects.models.DataGenerationJob or JSON or IO[bytes] + :param job: The job to create. Is either a DataGenerationJob type or a IO[bytes] type. + Required. + :type job: ~azure.ai.projects.models.DataGenerationJob or + ~azure.ai.projects.types.DataGenerationJob or IO[bytes] :keyword operation_id: Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. Default value is None. :paramtype operation_id: str @@ -17086,7 +17236,12 @@ def create_optimization_job( @overload def create_optimization_job( - self, job: JSON, *, operation_id: Optional[str] = None, content_type: str = "application/json", **kwargs: Any + self, + job: _types.OptimizationJob, + *, + operation_id: Optional[str] = None, + content_type: str = "application/json", + **kwargs: Any ) -> _models.OptimizationJob: """Creates an agent optimization job. @@ -17094,7 +17249,7 @@ def create_optimization_job( idempotent retry. :param job: The job to create. Required. - :type job: JSON + :type job: ~azure.ai.projects.types.OptimizationJob :keyword operation_id: Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. Default value is None. :paramtype operation_id: str @@ -17135,16 +17290,20 @@ def create_optimization_job( @distributed_trace def create_optimization_job( - self, job: Union[_models.OptimizationJob, JSON, IO[bytes]], *, operation_id: Optional[str] = None, **kwargs: Any + self, + job: Union[_models.OptimizationJob, _types.OptimizationJob, IO[bytes]], + *, + operation_id: Optional[str] = None, + **kwargs: Any ) -> _models.OptimizationJob: """Creates an agent optimization job. Create an optimization job. Returns 201 with the queued job. Honours ``Operation-Id`` for idempotent retry. - :param job: The job to create. Is one of the following types: OptimizationJob, JSON, IO[bytes] - Required. - :type job: ~azure.ai.projects.models.OptimizationJob or JSON or IO[bytes] + :param job: The job to create. Is either a OptimizationJob type or a IO[bytes] type. Required. + :type job: ~azure.ai.projects.models.OptimizationJob or + ~azure.ai.projects.types.OptimizationJob or IO[bytes] :keyword operation_id: Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. Default value is None. :paramtype operation_id: str diff --git a/sdk/ai/azure-ai-projects/azure/ai/projects/operations/_patch_agents.py b/sdk/ai/azure-ai-projects/azure/ai/projects/operations/_patch_agents.py index d72e81cf077d..ac21500415e3 100644 --- a/sdk/ai/azure-ai-projects/azure/ai/projects/operations/_patch_agents.py +++ b/sdk/ai/azure-ai-projects/azure/ai/projects/operations/_patch_agents.py @@ -13,7 +13,8 @@ from typing import Union, Optional, Any, IO, overload from azure.core.exceptions import HttpResponseError from azure.core.tracing.decorator import distributed_trace -from ._operations import AgentsOperations as GeneratedAgentsOperations, JSON, _Unset +from ._operations import AgentsOperations as GeneratedAgentsOperations, _Unset +from .. import types as _types from .. import models as _models from ..models._patch import ( _FOUNDRY_FEATURES_HEADER_NAME, @@ -104,7 +105,12 @@ def create_version( @overload def create_version( - self, agent_name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, + agent_name: str, + body: _types.CreateAgentVersionRequest, + *, + content_type: str = "application/json", + **kwargs: Any, ) -> _models.AgentVersionDetails: """Create an agent version. @@ -118,7 +124,7 @@ def create_version( * Must not exceed 63 characters. Required. :type agent_name: str :param body: Required. - :type body: JSON + :type body: ~azure.ai.projects.types.CreateAgentVersionRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -156,7 +162,7 @@ def create_version( def create_version( self, agent_name: str, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[_types.CreateAgentVersionRequest, IO[bytes]] = _Unset, *, definition: _models.AgentDefinition = _Unset, metadata: Optional[dict[str, str]] = None, @@ -176,8 +182,9 @@ def create_version( * Can contain hyphens in the middle * Must not exceed 63 characters. Required. :type agent_name: str - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: CreateAgentVersionRequest, IO[bytes] + Required. + :type body: ~azure.ai.projects.types.CreateAgentVersionRequest or IO[bytes] :keyword definition: The agent definition. This can be a workflow, hosted agent, or a simple agent definition. Required. :paramtype definition: ~azure.ai.projects.models.AgentDefinition @@ -212,14 +219,20 @@ def create_version( kwargs["headers"] = headers try: + if body is _Unset: + return super().create_version( + agent_name, + definition=definition, + metadata=metadata, + description=description, + blueprint_reference=blueprint_reference, + draft=draft, + **kwargs, + ) + return super().create_version( agent_name, body, - definition=definition, - metadata=metadata, - description=description, - blueprint_reference=blueprint_reference, - draft=draft, **kwargs, ) except HttpResponseError as exc: diff --git a/sdk/ai/azure-ai-projects/azure/ai/projects/operations/_patch_evaluation_rules.py b/sdk/ai/azure-ai-projects/azure/ai/projects/operations/_patch_evaluation_rules.py index 859bea44b87b..8292036b6677 100644 --- a/sdk/ai/azure-ai-projects/azure/ai/projects/operations/_patch_evaluation_rules.py +++ b/sdk/ai/azure-ai-projects/azure/ai/projects/operations/_patch_evaluation_rules.py @@ -11,8 +11,9 @@ from typing import Union, Any, IO, overload from azure.core.exceptions import HttpResponseError from azure.core.tracing.decorator import distributed_trace -from ._operations import EvaluationRulesOperations as GeneratedEvaluationRulesOperations, JSON +from ._operations import EvaluationRulesOperations as GeneratedEvaluationRulesOperations from .. import models as _models +from .. import types as _types from ..models._enums import _FoundryFeaturesOptInKeys from ..models._patch import ( _FOUNDRY_FEATURES_HEADER_NAME, @@ -53,14 +54,16 @@ def create_or_update( @overload def create_or_update( - self, id: str, evaluation_rule: JSON, *, content_type: str = "application/json", **kwargs: Any + self, id: str, evaluation_rule: _types.EvaluationRule, *, content_type: str = "application/json", **kwargs: Any ) -> _models.EvaluationRule: """Create or update an evaluation rule. + Creates a new evaluation rule, or replaces the existing rule when the identifier matches. + :param id: Unique identifier for the evaluation rule. Required. :type id: str :param evaluation_rule: Evaluation rule resource. Required. - :type evaluation_rule: JSON + :type evaluation_rule: ~azure.ai.projects.types.EvaluationRule :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -91,15 +94,18 @@ def create_or_update( @distributed_trace def create_or_update( - self, id: str, evaluation_rule: Union[_models.EvaluationRule, JSON, IO[bytes]], **kwargs: Any + self, id: str, evaluation_rule: Union[_models.EvaluationRule, _types.EvaluationRule, IO[bytes]], **kwargs: Any ) -> _models.EvaluationRule: """Create or update an evaluation rule. + Creates a new evaluation rule, or replaces the existing rule when the identifier matches. + :param id: Unique identifier for the evaluation rule. Required. :type id: str - :param evaluation_rule: Evaluation rule resource. Is one of the following types: - EvaluationRule, JSON, IO[bytes] Required. - :type evaluation_rule: ~azure.ai.projects.models.EvaluationRule or JSON or IO[bytes] + :param evaluation_rule: Evaluation rule resource. Is either a EvaluationRule type or a + IO[bytes] type. Required. + :type evaluation_rule: ~azure.ai.projects.models.EvaluationRule or + ~azure.ai.projects.types.EvaluationRule or IO[bytes] :return: EvaluationRule. The EvaluationRule is compatible with MutableMapping :rtype: ~azure.ai.projects.models.EvaluationRule :raises ~azure.core.exceptions.HttpResponseError: diff --git a/sdk/ai/azure-ai-projects/azure/ai/projects/types.py b/sdk/ai/azure-ai-projects/azure/ai/projects/types.py new file mode 100644 index 000000000000..cb30e0f17d6d --- /dev/null +++ b/sdk/ai/azure-ai-projects/azure/ai/projects/types.py @@ -0,0 +1,7201 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Literal, Optional, TYPE_CHECKING, Union +from typing_extensions import Required, TypedDict + +from ._utils.utils import FileType +from .models._enums import ( + AgentBlueprintReferenceType, + AgentEndpointAuthorizationSchemeType, + AgentKind, + ContainerNetworkPolicyParamType, + ContainerSkillType, + CustomToolParamFormatType, + DataGenerationJobOutputType, + DataGenerationJobSourceType, + DataGenerationJobType, + DatasetType, + EvaluationRuleActionType, + EvaluationTaxonomyInputType, + EvaluatorDefinitionType, + EvaluatorGenerationJobSourceType, + FunctionShellToolParamEnvironmentType, + IndexType, + InsightType, + MemoryStoreKind, + OpenApiAuthType, + OptimizationDatasetInputType, + PendingUploadType, + RecurrenceType, + RoutineActionType, + RoutineDispatchPayloadType, + RoutineTriggerType, + SampleType, + ScheduleTaskType, + TelemetryEndpointAuthType, + TelemetryEndpointKind, + TextResponseFormatConfigurationType, + ToolChoiceParamType, + ToolType, + ToolboxToolType, + TriggerType, + VersionIndicatorType, + VersionSelectorType, +) + +if TYPE_CHECKING: + from . import _unions + from .models import ( + AgentEndpointProtocol, + AttackStrategy, + AzureAISearchQueryType, + CodeDependencyResolution, + ComputerEnvironment, + ContainerMemoryLimit, + DataGenerationJobScenario, + DayOfWeek, + EvaluationLevel, + EvaluationRuleEventType, + EvaluatorCategory, + EvaluatorMetricDirection, + EvaluatorMetricType, + EvaluatorType, + FoundryModelArtifactProfileCategory, + FoundryModelArtifactProfileSignal, + FoundryModelSourceType, + FoundryModelWarningCode, + FoundryModelWeightType, + GitHubIssueEvent, + GrammarSyntax1, + ImageGenAction, + InputFidelity, + JobStatus, + MemoryItemKind, + OperationState, + RankerVersionType, + RiskCategory, + ScheduleProvisioningStatus, + SearchContentType, + SearchContextSize, + SimpleQnAFineTuningQuestionType, + TelemetryDataKind, + TelemetryTransportProtocol, + ToolSearchExecutionType, + TreatmentEffectType, + ) + + +class _CreateAgentVersionFromCodeContent(TypedDict, total=False): + """Multipart request body for updating or versioning a code-based agent (POST /agents/{name} and + POST /agents/{name}/versions). + + :ivar metadata: JSON metadata including description and hosted definition. Required. + :vartype metadata: "_CreateAgentVersionFromCodeMetadata" + :ivar code: The code zip file (max 250 MB). Required. + :vartype code: FileType + """ + + metadata: Required["_CreateAgentVersionFromCodeMetadata"] + """JSON metadata including description and hosted definition. Required.""" + code: Required[FileType] + """The code zip file (max 250 MB). Required.""" + + +class _CreateAgentVersionFromCodeMetadata(TypedDict, total=False): + """JSON metadata for code-based agent operations (create, update, create version). The agent name + comes from the URL path parameter or the ``x-ms-agent-name`` header, so it is not included in + this model. The content hash (SHA-256 of the zip) is carried in the ``x-ms-code-zip-sha256`` + header. + + :ivar description: A human-readable description of the agent. + :vartype description: str + :ivar metadata: Set of 16 key-value pairs that can be attached to an object. This can be + useful for storing additional information about the object in a structured + format, and querying for objects via API or the dashboard. + + Keys are strings with a maximum length of 64 characters. Values are strings + with a maximum length of 512 characters. + :vartype metadata: dict[str, str] + :ivar definition: The hosted agent definition including code_configuration (runtime, + entry_point), cpu, memory, and protocol_versions. Required. + :vartype definition: "HostedAgentDefinition" + """ + + description: str + """A human-readable description of the agent.""" + metadata: dict[str, str] + """Set of 16 key-value pairs that can be attached to an object. This can be + useful for storing additional information about the object in a structured + format, and querying for objects via API or the dashboard. + + Keys are strings with a maximum length of 64 characters. Values are strings + with a maximum length of 512 characters.""" + definition: Required["HostedAgentDefinition"] + """The hosted agent definition including code_configuration (runtime, entry_point), cpu, memory, + and protocol_versions. Required.""" + + +class A2APreviewTool(TypedDict, total=False): + """An agent implementing the A2A protocol. + + :ivar type: The type of the tool. Always ``"a2a_preview``. Required. A2A_PREVIEW. + :vartype type: Literal[ToolType.A2A_PREVIEW] + :ivar base_url: Base URL of the agent. + :vartype base_url: str + :ivar agent_card_path: The path to the agent card relative to the ``base_url``. If not + provided, defaults to ``/.well-known/agent-card.json``. + :vartype agent_card_path: str + :ivar project_connection_id: The connection ID in the project for the A2A server. The + connection stores authentication and other connection details needed to connect to the A2A + server. + :vartype project_connection_id: str + :ivar send_credentials_for_agent_card: When ``true``, Foundry sends its credentials when + fetching the remote agent's Agent Card. The service defaults to ``false`` if a value is not + specified by the caller (anonymous fetch). + :vartype send_credentials_for_agent_card: bool + """ + + type: Required[Literal[ToolType.A2A_PREVIEW]] + """The type of the tool. Always ``\"a2a_preview``. Required. A2A_PREVIEW.""" + base_url: str + """Base URL of the agent.""" + agent_card_path: str + """The path to the agent card relative to the ``base_url``. If not provided, defaults to + ``/.well-known/agent-card.json``.""" + project_connection_id: str + """The connection ID in the project for the A2A server. The connection stores authentication and + other connection details needed to connect to the A2A server.""" + send_credentials_for_agent_card: bool + """When ``true``, Foundry sends its credentials when fetching the remote agent's Agent Card. The + service defaults to ``false`` if a value is not specified by the caller (anonymous fetch).""" + + +class A2APreviewToolboxTool(TypedDict, total=False): + """An A2A tool stored in a toolbox. + + :ivar name: Optional user-defined name for this tool or configuration. + :vartype name: str + :ivar description: Optional user-defined description for this tool or configuration. + :vartype description: str + :ivar tool_configs: Per-tool configuration map. Keys are tool names or ``*`` (catch-all + default). Resolution order: exact tool name match takes priority over ``*``. Unknown tool names + are silently ignored at runtime. + :vartype tool_configs: dict[str, "ToolConfig"] + :ivar type: Required. A2A_PREVIEW. + :vartype type: Literal[ToolboxToolType.A2A_PREVIEW] + :ivar base_url: Base URL of the agent. + :vartype base_url: str + :ivar agent_card_path: The path to the agent card relative to the ``base_url``. If not + provided, defaults to ``/.well-known/agent-card.json``. + :vartype agent_card_path: str + :ivar project_connection_id: The connection ID in the project for the A2A server. The + connection stores authentication and other connection details needed to connect to the A2A + server. + :vartype project_connection_id: str + :ivar send_credentials_for_agent_card: When ``true``, Foundry sends its credentials when + fetching the remote agent's Agent Card. The service defaults to ``false`` if a value is not + specified by the caller (anonymous fetch). + :vartype send_credentials_for_agent_card: bool + """ + + name: str + """Optional user-defined name for this tool or configuration.""" + description: str + """Optional user-defined description for this tool or configuration.""" + tool_configs: dict[str, "ToolConfig"] + """Per-tool configuration map. Keys are tool names or ``*`` (catch-all default). Resolution order: + exact tool name match takes priority over ``*``. Unknown tool names are silently ignored at + runtime.""" + type: Required[Literal[ToolboxToolType.A2A_PREVIEW]] + """Required. A2A_PREVIEW.""" + base_url: str + """Base URL of the agent.""" + agent_card_path: str + """The path to the agent card relative to the ``base_url``. If not provided, defaults to + ``/.well-known/agent-card.json``.""" + project_connection_id: str + """The connection ID in the project for the A2A server. The connection stores authentication and + other connection details needed to connect to the A2A server.""" + send_credentials_for_agent_card: bool + """When ``true``, Foundry sends its credentials when fetching the remote agent's Agent Card. The + service defaults to ``false`` if a value is not specified by the caller (anonymous fetch).""" + + +class A2AProtocolConfiguration(TypedDict, total=False): + """Configuration specific to the A2A protocol.""" + + +class ActivityProtocolConfiguration(TypedDict, total=False): + """Configuration specific to the activity protocol. + + :ivar enable_m365_public_endpoint: Whether to enable the M365 public endpoint for the activity + protocol. + :vartype enable_m365_public_endpoint: bool + """ + + enable_m365_public_endpoint: bool + """Whether to enable the M365 public endpoint for the activity protocol.""" + + +class AgentCard(TypedDict, total=False): + """AgentCard. + + :ivar version: The version of the agent card. Required. + :vartype version: str + :ivar description: The description of the agent card. + :vartype description: str + :ivar skills: The set of skills that an agent can perform. Required. + :vartype skills: list["AgentCardSkill"] + """ + + version: Required[str] + """The version of the agent card. Required.""" + description: str + """The description of the agent card.""" + skills: Required[list["AgentCardSkill"]] + """The set of skills that an agent can perform. Required.""" + + +class AgentCardSkill(TypedDict, total=False): + """AgentCardSkill. + + :ivar id: a unique identifier for the skill. Required. + :vartype id: str + :ivar name: The name of the skill. Required. + :vartype name: str + :ivar description: A description of the skill. + :vartype description: str + :ivar tags: set of tagwords describing classes of capabilities for the skill. + :vartype tags: list[str] + :ivar examples: A list of example scenarios that the skill can perform. + :vartype examples: list[str] + """ + + id: Required[str] + """a unique identifier for the skill. Required.""" + name: Required[str] + """The name of the skill. Required.""" + description: str + """A description of the skill.""" + tags: list[str] + """set of tagwords describing classes of capabilities for the skill.""" + examples: list[str] + """A list of example scenarios that the skill can perform.""" + + +class AgentClusterInsightRequest(TypedDict, total=False): + """Insights on set of Agent Evaluation Results. + + :ivar type: The type of request. Required. Cluster Insight on an Agent. + :vartype type: Literal[InsightType.AGENT_CLUSTER_INSIGHT] + :ivar agent_name: Identifier for the agent. Required. + :vartype agent_name: str + :ivar model_configuration: Configuration of the model used in the insight generation. + :vartype model_configuration: "InsightModelConfiguration" + """ + + type: Required[Literal[InsightType.AGENT_CLUSTER_INSIGHT]] + """The type of request. Required. Cluster Insight on an Agent.""" + agentName: Required[str] + """Identifier for the agent. Required.""" + modelConfiguration: "InsightModelConfiguration" + """Configuration of the model used in the insight generation.""" + + +class AgentClusterInsightResult(TypedDict, total=False): + """Insights from the agent cluster analysis. + + :ivar type: The type of insights result. Required. Cluster Insight on an Agent. + :vartype type: Literal[InsightType.AGENT_CLUSTER_INSIGHT] + :ivar cluster_insight: Required. + :vartype cluster_insight: "ClusterInsightResult" + """ + + type: Required[Literal[InsightType.AGENT_CLUSTER_INSIGHT]] + """The type of insights result. Required. Cluster Insight on an Agent.""" + clusterInsight: Required["ClusterInsightResult"] + """Required.""" + + +class AgentDataGenerationJobSource(TypedDict, total=False): + """Agent source for data generation jobs — references an agent to fetch instructions and metadata + from. + + :ivar description: Optional description of what this source represents — helps the pipeline + interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core + capabilities'). + :vartype description: str + :ivar type: The source type for this source, which is Agent. Required. Agent source — + references an agent. + :vartype type: Literal[DataGenerationJobSourceType.AGENT] + :ivar agent_name: The agent name to fetch instructions from. Required. + :vartype agent_name: str + :ivar agent_version: The agent version. If not specified, the latest version is used. + :vartype agent_version: str + """ + + description: str + """Optional description of what this source represents — helps the pipeline interpret its content + (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities').""" + type: Required[Literal[DataGenerationJobSourceType.AGENT]] + """The source type for this source, which is Agent. Required. Agent source — references an agent.""" + agent_name: Required[str] + """The agent name to fetch instructions from. Required.""" + agent_version: str + """The agent version. If not specified, the latest version is used.""" + + +class AgentEndpointConfig(TypedDict, total=False): + """AgentEndpointConfig. + + :ivar version_selector: The version selector of the agent endpoint determines how traffic is + routed to different versions of the agent. + :vartype version_selector: "VersionSelector" + :ivar protocol_configuration: Per-protocol configuration for the agent endpoint. + :vartype protocol_configuration: "ProtocolConfiguration" + :ivar authorization_schemes: The authorization schemes supported by the agent endpoint. + :vartype authorization_schemes: list["AgentEndpointAuthorizationScheme"] + """ + + version_selector: "VersionSelector" + """The version selector of the agent endpoint determines how traffic is routed to different + versions of the agent.""" + protocol_configuration: "ProtocolConfiguration" + """Per-protocol configuration for the agent endpoint.""" + authorization_schemes: list["AgentEndpointAuthorizationScheme"] + """The authorization schemes supported by the agent endpoint.""" + + +class AgentEvaluatorGenerationJobSource(TypedDict, total=False): + """Agent source for evaluator generation jobs — references an agent to fetch instructions and + metadata from. + + :ivar description: Optional description of what this source represents — helps the pipeline + interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core + capabilities'). + :vartype description: str + :ivar type: The source type for this source, which is Agent. Required. Agent source — + references an agent to fetch instructions and metadata from. + :vartype type: Literal[EvaluatorGenerationJobSourceType.AGENT] + :ivar agent_name: The agent name to fetch instructions from. Required. + :vartype agent_name: str + :ivar agent_version: The agent version. If not specified, the latest version is used. + :vartype agent_version: str + """ + + description: str + """Optional description of what this source represents — helps the pipeline interpret its content + (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities').""" + type: Required[Literal[EvaluatorGenerationJobSourceType.AGENT]] + """The source type for this source, which is Agent. Required. Agent source — references an agent + to fetch instructions and metadata from.""" + agent_name: Required[str] + """The agent name to fetch instructions from. Required.""" + agent_version: str + """The agent version. If not specified, the latest version is used.""" + + +class AgentTaxonomyInput(TypedDict, total=False): + """Input configuration for the evaluation taxonomy when the input type is agent. + + :ivar type: Input type of the evaluation taxonomy. Required. Agent. + :vartype type: Literal[EvaluationTaxonomyInputType.AGENT] + :ivar target: Target configuration for the agent. Required. + :vartype target: "EvaluationTarget" + :ivar risk_categories: List of risk categories to evaluate against. Required. + :vartype risk_categories: list[Union[str, "RiskCategory"]] + """ + + type: Required[Literal[EvaluationTaxonomyInputType.AGENT]] + """Input type of the evaluation taxonomy. Required. Agent.""" + target: Required["EvaluationTarget"] + """Target configuration for the agent. Required.""" + riskCategories: Required[list[Union[str, "RiskCategory"]]] + """List of risk categories to evaluate against. Required.""" + + +class AISearchIndexResource(TypedDict, total=False): + """A AI Search Index resource. + + :ivar project_connection_id: An index connection ID in an IndexResource attached to this agent. + :vartype project_connection_id: str + :ivar index_name: The name of an index in an IndexResource attached to this agent. + :vartype index_name: str + :ivar query_type: Type of query in an AIIndexResource attached to this agent. Known values are: + "simple", "semantic", "vector", "vector_simple_hybrid", and "vector_semantic_hybrid". + :vartype query_type: Union[str, "AzureAISearchQueryType"] + :ivar top_k: Number of documents to retrieve from search and present to the model. + :vartype top_k: int + :ivar filter: filter string for search resource. `Learn more here + `_. + :vartype filter: str + :ivar index_asset_id: Index asset id for search resource. + :vartype index_asset_id: str + """ + + project_connection_id: str + """An index connection ID in an IndexResource attached to this agent.""" + index_name: str + """The name of an index in an IndexResource attached to this agent.""" + query_type: Union[str, "AzureAISearchQueryType"] + """Type of query in an AIIndexResource attached to this agent. Known values are: \"simple\", + \"semantic\", \"vector\", \"vector_simple_hybrid\", and \"vector_semantic_hybrid\".""" + top_k: int + """Number of documents to retrieve from search and present to the model.""" + filter: str + """filter string for search resource. `Learn more here + `_.""" + index_asset_id: str + """Index asset id for search resource.""" + + +class ApiError(TypedDict, total=False): + """ApiError. + + :ivar code: Required. + :vartype code: str + :ivar message: Required. + :vartype message: str + :ivar param: + :vartype param: str + :ivar type: + :vartype type: str + :ivar details: + :vartype details: list["ApiError"] + :ivar additional_info: + :vartype additional_info: dict[str, Any] + :ivar debug_info: + :vartype debug_info: dict[str, Any] + """ + + code: Required[Optional[str]] + """Required.""" + message: Required[str] + """Required.""" + param: Optional[str] + type: str + details: list["ApiError"] + additionalInfo: dict[str, Any] + debugInfo: dict[str, Any] + + +class ApplyPatchToolParam(TypedDict, total=False): + """Apply patch tool. + + :ivar type: The type of the tool. Always ``apply_patch``. Required. APPLY_PATCH. + :vartype type: Literal[ToolType.APPLY_PATCH] + """ + + type: Required[Literal[ToolType.APPLY_PATCH]] + """The type of the tool. Always ``apply_patch``. Required. APPLY_PATCH.""" + + +class ApproximateLocation(TypedDict, total=False): + """ApproximateLocation. + + :ivar type: The type of location approximation. Always ``approximate``. Required. Default value + is "approximate". + :vartype type: Literal["approximate"] + :ivar country: + :vartype country: str + :ivar region: + :vartype region: str + :ivar city: + :vartype city: str + :ivar timezone: + :vartype timezone: str + """ + + type: Required[Literal["approximate"]] + """The type of location approximation. Always ``approximate``. Required. Default value is + \"approximate\".""" + country: Optional[str] + region: Optional[str] + city: Optional[str] + timezone: Optional[str] + + +class ArtifactProfile(TypedDict, total=False): + """Artifact profile of the model. + + :ivar category: The category of the artifact profile. Required. Known values are: "DataOnly", + "RuntimeDependent", and "Unknown". + :vartype category: Union[str, "FoundryModelArtifactProfileCategory"] + :ivar signals: Signals detected in the model artifact. + :vartype signals: list[Union[str, "FoundryModelArtifactProfileSignal"]] + """ + + category: Required[Union[str, "FoundryModelArtifactProfileCategory"]] + """The category of the artifact profile. Required. Known values are: \"DataOnly\", + \"RuntimeDependent\", and \"Unknown\".""" + signals: list[Union[str, "FoundryModelArtifactProfileSignal"]] + """Signals detected in the model artifact.""" + + +class AutoCodeInterpreterToolParam(TypedDict, total=False): + """Automatic Code Interpreter Tool Parameters. + + :ivar type: Always ``auto``. Required. Default value is "auto". + :vartype type: Literal["auto"] + :ivar file_ids: An optional list of uploaded files to make available to your code. + :vartype file_ids: list[str] + :ivar memory_limit: Known values are: "1g", "4g", "16g", and "64g". + :vartype memory_limit: Union[str, "ContainerMemoryLimit"] + :ivar network_policy: + :vartype network_policy: "ContainerNetworkPolicyParam" + """ + + type: Required[Literal["auto"]] + """Always ``auto``. Required. Default value is \"auto\".""" + file_ids: list[str] + """An optional list of uploaded files to make available to your code.""" + memory_limit: Optional[Union[str, "ContainerMemoryLimit"]] + """Known values are: \"1g\", \"4g\", \"16g\", and \"64g\".""" + network_policy: "ContainerNetworkPolicyParam" + + +class AzureAIAgentTarget(TypedDict, total=False): + """Represents a target specifying an Azure AI agent. + + :ivar type: The type of target, always ``azure_ai_agent``. Required. Default value is + "azure_ai_agent". + :vartype type: Literal["azure_ai_agent"] + :ivar name: The unique identifier of the Azure AI agent. Required. + :vartype name: str + :ivar version: The version of the Azure AI agent. + :vartype version: str + :ivar tool_descriptions: The parameters used to control the sampling behavior of the agent + during text generation. + :vartype tool_descriptions: list["ToolDescription"] + :ivar tools: + :vartype tools: list["Tool"] + """ + + type: Required[Literal["azure_ai_agent"]] + """The type of target, always ``azure_ai_agent``. Required. Default value is \"azure_ai_agent\".""" + name: Required[str] + """The unique identifier of the Azure AI agent. Required.""" + version: str + """The version of the Azure AI agent.""" + tool_descriptions: list["ToolDescription"] + """The parameters used to control the sampling behavior of the agent during text generation.""" + tools: list["Tool"] + + +class AzureAIModelTarget(TypedDict, total=False): + """Represents a target specifying an Azure AI model for operations requiring model selection. + + :ivar type: The type of target, always ``azure_ai_model``. Required. Default value is + "azure_ai_model". + :vartype type: Literal["azure_ai_model"] + :ivar model: The unique identifier of the Azure AI model. + :vartype model: str + :ivar sampling_params: The parameters used to control the sampling behavior of the model during + text generation. + :vartype sampling_params: "ModelSamplingParams" + """ + + type: Required[Literal["azure_ai_model"]] + """The type of target, always ``azure_ai_model``. Required. Default value is \"azure_ai_model\".""" + model: str + """The unique identifier of the Azure AI model.""" + sampling_params: "ModelSamplingParams" + """The parameters used to control the sampling behavior of the model during text generation.""" + + +class AzureAISearchIndex(TypedDict, total=False): + """Azure AI Search Index Definition. + + :ivar id: Asset ID, a unique identifier for the asset. + :vartype id: str + :ivar name: The name of the resource. Required. + :vartype name: str + :ivar version: The version of the resource. Required. + :vartype version: str + :ivar description: The asset description text. + :vartype description: str + :ivar tags: Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar type: Type of index. Required. Azure search. + :vartype type: Literal[IndexType.AZURE_SEARCH] + :ivar connection_name: Name of connection to Azure AI Search. Required. + :vartype connection_name: str + :ivar index_name: Name of index in Azure AI Search resource to attach. Required. + :vartype index_name: str + :ivar field_mapping: Field mapping configuration. + :vartype field_mapping: "FieldMapping" + """ + + id: str + """Asset ID, a unique identifier for the asset.""" + name: Required[str] + """The name of the resource. Required.""" + version: Required[str] + """The version of the resource. Required.""" + description: str + """The asset description text.""" + tags: dict[str, str] + """Tag dictionary. Tags can be added, removed, and updated.""" + type: Required[Literal[IndexType.AZURE_SEARCH]] + """Type of index. Required. Azure search.""" + connectionName: Required[str] + """Name of connection to Azure AI Search. Required.""" + indexName: Required[str] + """Name of index in Azure AI Search resource to attach. Required.""" + fieldMapping: "FieldMapping" + """Field mapping configuration.""" + + +class AzureAISearchTool(TypedDict, total=False): + """The input definition information for an Azure AI search tool as used to configure an agent. + + :ivar type: The object type, which is always 'azure_ai_search'. Required. AZURE_AI_SEARCH. + :vartype type: Literal[ToolType.AZURE_AI_SEARCH] + :ivar name: Deprecated. This property is deprecated and will be removed in a future version. + :vartype name: str + :ivar description: Deprecated. This property is deprecated and will be removed in a future + version. + :vartype description: str + :ivar tool_configs: Deprecated. This property is deprecated and will be removed in a future + version. + :vartype tool_configs: dict[str, "ToolConfig"] + :ivar azure_ai_search: The azure ai search index resource. Required. + :vartype azure_ai_search: "AzureAISearchToolResource" + """ + + type: Required[Literal[ToolType.AZURE_AI_SEARCH]] + """The object type, which is always 'azure_ai_search'. Required. AZURE_AI_SEARCH.""" + name: str + """Deprecated. This property is deprecated and will be removed in a future version.""" + description: str + """Deprecated. This property is deprecated and will be removed in a future version.""" + tool_configs: dict[str, "ToolConfig"] + """Deprecated. This property is deprecated and will be removed in a future version.""" + azure_ai_search: Required["AzureAISearchToolResource"] + """The azure ai search index resource. Required.""" + + +class AzureAISearchToolboxTool(TypedDict, total=False): + """An Azure AI Search tool stored in a toolbox. + + :ivar name: Optional user-defined name for this tool or configuration. + :vartype name: str + :ivar description: Optional user-defined description for this tool or configuration. + :vartype description: str + :ivar tool_configs: Per-tool configuration map. Keys are tool names or ``*`` (catch-all + default). Resolution order: exact tool name match takes priority over ``*``. Unknown tool names + are silently ignored at runtime. + :vartype tool_configs: dict[str, "ToolConfig"] + :ivar type: Required. AZURE_AI_SEARCH. + :vartype type: Literal[ToolboxToolType.AZURE_AI_SEARCH] + :ivar azure_ai_search: The azure ai search index resource. Required. + :vartype azure_ai_search: "AzureAISearchToolResource" + """ + + name: str + """Optional user-defined name for this tool or configuration.""" + description: str + """Optional user-defined description for this tool or configuration.""" + tool_configs: dict[str, "ToolConfig"] + """Per-tool configuration map. Keys are tool names or ``*`` (catch-all default). Resolution order: + exact tool name match takes priority over ``*``. Unknown tool names are silently ignored at + runtime.""" + type: Required[Literal[ToolboxToolType.AZURE_AI_SEARCH]] + """Required. AZURE_AI_SEARCH.""" + azure_ai_search: Required["AzureAISearchToolResource"] + """The azure ai search index resource. Required.""" + + +class AzureAISearchToolResource(TypedDict, total=False): + """A set of index resources used by the ``azure_ai_search`` tool. + + :ivar indexes: The indices attached to this agent. There can be a maximum of 1 index resource + attached to the agent. Required. + :vartype indexes: list["AISearchIndexResource"] + """ + + indexes: Required[list["AISearchIndexResource"]] + """The indices attached to this agent. There can be a maximum of 1 index resource attached to the + agent. Required.""" + + +class AzureFunctionBinding(TypedDict, total=False): + """The structure for keeping storage queue name and URI. + + :ivar type: The type of binding, which is always 'storage_queue'. Required. Default value is + "storage_queue". + :vartype type: Literal["storage_queue"] + :ivar storage_queue: Storage queue. Required. + :vartype storage_queue: "AzureFunctionStorageQueue" + """ + + type: Required[Literal["storage_queue"]] + """The type of binding, which is always 'storage_queue'. Required. Default value is + \"storage_queue\".""" + storage_queue: Required["AzureFunctionStorageQueue"] + """Storage queue. Required.""" + + +class AzureFunctionDefinition(TypedDict, total=False): + """The definition of Azure function. + + :ivar function: The definition of azure function and its parameters. Required. + :vartype function: "AzureFunctionDefinitionFunction" + :ivar input_binding: Input storage queue. The queue storage trigger runs a function as messages + are added to it. Required. + :vartype input_binding: "AzureFunctionBinding" + :ivar output_binding: Output storage queue. The function writes output to this queue when the + input items are processed. Required. + :vartype output_binding: "AzureFunctionBinding" + """ + + function: Required["AzureFunctionDefinitionFunction"] + """The definition of azure function and its parameters. Required.""" + input_binding: Required["AzureFunctionBinding"] + """Input storage queue. The queue storage trigger runs a function as messages are added to it. + Required.""" + output_binding: Required["AzureFunctionBinding"] + """Output storage queue. The function writes output to this queue when the input items are + processed. Required.""" + + +class AzureFunctionDefinitionFunction(TypedDict, total=False): + """AzureFunctionDefinitionFunction. + + :ivar name: The name of the function to be called. Required. + :vartype name: str + :ivar description: A description of what the function does, used by the model to choose when + and how to call the function. + :vartype description: str + :ivar parameters: The parameters the functions accepts, described as a JSON Schema object. + Required. + :vartype parameters: dict[str, Any] + """ + + name: Required[str] + """The name of the function to be called. Required.""" + description: str + """A description of what the function does, used by the model to choose when and how to call the + function.""" + parameters: Required[dict[str, Any]] + """The parameters the functions accepts, described as a JSON Schema object. Required.""" + + +class AzureFunctionStorageQueue(TypedDict, total=False): + """The structure for keeping storage queue name and URI. + + :ivar queue_service_endpoint: URI to the Azure Storage Queue service allowing you to manipulate + a queue. Required. + :vartype queue_service_endpoint: str + :ivar queue_name: The name of an Azure function storage queue. Required. + :vartype queue_name: str + """ + + queue_service_endpoint: Required[str] + """URI to the Azure Storage Queue service allowing you to manipulate a queue. Required.""" + queue_name: Required[str] + """The name of an Azure function storage queue. Required.""" + + +class AzureFunctionTool(TypedDict, total=False): + """The input definition information for an Azure Function Tool, as used to configure an Agent. + + :ivar type: The object type, which is always 'browser_automation'. Required. AZURE_FUNCTION. + :vartype type: Literal[ToolType.AZURE_FUNCTION] + :ivar tool_configs: Deprecated. This property is deprecated and will be removed in a future + version. + :vartype tool_configs: dict[str, "ToolConfig"] + :ivar azure_function: The Azure Function Tool definition. Required. + :vartype azure_function: "AzureFunctionDefinition" + """ + + type: Required[Literal[ToolType.AZURE_FUNCTION]] + """The object type, which is always 'browser_automation'. Required. AZURE_FUNCTION.""" + tool_configs: dict[str, "ToolConfig"] + """Deprecated. This property is deprecated and will be removed in a future version.""" + azure_function: Required["AzureFunctionDefinition"] + """The Azure Function Tool definition. Required.""" + + +class AzureOpenAIModelConfiguration(TypedDict, total=False): + """Azure OpenAI model configuration. The API version would be selected by the service for querying + the model. + + :ivar type: Required. Default value is "AzureOpenAIModel". + :vartype type: Literal["AzureOpenAIModel"] + :ivar model_deployment_name: Deployment name for AOAI model. Example: gpt-4o if in AIServices + or connection based ``connection_name/deployment_name`` (e.g. ``my-aoai-connection/gpt-4o``). + Required. + :vartype model_deployment_name: str + """ + + type: Required[Literal["AzureOpenAIModel"]] + """Required. Default value is \"AzureOpenAIModel\".""" + modelDeploymentName: Required[str] + """Deployment name for AOAI model. Example: gpt-4o if in AIServices or connection based + ``connection_name/deployment_name`` (e.g. ``my-aoai-connection/gpt-4o``). Required.""" + + +class BingCustomSearchConfiguration(TypedDict, total=False): + """A bing custom search configuration. + + :ivar project_connection_id: Project connection id for grounding with bing search. Required. + :vartype project_connection_id: str + :ivar instance_name: Name of the custom configuration instance given to config. Required. + :vartype instance_name: str + :ivar market: The market where the results come from. + :vartype market: str + :ivar set_lang: The language to use for user interface strings when calling Bing API. + :vartype set_lang: str + :ivar count: The number of search results to return in the bing api response. + :vartype count: int + :ivar freshness: Filter search results by a specific time range. See `accepted values here + `_. + :vartype freshness: str + """ + + project_connection_id: Required[str] + """Project connection id for grounding with bing search. Required.""" + instance_name: Required[str] + """Name of the custom configuration instance given to config. Required.""" + market: str + """The market where the results come from.""" + set_lang: str + """The language to use for user interface strings when calling Bing API.""" + count: int + """The number of search results to return in the bing api response.""" + freshness: str + """Filter search results by a specific time range. See `accepted values here + `_.""" + + +class BingCustomSearchPreviewTool(TypedDict, total=False): + """The input definition information for a Bing custom search tool as used to configure an agent. + + :ivar type: The object type, which is always 'bing_custom_search_preview'. Required. + BING_CUSTOM_SEARCH_PREVIEW. + :vartype type: Literal[ToolType.BING_CUSTOM_SEARCH_PREVIEW] + :ivar bing_custom_search_preview: The bing custom search tool parameters. Required. + :vartype bing_custom_search_preview: "BingCustomSearchToolParameters" + """ + + type: Required[Literal[ToolType.BING_CUSTOM_SEARCH_PREVIEW]] + """The object type, which is always 'bing_custom_search_preview'. Required. + BING_CUSTOM_SEARCH_PREVIEW.""" + bing_custom_search_preview: Required["BingCustomSearchToolParameters"] + """The bing custom search tool parameters. Required.""" + + +class BingCustomSearchToolParameters(TypedDict, total=False): + """The bing custom search tool parameters. + + :ivar search_configurations: The project connections attached to this tool. There can be a + maximum of 1 connection resource attached to the tool. Required. + :vartype search_configurations: list["BingCustomSearchConfiguration"] + """ + + search_configurations: Required[list["BingCustomSearchConfiguration"]] + """The project connections attached to this tool. There can be a maximum of 1 connection resource + attached to the tool. Required.""" + + +class BingGroundingSearchConfiguration(TypedDict, total=False): + """Search configuration for Bing Grounding. + + :ivar project_connection_id: Project connection id for grounding with bing search. Required. + :vartype project_connection_id: str + :ivar market: The market where the results come from. + :vartype market: str + :ivar set_lang: The language to use for user interface strings when calling Bing API. + :vartype set_lang: str + :ivar count: The number of search results to return in the bing api response. + :vartype count: int + :ivar freshness: Filter search results by a specific time range. See `accepted values here + `_. + :vartype freshness: str + """ + + project_connection_id: Required[str] + """Project connection id for grounding with bing search. Required.""" + market: str + """The market where the results come from.""" + set_lang: str + """The language to use for user interface strings when calling Bing API.""" + count: int + """The number of search results to return in the bing api response.""" + freshness: str + """Filter search results by a specific time range. See `accepted values here + `_.""" + + +class BingGroundingSearchToolParameters(TypedDict, total=False): + """The bing grounding search tool parameters. + + :ivar search_configurations: The search configurations attached to this tool. There can be a + maximum of 1 search configuration resource attached to the tool. Required. + :vartype search_configurations: list["BingGroundingSearchConfiguration"] + """ + + search_configurations: Required[list["BingGroundingSearchConfiguration"]] + """The search configurations attached to this tool. There can be a maximum of 1 search + configuration resource attached to the tool. Required.""" + + +class BingGroundingTool(TypedDict, total=False): + """The input definition information for a bing grounding search tool as used to configure an + agent. + + :ivar type: The object type, which is always 'bing_grounding'. Required. BING_GROUNDING. + :vartype type: Literal[ToolType.BING_GROUNDING] + :ivar name: Deprecated. This property is deprecated and will be removed in a future version. + :vartype name: str + :ivar description: Deprecated. This property is deprecated and will be removed in a future + version. + :vartype description: str + :ivar tool_configs: Deprecated. This property is deprecated and will be removed in a future + version. + :vartype tool_configs: dict[str, "ToolConfig"] + :ivar bing_grounding: The bing grounding search tool parameters. Required. + :vartype bing_grounding: "BingGroundingSearchToolParameters" + """ + + type: Required[Literal[ToolType.BING_GROUNDING]] + """The object type, which is always 'bing_grounding'. Required. BING_GROUNDING.""" + name: str + """Deprecated. This property is deprecated and will be removed in a future version.""" + description: str + """Deprecated. This property is deprecated and will be removed in a future version.""" + tool_configs: dict[str, "ToolConfig"] + """Deprecated. This property is deprecated and will be removed in a future version.""" + bing_grounding: Required["BingGroundingSearchToolParameters"] + """The bing grounding search tool parameters. Required.""" + + +class BotServiceAuthorizationScheme(TypedDict, total=False): + """BotServiceAuthorizationScheme. + + :ivar type: Required. BOT_SERVICE. + :vartype type: Literal[AgentEndpointAuthorizationSchemeType.BOT_SERVICE] + """ + + type: Required[Literal[AgentEndpointAuthorizationSchemeType.BOT_SERVICE]] + """Required. BOT_SERVICE.""" + + +class BotServiceRbacAuthorizationScheme(TypedDict, total=False): + """BotServiceRbacAuthorizationScheme. + + :ivar type: Required. BOT_SERVICE_RBAC. + :vartype type: Literal[AgentEndpointAuthorizationSchemeType.BOT_SERVICE_RBAC] + """ + + type: Required[Literal[AgentEndpointAuthorizationSchemeType.BOT_SERVICE_RBAC]] + """Required. BOT_SERVICE_RBAC.""" + + +class BotServiceTenantAuthorizationScheme(TypedDict, total=False): + """BotServiceTenantAuthorizationScheme. + + :ivar type: Required. BOT_SERVICE_TENANT. + :vartype type: Literal[AgentEndpointAuthorizationSchemeType.BOT_SERVICE_TENANT] + """ + + type: Required[Literal[AgentEndpointAuthorizationSchemeType.BOT_SERVICE_TENANT]] + """Required. BOT_SERVICE_TENANT.""" + + +class BrowserAutomationPreviewTool(TypedDict, total=False): + """The input definition information for a Browser Automation Tool, as used to configure an Agent. + + :ivar type: The object type, which is always 'browser_automation_preview'. Required. + BROWSER_AUTOMATION_PREVIEW. + :vartype type: Literal[ToolType.BROWSER_AUTOMATION_PREVIEW] + :ivar browser_automation_preview: The Browser Automation Tool parameters. Required. + :vartype browser_automation_preview: "BrowserAutomationToolParameters" + """ + + type: Required[Literal[ToolType.BROWSER_AUTOMATION_PREVIEW]] + """The object type, which is always 'browser_automation_preview'. Required. + BROWSER_AUTOMATION_PREVIEW.""" + browser_automation_preview: Required["BrowserAutomationToolParameters"] + """The Browser Automation Tool parameters. Required.""" + + +class BrowserAutomationPreviewToolboxTool(TypedDict, total=False): + """A browser automation tool stored in a toolbox. + + :ivar name: Optional user-defined name for this tool or configuration. + :vartype name: str + :ivar description: Optional user-defined description for this tool or configuration. + :vartype description: str + :ivar tool_configs: Per-tool configuration map. Keys are tool names or ``*`` (catch-all + default). Resolution order: exact tool name match takes priority over ``*``. Unknown tool names + are silently ignored at runtime. + :vartype tool_configs: dict[str, "ToolConfig"] + :ivar type: Required. BROWSER_AUTOMATION_PREVIEW. + :vartype type: Literal[ToolboxToolType.BROWSER_AUTOMATION_PREVIEW] + :ivar browser_automation_preview: The Browser Automation Tool parameters. Required. + :vartype browser_automation_preview: "BrowserAutomationToolParameters" + """ + + name: str + """Optional user-defined name for this tool or configuration.""" + description: str + """Optional user-defined description for this tool or configuration.""" + tool_configs: dict[str, "ToolConfig"] + """Per-tool configuration map. Keys are tool names or ``*`` (catch-all default). Resolution order: + exact tool name match takes priority over ``*``. Unknown tool names are silently ignored at + runtime.""" + type: Required[Literal[ToolboxToolType.BROWSER_AUTOMATION_PREVIEW]] + """Required. BROWSER_AUTOMATION_PREVIEW.""" + browser_automation_preview: Required["BrowserAutomationToolParameters"] + """The Browser Automation Tool parameters. Required.""" + + +class BrowserAutomationToolConnectionParameters(TypedDict, total=False): # pylint: disable=name-too-long + """Definition of input parameters for the connection used by the Browser Automation Tool. + + :ivar project_connection_id: The ID of the project connection to your Azure Playwright + resource. Required. + :vartype project_connection_id: str + """ + + project_connection_id: Required[str] + """The ID of the project connection to your Azure Playwright resource. Required.""" + + +class BrowserAutomationToolParameters(TypedDict, total=False): + """Definition of input parameters for the Browser Automation Tool. + + :ivar connection: The project connection parameters associated with the Browser Automation + Tool. Required. + :vartype connection: "BrowserAutomationToolConnectionParameters" + """ + + connection: Required["BrowserAutomationToolConnectionParameters"] + """The project connection parameters associated with the Browser Automation Tool. Required.""" + + +class CaptureStructuredOutputsTool(TypedDict, total=False): + """A tool for capturing structured outputs. + + :ivar type: The type of the tool. Always ``capture_structured_outputs``. Required. + CAPTURE_STRUCTURED_OUTPUTS. + :vartype type: Literal[ToolType.CAPTURE_STRUCTURED_OUTPUTS] + :ivar name: Deprecated. This property is deprecated and will be removed in a future version. + :vartype name: str + :ivar description: Deprecated. This property is deprecated and will be removed in a future + version. + :vartype description: str + :ivar tool_configs: Deprecated. This property is deprecated and will be removed in a future + version. + :vartype tool_configs: dict[str, "ToolConfig"] + :ivar outputs: The structured outputs to capture from the model. Required. + :vartype outputs: "StructuredOutputDefinition" + """ + + type: Required[Literal[ToolType.CAPTURE_STRUCTURED_OUTPUTS]] + """The type of the tool. Always ``capture_structured_outputs``. Required. + CAPTURE_STRUCTURED_OUTPUTS.""" + name: str + """Deprecated. This property is deprecated and will be removed in a future version.""" + description: str + """Deprecated. This property is deprecated and will be removed in a future version.""" + tool_configs: dict[str, "ToolConfig"] + """Deprecated. This property is deprecated and will be removed in a future version.""" + outputs: Required["StructuredOutputDefinition"] + """The structured outputs to capture from the model. Required.""" + + +class ChartCoordinate(TypedDict, total=False): + """Coordinates for the analysis chart. + + :ivar x: X-axis coordinate. Required. + :vartype x: int + :ivar y: Y-axis coordinate. Required. + :vartype y: int + :ivar size: Size of the chart element. Required. + :vartype size: int + """ + + x: Required[int] + """X-axis coordinate. Required.""" + y: Required[int] + """Y-axis coordinate. Required.""" + size: Required[int] + """Size of the chart element. Required.""" + + +class ClusterInsightResult(TypedDict, total=False): + """Insights from the cluster analysis. + + :ivar summary: Summary of the insights report. Required. + :vartype summary: "InsightSummary" + :ivar clusters: List of clusters identified in the insights. Required. + :vartype clusters: list["InsightCluster"] + :ivar coordinates: Optional mapping of IDs to 2D coordinates used by the UX for + visualization. + + The map keys are string identifiers (for example, a cluster id or a sample id) + and the values are the coordinates and visual size for rendering on a 2D chart. + + This property is omitted unless the client requests coordinates (for example, + by passing ``includeCoordinates=true`` as a query parameter). + + Example: + + .. code-block:: + + { + "cluster-1": { "x": 12, "y": 34, "size": 8 }, + "sample-123": { "x": 18, "y": 22, "size": 4 } + } + + Coordinates are intended only for client-side visualization and do not + modify the canonical insights results. + :vartype coordinates: dict[str, "ChartCoordinate"] + """ + + summary: Required["InsightSummary"] + """Summary of the insights report. Required.""" + clusters: Required[list["InsightCluster"]] + """List of clusters identified in the insights. Required.""" + coordinates: dict[str, "ChartCoordinate"] + """ Optional mapping of IDs to 2D coordinates used by the UX for visualization. + + The map keys are string identifiers (for example, a cluster id or a sample id) + and the values are the coordinates and visual size for rendering on a 2D chart. + + This property is omitted unless the client requests coordinates (for example, + by passing ``includeCoordinates=true`` as a query parameter). + + Example: + + .. code-block:: + + { + \"cluster-1\": { \"x\": 12, \"y\": 34, \"size\": 8 }, + \"sample-123\": { \"x\": 18, \"y\": 22, \"size\": 4 } + } + + Coordinates are intended only for client-side visualization and do not + modify the canonical insights results.""" + + +class ClusterTokenUsage(TypedDict, total=False): + """Token usage for cluster analysis. + + :ivar input_token_usage: input token usage. Required. + :vartype input_token_usage: int + :ivar output_token_usage: output token usage. Required. + :vartype output_token_usage: int + :ivar total_token_usage: total token usage. Required. + :vartype total_token_usage: int + """ + + inputTokenUsage: Required[int] + """input token usage. Required.""" + outputTokenUsage: Required[int] + """output token usage. Required.""" + totalTokenUsage: Required[int] + """total token usage. Required.""" + + +class CodeBasedEvaluatorDefinition(TypedDict, total=False): + """Code-based evaluator definition using python code. + + :ivar init_parameters: The JSON schema (Draft 2020-12) for the evaluator's input parameters. + This includes parameters like type, properties, required. + :vartype init_parameters: dict[str, Any] + :ivar data_schema: The JSON schema (Draft 2020-12) for the evaluator's input data. This + includes parameters like type, properties, required. + :vartype data_schema: dict[str, Any] + :ivar metrics: List of output metrics produced by this evaluator. + :vartype metrics: dict[str, "EvaluatorMetric"] + :ivar type: Required. Code-based definition. + :vartype type: Literal[EvaluatorDefinitionType.CODE] + :ivar code_text: Inline code text for the evaluator. + :vartype code_text: str + :ivar entry_point: The entry point Python file name for the uploaded evaluator code (e.g. + 'answer_length_evaluator.py'). + :vartype entry_point: str + :ivar image_tag: The container image tag to use for evaluator code execution. + :vartype image_tag: str + :ivar blob_uri: The blob URI for the evaluator storage. + :vartype blob_uri: str + """ + + init_parameters: dict[str, Any] + """The JSON schema (Draft 2020-12) for the evaluator's input parameters. This includes parameters + like type, properties, required.""" + data_schema: dict[str, Any] + """The JSON schema (Draft 2020-12) for the evaluator's input data. This includes parameters like + type, properties, required.""" + metrics: dict[str, "EvaluatorMetric"] + """List of output metrics produced by this evaluator.""" + type: Required[Literal[EvaluatorDefinitionType.CODE]] + """Required. Code-based definition.""" + code_text: str + """Inline code text for the evaluator.""" + entry_point: str + """The entry point Python file name for the uploaded evaluator code (e.g. + 'answer_length_evaluator.py').""" + image_tag: str + """The container image tag to use for evaluator code execution.""" + blob_uri: str + """The blob URI for the evaluator storage.""" + + +class CodeConfiguration(TypedDict, total=False): + """Code-based deployment configuration for a hosted agent. + + :ivar runtime: The runtime identifier for code execution (e.g., 'python_3_11', 'python_3_12', + 'python_3_13'). Required. + :vartype runtime: str + :ivar entry_point: The entry point command and arguments for the code execution. Required. + :vartype entry_point: list[str] + :ivar dependency_resolution: How package dependencies are resolved at deployment time. Defaults + to ``bundled``, where the caller bundles all dependencies into the uploaded zip and the service + performs no remote build. ``remote_build`` instructs the service to build dependencies remotely + from the manifest included in the uploaded zip. Required. Known values are: "bundled" and + "remote_build". + :vartype dependency_resolution: Union[str, "CodeDependencyResolution"] + :ivar content_hash: The SHA-256 hex digest of the uploaded code zip. Set by the service from + the ``x-ms-code-zip-sha256`` request header; read-only in responses and never accepted in + request payloads. + :vartype content_hash: str + """ + + runtime: Required[str] + """The runtime identifier for code execution (e.g., 'python_3_11', 'python_3_12', 'python_3_13'). + Required.""" + entry_point: Required[list[str]] + """The entry point command and arguments for the code execution. Required.""" + dependency_resolution: Required[Union[str, "CodeDependencyResolution"]] + """How package dependencies are resolved at deployment time. Defaults to ``bundled``, where the + caller bundles all dependencies into the uploaded zip and the service performs no remote build. + ``remote_build`` instructs the service to build dependencies remotely from the manifest + included in the uploaded zip. Required. Known values are: \"bundled\" and \"remote_build\".""" + content_hash: str + """The SHA-256 hex digest of the uploaded code zip. Set by the service from the + ``x-ms-code-zip-sha256`` request header; read-only in responses and never accepted in request + payloads.""" + + +class CodeInterpreterTool(TypedDict, total=False): + """Code interpreter. + + :ivar type: The type of the code interpreter tool. Always ``code_interpreter``. Required. + CODE_INTERPRETER. + :vartype type: Literal[ToolType.CODE_INTERPRETER] + :ivar name: Deprecated. This property is deprecated and will be removed in a future version. + :vartype name: str + :ivar description: Deprecated. This property is deprecated and will be removed in a future + version. + :vartype description: str + :ivar tool_configs: Deprecated. This property is deprecated and will be removed in a future + version. + :vartype tool_configs: dict[str, "ToolConfig"] + :ivar container: The code interpreter container. Can be a container ID or an object that + specifies uploaded file IDs to make available to your code, along with an optional + ``memory_limit`` setting. If not provided, the service assumes auto. Is either a str type or a + AutoCodeInterpreterToolParam type. + :vartype container: Union[str, "AutoCodeInterpreterToolParam"] + """ + + type: Required[Literal[ToolType.CODE_INTERPRETER]] + """The type of the code interpreter tool. Always ``code_interpreter``. Required. CODE_INTERPRETER.""" + name: str + """Deprecated. This property is deprecated and will be removed in a future version.""" + description: str + """Deprecated. This property is deprecated and will be removed in a future version.""" + tool_configs: dict[str, "ToolConfig"] + """Deprecated. This property is deprecated and will be removed in a future version.""" + container: Union[str, "AutoCodeInterpreterToolParam"] + """The code interpreter container. Can be a container ID or an object that specifies uploaded file + IDs to make available to your code, along with an optional ``memory_limit`` setting. If not + provided, the service assumes auto. Is either a str type or a AutoCodeInterpreterToolParam + type.""" + + +class CodeInterpreterToolboxTool(TypedDict, total=False): + """A code interpreter tool stored in a toolbox. + + :ivar name: Optional user-defined name for this tool or configuration. + :vartype name: str + :ivar description: Optional user-defined description for this tool or configuration. + :vartype description: str + :ivar tool_configs: Per-tool configuration map. Keys are tool names or ``*`` (catch-all + default). Resolution order: exact tool name match takes priority over ``*``. Unknown tool names + are silently ignored at runtime. + :vartype tool_configs: dict[str, "ToolConfig"] + :ivar type: Required. CODE_INTERPRETER. + :vartype type: Literal[ToolboxToolType.CODE_INTERPRETER] + :ivar container: The code interpreter container. Can be a container ID or an object that + specifies uploaded file IDs to make available to your code, along with an optional + ``memory_limit`` setting. If not provided, the service assumes auto. Is either a str type or a + AutoCodeInterpreterToolParam type. + :vartype container: Union[str, "AutoCodeInterpreterToolParam"] + """ + + name: str + """Optional user-defined name for this tool or configuration.""" + description: str + """Optional user-defined description for this tool or configuration.""" + tool_configs: dict[str, "ToolConfig"] + """Per-tool configuration map. Keys are tool names or ``*`` (catch-all default). Resolution order: + exact tool name match takes priority over ``*``. Unknown tool names are silently ignored at + runtime.""" + type: Required[Literal[ToolboxToolType.CODE_INTERPRETER]] + """Required. CODE_INTERPRETER.""" + container: Union[str, "AutoCodeInterpreterToolParam"] + """The code interpreter container. Can be a container ID or an object that specifies uploaded file + IDs to make available to your code, along with an optional ``memory_limit`` setting. If not + provided, the service assumes auto. Is either a str type or a AutoCodeInterpreterToolParam + type.""" + + +class ComparisonFilter(TypedDict, total=False): + """Comparison Filter. + + :ivar type: Specifies the comparison operator: ``eq``, ``ne``, ``gt``, ``gte``, ``lt``, + ``lte``, ``in``, ``nin``. + + * `eq`: equals + * `ne`: not equal + * `gt`: greater than + * `gte`: greater than or equal + * `lt`: less than + * `lte`: less than or equal + * `in`: in + * `nin`: not in. Required. Is one of the following types: Literal["eq"], Literal["ne"], + Literal["gt"], Literal["gte"], Literal["lt"], Literal["lte"], Literal["in"], Literal["nin"] + :vartype type: Literal["eq", "ne", "gt", "gte", "lt", "lte", "in", "nin"] + :ivar key: The key to compare against the value. Required. + :vartype key: str + :ivar value: The value to compare against the attribute key; supports string, number, or + boolean types. Required. Is one of the following types: str, float, bool, [Union[str, float]] + :vartype value: Union[str, float, bool, list[Union[str, float]]] + """ + + type: Required[Literal["eq", "ne", "gt", "gte", "lt", "lte", "in", "nin"]] + """Specifies the comparison operator: ``eq``, ``ne``, ``gt``, ``gte``, ``lt``, ``lte``, ``in``, + ``nin``. + + * `eq`: equals + * `ne`: not equal + * `gt`: greater than + * `gte`: greater than or equal + * `lt`: less than + * `lte`: less than or equal + * `in`: in + * `nin`: not in. Required. Is one of the following types: Literal[\"eq\"], + Literal[\"ne\"], Literal[\"gt\"], Literal[\"gte\"], Literal[\"lt\"], Literal[\"lte\"], + Literal[\"in\"], Literal[\"nin\"]""" + key: Required[str] + """The key to compare against the value. Required.""" + value: Required[Union[str, float, bool, list[Union[str, float]]]] + """The value to compare against the attribute key; supports string, number, or boolean types. + Required. Is one of the following types: str, float, bool, [Union[str, float]]""" + + +class CompoundFilter(TypedDict, total=False): + """Compound Filter. + + :ivar type: Type of operation: ``and`` or ``or``. Required. Is either a Literal["and"] type or + a Literal["or"] type. + :vartype type: Literal["and", "or"] + :ivar filters: Array of filters to combine. Items can be ``ComparisonFilter`` or + ``CompoundFilter``. Required. + :vartype filters: list[Union["ComparisonFilter", Any]] + """ + + type: Required[Literal["and", "or"]] + """Type of operation: ``and`` or ``or``. Required. Is either a Literal[\"and\"] type or a + Literal[\"or\"] type.""" + filters: Required[list[Union["ComparisonFilter", Any]]] + """Array of filters to combine. Items can be ``ComparisonFilter`` or ``CompoundFilter``. Required.""" + + +class ComputerTool(TypedDict, total=False): + """Computer. + + :ivar type: The type of the computer tool. Always ``computer``. Required. COMPUTER. + :vartype type: Literal[ToolType.COMPUTER] + """ + + type: Required[Literal[ToolType.COMPUTER]] + """The type of the computer tool. Always ``computer``. Required. COMPUTER.""" + + +class ComputerUsePreviewTool(TypedDict, total=False): + """Computer use preview. + + :ivar type: The type of the computer use tool. Always ``computer_use_preview``. Required. + COMPUTER_USE_PREVIEW. + :vartype type: Literal[ToolType.COMPUTER_USE_PREVIEW] + :ivar environment: The type of computer environment to control. Required. Known values are: + "windows", "mac", "linux", "ubuntu", and "browser". + :vartype environment: Union[str, "ComputerEnvironment"] + :ivar display_width: The width of the computer display. Required. + :vartype display_width: int + :ivar display_height: The height of the computer display. Required. + :vartype display_height: int + """ + + type: Required[Literal[ToolType.COMPUTER_USE_PREVIEW]] + """The type of the computer use tool. Always ``computer_use_preview``. Required. + COMPUTER_USE_PREVIEW.""" + environment: Required[Union[str, "ComputerEnvironment"]] + """The type of computer environment to control. Required. Known values are: \"windows\", \"mac\", + \"linux\", \"ubuntu\", and \"browser\".""" + display_width: Required[int] + """The width of the computer display. Required.""" + display_height: Required[int] + """The height of the computer display. Required.""" + + +class ContainerAutoParam(TypedDict, total=False): + """ContainerAutoParam. + + :ivar type: Automatically creates a container for this request. Required. CONTAINER_AUTO. + :vartype type: Literal[FunctionShellToolParamEnvironmentType.CONTAINER_AUTO] + :ivar file_ids: An optional list of uploaded files to make available to your code. + :vartype file_ids: list[str] + :ivar memory_limit: Known values are: "1g", "4g", "16g", and "64g". + :vartype memory_limit: Union[str, "ContainerMemoryLimit"] + :ivar skills: An optional list of skills referenced by id or inline data. + :vartype skills: list["ContainerSkill"] + :ivar network_policy: + :vartype network_policy: "ContainerNetworkPolicyParam" + """ + + type: Required[Literal[FunctionShellToolParamEnvironmentType.CONTAINER_AUTO]] + """Automatically creates a container for this request. Required. CONTAINER_AUTO.""" + file_ids: list[str] + """An optional list of uploaded files to make available to your code.""" + memory_limit: Optional[Union[str, "ContainerMemoryLimit"]] + """Known values are: \"1g\", \"4g\", \"16g\", and \"64g\".""" + skills: list["ContainerSkill"] + """An optional list of skills referenced by id or inline data.""" + network_policy: "ContainerNetworkPolicyParam" + + +class ContainerConfiguration(TypedDict, total=False): + """Container-based deployment configuration for a hosted agent. + + :ivar image: The container image for the hosted agent. Required. + :vartype image: str + """ + + image: Required[str] + """The container image for the hosted agent. Required.""" + + +class ContainerNetworkPolicyAllowlistParam(TypedDict, total=False): + """ContainerNetworkPolicyAllowlistParam. + + :ivar type: Allow outbound network access only to specified domains. Always ``allowlist``. + Required. ALLOWLIST. + :vartype type: Literal[ContainerNetworkPolicyParamType.ALLOWLIST] + :ivar allowed_domains: A list of allowed domains when type is ``allowlist``. Required. + :vartype allowed_domains: list[str] + :ivar domain_secrets: Optional domain-scoped secrets for allowlisted domains. + :vartype domain_secrets: list["ContainerNetworkPolicyDomainSecretParam"] + """ + + type: Required[Literal[ContainerNetworkPolicyParamType.ALLOWLIST]] + """Allow outbound network access only to specified domains. Always ``allowlist``. Required. + ALLOWLIST.""" + allowed_domains: Required[list[str]] + """A list of allowed domains when type is ``allowlist``. Required.""" + domain_secrets: list["ContainerNetworkPolicyDomainSecretParam"] + """Optional domain-scoped secrets for allowlisted domains.""" + + +class ContainerNetworkPolicyDisabledParam(TypedDict, total=False): + """ContainerNetworkPolicyDisabledParam. + + :ivar type: Disable outbound network access. Always ``disabled``. Required. DISABLED. + :vartype type: Literal[ContainerNetworkPolicyParamType.DISABLED] + """ + + type: Required[Literal[ContainerNetworkPolicyParamType.DISABLED]] + """Disable outbound network access. Always ``disabled``. Required. DISABLED.""" + + +class ContainerNetworkPolicyDomainSecretParam(TypedDict, total=False): + """ContainerNetworkPolicyDomainSecretParam. + + :ivar domain: The domain associated with the secret. Required. + :vartype domain: str + :ivar name: The name of the secret to inject for the domain. Required. + :vartype name: str + :ivar value: The secret value to inject for the domain. Required. + :vartype value: str + """ + + domain: Required[str] + """The domain associated with the secret. Required.""" + name: Required[str] + """The name of the secret to inject for the domain. Required.""" + value: Required[str] + """The secret value to inject for the domain. Required.""" + + +class ContinuousEvaluationRuleAction(TypedDict, total=False): + """Evaluation rule action for continuous evaluation. + + :ivar type: Required. Continuous evaluation. + :vartype type: Literal[EvaluationRuleActionType.CONTINUOUS_EVALUATION] + :ivar eval_id: Eval Id to add continuous evaluation runs to. Required. + :vartype eval_id: str + :ivar max_hourly_runs: Maximum number of evaluation runs allowed per hour. + :vartype max_hourly_runs: int + :ivar sampling_rate: Percentage (0-100] chance that a matching event triggers an evaluation. + When omitted, the service-default is to evaluate every event, which is equivalent to setting a + sampling rate of 100. + :vartype sampling_rate: float + """ + + type: Required[Literal[EvaluationRuleActionType.CONTINUOUS_EVALUATION]] + """Required. Continuous evaluation.""" + evalId: Required[str] + """Eval Id to add continuous evaluation runs to. Required.""" + maxHourlyRuns: int + """Maximum number of evaluation runs allowed per hour.""" + samplingRate: float + """Percentage (0-100] chance that a matching event triggers an evaluation. When omitted, the + service-default is to evaluate every event, which is equivalent to setting a sampling rate of + 100.""" + + +class CosmosDBIndex(TypedDict, total=False): + """CosmosDB Vector Store Index Definition. + + :ivar id: Asset ID, a unique identifier for the asset. + :vartype id: str + :ivar name: The name of the resource. Required. + :vartype name: str + :ivar version: The version of the resource. Required. + :vartype version: str + :ivar description: The asset description text. + :vartype description: str + :ivar tags: Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar type: Type of index. Required. CosmosDB. + :vartype type: Literal[IndexType.COSMOS_DB] + :ivar connection_name: Name of connection to CosmosDB. Required. + :vartype connection_name: str + :ivar database_name: Name of the CosmosDB Database. Required. + :vartype database_name: str + :ivar container_name: Name of CosmosDB Container. Required. + :vartype container_name: str + :ivar embedding_configuration: Embedding model configuration. Required. + :vartype embedding_configuration: "EmbeddingConfiguration" + :ivar field_mapping: Field mapping configuration. Required. + :vartype field_mapping: "FieldMapping" + """ + + id: str + """Asset ID, a unique identifier for the asset.""" + name: Required[str] + """The name of the resource. Required.""" + version: Required[str] + """The version of the resource. Required.""" + description: str + """The asset description text.""" + tags: dict[str, str] + """Tag dictionary. Tags can be added, removed, and updated.""" + type: Required[Literal[IndexType.COSMOS_DB]] + """Type of index. Required. CosmosDB.""" + connectionName: Required[str] + """Name of connection to CosmosDB. Required.""" + databaseName: Required[str] + """Name of the CosmosDB Database. Required.""" + containerName: Required[str] + """Name of CosmosDB Container. Required.""" + embeddingConfiguration: Required["EmbeddingConfiguration"] + """Embedding model configuration. Required.""" + fieldMapping: Required["FieldMapping"] + """Field mapping configuration. Required.""" + + +class CreateSkillVersionFromFilesBody(TypedDict, total=False): + """Multipart request body for creating a skill version from files. Accepts either a single zip + file or multiple individual skill files (directory upload). For zip uploads, the server + extracts and validates contents. For directory uploads, files are validated as-is. + + :ivar files: Skill files to upload. Upload a single zip file or multiple individual files with + relative paths. Required. + :vartype files: list[FileType] + :ivar default: Whether to set this version as the default. Defaults to false. + :vartype default: bool + """ + + files: Required[list[FileType]] + """Skill files to upload. Upload a single zip file or multiple individual files with relative + paths. Required.""" + default: bool + """Whether to set this version as the default. Defaults to false.""" + + +class CronTrigger(TypedDict, total=False): + """Cron based trigger. + + :ivar type: Required. Cron based trigger. + :vartype type: Literal[TriggerType.CRON] + :ivar expression: Cron expression that defines the schedule frequency. Required. + :vartype expression: str + :ivar time_zone: Time zone for the cron schedule. Defaults to ``UTC``. + :vartype time_zone: str + :ivar start_time: Start time for the cron schedule in ISO 8601 format. + :vartype start_time: str + :ivar end_time: End time for the cron schedule in ISO 8601 format. + :vartype end_time: str + """ + + type: Required[Literal[TriggerType.CRON]] + """Required. Cron based trigger.""" + expression: Required[str] + """Cron expression that defines the schedule frequency. Required.""" + timeZone: str + """Time zone for the cron schedule. Defaults to ``UTC``.""" + startTime: str + """Start time for the cron schedule in ISO 8601 format.""" + endTime: str + """End time for the cron schedule in ISO 8601 format.""" + + +class CustomGrammarFormatParam(TypedDict, total=False): + """Grammar format. + + :ivar type: Grammar format. Always ``grammar``. Required. GRAMMAR. + :vartype type: Literal[CustomToolParamFormatType.GRAMMAR] + :ivar syntax: The syntax of the grammar definition. One of ``lark`` or ``regex``. Required. + Known values are: "lark" and "regex". + :vartype syntax: Union[str, "GrammarSyntax1"] + :ivar definition: The grammar definition. Required. + :vartype definition: str + """ + + type: Required[Literal[CustomToolParamFormatType.GRAMMAR]] + """Grammar format. Always ``grammar``. Required. GRAMMAR.""" + syntax: Required[Union[str, "GrammarSyntax1"]] + """The syntax of the grammar definition. One of ``lark`` or ``regex``. Required. Known values are: + \"lark\" and \"regex\".""" + definition: Required[str] + """The grammar definition. Required.""" + + +class CustomRoutineTrigger(TypedDict, total=False): + """A custom event routine trigger. + + :ivar type: The trigger type. Required. A custom event trigger. + :vartype type: Literal[RoutineTriggerType.CUSTOM] + :ivar provider: The external provider that emits the custom event. Required. + :vartype provider: str + :ivar event_name: The provider-specific event name that fires the routine. + :vartype event_name: str + :ivar parameters: Provider-specific trigger parameters. Required. + :vartype parameters: dict[str, Any] + """ + + type: Required[Literal[RoutineTriggerType.CUSTOM]] + """The trigger type. Required. A custom event trigger.""" + provider: Required[str] + """The external provider that emits the custom event. Required.""" + event_name: str + """The provider-specific event name that fires the routine.""" + parameters: Required[dict[str, Any]] + """Provider-specific trigger parameters. Required.""" + + +class CustomTextFormatParam(TypedDict, total=False): + """Text format. + + :ivar type: Unconstrained text format. Always ``text``. Required. TEXT. + :vartype type: Literal[CustomToolParamFormatType.TEXT] + """ + + type: Required[Literal[CustomToolParamFormatType.TEXT]] + """Unconstrained text format. Always ``text``. Required. TEXT.""" + + +class CustomToolParam(TypedDict, total=False): + """Custom tool. + + :ivar type: The type of the custom tool. Always ``custom``. Required. CUSTOM. + :vartype type: Literal[ToolType.CUSTOM] + :ivar name: The name of the custom tool, used to identify it in tool calls. Required. + :vartype name: str + :ivar description: Optional description of the custom tool, used to provide more context. + :vartype description: str + :ivar format: The input format for the custom tool. Default is unconstrained text. + :vartype format: "CustomToolParamFormat" + :ivar defer_loading: Whether this tool should be deferred and discovered via tool search. + :vartype defer_loading: bool + """ + + type: Required[Literal[ToolType.CUSTOM]] + """The type of the custom tool. Always ``custom``. Required. CUSTOM.""" + name: Required[str] + """The name of the custom tool, used to identify it in tool calls. Required.""" + description: str + """Optional description of the custom tool, used to provide more context.""" + format: "CustomToolParamFormat" + """The input format for the custom tool. Default is unconstrained text.""" + defer_loading: bool + """Whether this tool should be deferred and discovered via tool search.""" + + +class DailyRecurrenceSchedule(TypedDict, total=False): + """Daily recurrence schedule. + + :ivar type: Daily recurrence type. Required. Daily recurrence pattern. + :vartype type: Literal[RecurrenceType.DAILY] + :ivar hours: Hours for the recurrence schedule. Required. + :vartype hours: list[int] + """ + + type: Required[Literal[RecurrenceType.DAILY]] + """Daily recurrence type. Required. Daily recurrence pattern.""" + hours: Required[list[int]] + """Hours for the recurrence schedule. Required.""" + + +class DataGenerationJob(TypedDict, total=False): + """Data Generation Job resource. + + :ivar id: Server-assigned unique identifier. Required. + :vartype id: str + :ivar inputs: Caller-supplied inputs. + :vartype inputs: "DataGenerationJobInputs" + :ivar result: Result produced on success. + :vartype result: "DataGenerationJobResult" + :ivar status: Current lifecycle status. Required. Known values are: "queued", "in_progress", + "succeeded", "failed", and "cancelled". + :vartype status: Union[str, "JobStatus"] + :ivar error: Error details — populated only on failure. + :vartype error: "ApiError" + :ivar created_at: The timestamp when the job was created, represented in Unix time (seconds + since January 1, 1970). Required. + :vartype created_at: int + :ivar finished_at: The timestamp when the job was finished, represented in Unix time (seconds + since January 1, 1970). + :vartype finished_at: int + """ + + id: Required[str] + """Server-assigned unique identifier. Required.""" + inputs: "DataGenerationJobInputs" + """Caller-supplied inputs.""" + result: "DataGenerationJobResult" + """Result produced on success.""" + status: Required[Union[str, "JobStatus"]] + """Current lifecycle status. Required. Known values are: \"queued\", \"in_progress\", + \"succeeded\", \"failed\", and \"cancelled\".""" + error: "ApiError" + """Error details — populated only on failure.""" + created_at: Required[int] + """The timestamp when the job was created, represented in Unix time (seconds since January 1, + 1970). Required.""" + finished_at: int + """The timestamp when the job was finished, represented in Unix time (seconds since January 1, + 1970).""" + + +class DataGenerationJobInputs(TypedDict, total=False): + """Caller-supplied inputs for a data generation job. + + :ivar name: The display name of the data generation job. Required. + :vartype name: str + :ivar sources: The sources used for the data generation job. Required. + :vartype sources: list["DataGenerationJobSource"] + :ivar options: The options for the data generation job. Required. + :vartype options: "DataGenerationJobOptions" + :ivar scenario: The scenario of the data generation job. Either for fine-tuning or evaluation. + Required. Known values are: "supervised_finetuning", "reinforcement_finetuning", and + "evaluation". + :vartype scenario: Union[str, "DataGenerationJobScenario"] + :ivar output_options: Optional caller-supplied metadata for the job's output. See individual + fields for whether they apply to file outputs (fine-tuning scenarios), dataset outputs + (evaluation scenario), or both. + :vartype output_options: "DataGenerationJobOutputOptions" + """ + + name: Required[str] + """The display name of the data generation job. Required.""" + sources: Required[list["DataGenerationJobSource"]] + """The sources used for the data generation job. Required.""" + options: Required["DataGenerationJobOptions"] + """The options for the data generation job. Required.""" + scenario: Required[Union[str, "DataGenerationJobScenario"]] + """The scenario of the data generation job. Either for fine-tuning or evaluation. Required. Known + values are: \"supervised_finetuning\", \"reinforcement_finetuning\", and \"evaluation\".""" + output_options: "DataGenerationJobOutputOptions" + """Optional caller-supplied metadata for the job's output. See individual fields for whether they + apply to file outputs (fine-tuning scenarios), dataset outputs (evaluation scenario), or both.""" + + +class DataGenerationJobOutputOptions(TypedDict, total=False): + """Output options for data generation job. + + :ivar name: Name to assign to the output. Used as the filename for Azure OpenAI file outputs + (fine-tuning scenarios) and as the dataset name for dataset outputs (evaluation scenario). + :vartype name: str + :ivar description: Description to assign to the output. Applies only to dataset outputs + (evaluation scenario); ignored for Azure OpenAI file outputs. + :vartype description: str + :ivar tags: Tags to assign to the output. Applies only to dataset outputs (evaluation + scenario); ignored for Azure OpenAI file outputs. + :vartype tags: dict[str, str] + """ + + name: str + """Name to assign to the output. Used as the filename for Azure OpenAI file outputs (fine-tuning + scenarios) and as the dataset name for dataset outputs (evaluation scenario).""" + description: str + """Description to assign to the output. Applies only to dataset outputs (evaluation scenario); + ignored for Azure OpenAI file outputs.""" + tags: dict[str, str] + """Tags to assign to the output. Applies only to dataset outputs (evaluation scenario); ignored + for Azure OpenAI file outputs.""" + + +class DataGenerationJobResult(TypedDict, total=False): + """Result produced by a successful data generation job. + + :ivar outputs: The final job outputs: Azure OpenAI files for fine-tuning, or datasets for + evaluation. + :vartype outputs: list["DataGenerationJobOutput"] + :ivar generated_samples: The number of samples actually generated. Required. + :vartype generated_samples: int + :ivar token_usage: The token usage information for the data generation job. + :vartype token_usage: "DataGenerationTokenUsage" + """ + + outputs: list["DataGenerationJobOutput"] + """The final job outputs: Azure OpenAI files for fine-tuning, or datasets for evaluation.""" + generated_samples: Required[int] + """The number of samples actually generated. Required.""" + token_usage: "DataGenerationTokenUsage" + """The token usage information for the data generation job.""" + + +class DataGenerationModelOptions(TypedDict, total=False): + """LLM model options for data generation jobs. + + :ivar model: Base model name used to generate data. Required. + :vartype model: str + """ + + model: Required[str] + """Base model name used to generate data. Required.""" + + +class DataGenerationTokenUsage(TypedDict, total=False): + """Token usage information for a data generation job. + + :ivar prompt_tokens: The number of prompt tokens used. Required. + :vartype prompt_tokens: int + :ivar completion_tokens: The number of completion tokens generated. Required. + :vartype completion_tokens: int + :ivar total_tokens: Total number of tokens used. Required. + :vartype total_tokens: int + """ + + prompt_tokens: Required[int] + """The number of prompt tokens used. Required.""" + completion_tokens: Required[int] + """The number of completion tokens generated. Required.""" + total_tokens: Required[int] + """Total number of tokens used. Required.""" + + +class DatasetDataGenerationJobOutput(TypedDict, total=False): + """Dataset output for a data generation job. + + :ivar type: Dataset output. Required. The generated data is a Dataset. + :vartype type: Literal[DataGenerationJobOutputType.DATASET] + :ivar id: The id of the output dataset created. + :vartype id: str + :ivar name: The name of the output dataset. + :vartype name: str + :ivar version: The version of the output dataset. + :vartype version: str + :ivar description: Description of the output dataset. + :vartype description: str + :ivar tags: Tag dictionary of the output dataset. + :vartype tags: dict[str, str] + """ + + type: Required[Literal[DataGenerationJobOutputType.DATASET]] + """Dataset output. Required. The generated data is a Dataset.""" + id: str + """The id of the output dataset created.""" + name: str + """The name of the output dataset.""" + version: str + """The version of the output dataset.""" + description: str + """Description of the output dataset.""" + tags: dict[str, str] + """Tag dictionary of the output dataset.""" + + +class DatasetEvaluatorGenerationJobSource(TypedDict, total=False): + """Dataset source for evaluator generation jobs — reference to a dataset. + + :ivar description: Optional description of what this source represents — helps the pipeline + interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core + capabilities'). + :vartype description: str + :ivar type: The source type for this source, which is Dataset. Required. Dataset source — + reference to a dataset. + :vartype type: Literal[EvaluatorGenerationJobSourceType.DATASET] + :ivar name: The name of the dataset. Required. + :vartype name: str + :ivar version: The version of the dataset. If not specified, the latest version is used. + :vartype version: str + """ + + description: str + """Optional description of what this source represents — helps the pipeline interpret its content + (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities').""" + type: Required[Literal[EvaluatorGenerationJobSourceType.DATASET]] + """The source type for this source, which is Dataset. Required. Dataset source — reference to a + dataset.""" + name: Required[str] + """The name of the dataset. Required.""" + version: str + """The version of the dataset. If not specified, the latest version is used.""" + + +class DatasetReference(TypedDict, total=False): + """Reference to a versioned Foundry Dataset. + + :ivar name: Dataset name. Required. + :vartype name: str + :ivar version: Dataset version. Required. + :vartype version: str + """ + + name: Required[str] + """Dataset name. Required.""" + version: Required[str] + """Dataset version. Required.""" + + +class Dimension(TypedDict, total=False): + """A single dimension — one independent, measurable quality dimension within a rubric evaluator's + scoring blueprint. + + :ivar id: Stable identifier for this dimension (snake_case, e.g., ``correct_resolution``). + Required. Provided by the user when manually creating a rubric evaluator or during + human-in-the-loop review of a generated set; the generation pipeline produces an initial value + the user can edit. Editable when saving new versions. Required. + :vartype id: str + :ivar description: What this dimension measures (e.g., 'Correctly identifies the user's + reservation intent and pursues the appropriate workflow'). Required. + :vartype description: str + :ivar weight: Relative weight of this dimension (1-10). The generation pipeline assigns exactly + one dimension weight 8-10; all others use 1-6. User edits are not constrained by this + heuristic. Required. + :vartype weight: int + :ivar always_applicable: When true, the LLM judge always scores this dimension regardless of + relevance (skips applicability assessment). The service-generated general quality/policy + dimension has this set to true and is non-editable. Users may set this on their own custom + dimensions. The service defaults to ``false`` if a value is not specified by the caller. + :vartype always_applicable: bool + """ + + id: Required[str] + """Stable identifier for this dimension (snake_case, e.g., ``correct_resolution``). Required. + Provided by the user when manually creating a rubric evaluator or during human-in-the-loop + review of a generated set; the generation pipeline produces an initial value the user can edit. + Editable when saving new versions. Required.""" + description: Required[str] + """What this dimension measures (e.g., 'Correctly identifies the user's reservation intent and + pursues the appropriate workflow'). Required.""" + weight: Required[int] + """Relative weight of this dimension (1-10). The generation pipeline assigns exactly one dimension + weight 8-10; all others use 1-6. User edits are not constrained by this heuristic. Required.""" + always_applicable: bool + """When true, the LLM judge always scores this dimension regardless of relevance (skips + applicability assessment). The service-generated general quality/policy dimension has this set + to true and is non-editable. Users may set this on their own custom dimensions. The service + defaults to ``false`` if a value is not specified by the caller.""" + + +class EmbeddingConfiguration(TypedDict, total=False): + """Embedding configuration class. + + :ivar model_deployment_name: Deployment name of embedding model. It can point to a model + deployment either in the parent AIServices or a connection. Required. + :vartype model_deployment_name: str + :ivar embedding_field: Embedding field. Required. + :vartype embedding_field: str + """ + + modelDeploymentName: Required[str] + """Deployment name of embedding model. It can point to a model deployment either in the parent + AIServices or a connection. Required.""" + embeddingField: Required[str] + """Embedding field. Required.""" + + +class EmptyModelParam(TypedDict, total=False): + """EmptyModelParam.""" + + +class EndpointBasedEvaluatorDefinition(TypedDict, total=False): + """Endpoint-based evaluator definition. The customer owns and hosts an HTTP endpoint that + implements the evaluation contract. The evaluator references a Project Connection by name; the + connection stores the endpoint URL and credentials (API Key or Entra ID). At execution time, + the service resolves the connection to obtain the endpoint URL and authentication details, then + calls the endpoint for each evaluation row. + + :ivar init_parameters: The JSON schema (Draft 2020-12) for the evaluator's input parameters. + This includes parameters like type, properties, required. + :vartype init_parameters: dict[str, Any] + :ivar data_schema: The JSON schema (Draft 2020-12) for the evaluator's input data. This + includes parameters like type, properties, required. + :vartype data_schema: dict[str, Any] + :ivar metrics: List of output metrics produced by this evaluator. + :vartype metrics: dict[str, "EvaluatorMetric"] + :ivar type: Required. Endpoint-based evaluator definition. References a customer-owned HTTP + endpoint via a Project Connection. + :vartype type: Literal[EvaluatorDefinitionType.ENDPOINT] + :ivar connection_name: Name of the Project Connection that stores the endpoint URL and + credentials. The connection must exist on the project and have a non-empty target URL. + Supported auth types: ApiKey (sends ``api-key`` header) and AAD/Entra ID (acquires a bearer + token via the project's Managed Identity). Required. + :vartype connection_name: str + """ + + init_parameters: dict[str, Any] + """The JSON schema (Draft 2020-12) for the evaluator's input parameters. This includes parameters + like type, properties, required.""" + data_schema: dict[str, Any] + """The JSON schema (Draft 2020-12) for the evaluator's input data. This includes parameters like + type, properties, required.""" + metrics: dict[str, "EvaluatorMetric"] + """List of output metrics produced by this evaluator.""" + type: Required[Literal[EvaluatorDefinitionType.ENDPOINT]] + """Required. Endpoint-based evaluator definition. References a customer-owned HTTP endpoint via a + Project Connection.""" + connection_name: Required[str] + """Name of the Project Connection that stores the endpoint URL and credentials. The connection + must exist on the project and have a non-empty target URL. Supported auth types: ApiKey (sends + ``api-key`` header) and AAD/Entra ID (acquires a bearer token via the project's Managed + Identity). Required.""" + + +class EntraAuthorizationScheme(TypedDict, total=False): + """EntraAuthorizationScheme. + + :ivar type: Required. ENTRA. + :vartype type: Literal[AgentEndpointAuthorizationSchemeType.ENTRA] + """ + + type: Required[Literal[AgentEndpointAuthorizationSchemeType.ENTRA]] + """Required. ENTRA.""" + + +class EvalResult(TypedDict, total=False): + """Result of the evaluation. + + :ivar name: name of the check. Required. + :vartype name: str + :ivar type: type of the check. Required. + :vartype type: str + :ivar score: score. Required. + :vartype score: float + :ivar passed: indicates if the check passed or failed. Required. + :vartype passed: bool + """ + + name: Required[str] + """name of the check. Required.""" + type: Required[str] + """type of the check. Required.""" + score: Required[float] + """score. Required.""" + passed: Required[bool] + """indicates if the check passed or failed. Required.""" + + +class EvalRunResultCompareItem(TypedDict, total=False): + """Metric comparison for a treatment against the baseline. + + :ivar treatment_run_id: The treatment run ID. Required. + :vartype treatment_run_id: str + :ivar treatment_run_summary: Summary statistics of the treatment run. Required. + :vartype treatment_run_summary: "EvalRunResultSummary" + :ivar delta_estimate: Estimated difference between treatment and baseline. Required. + :vartype delta_estimate: float + :ivar p_value: P-value for the treatment effect. Required. + :vartype p_value: float + :ivar treatment_effect: Type of treatment effect. Required. Known values are: "TooFewSamples", + "Inconclusive", "Changed", "Improved", and "Degraded". + :vartype treatment_effect: Union[str, "TreatmentEffectType"] + """ + + treatmentRunId: Required[str] + """The treatment run ID. Required.""" + treatmentRunSummary: Required["EvalRunResultSummary"] + """Summary statistics of the treatment run. Required.""" + deltaEstimate: Required[float] + """Estimated difference between treatment and baseline. Required.""" + pValue: Required[float] + """P-value for the treatment effect. Required.""" + treatmentEffect: Required[Union[str, "TreatmentEffectType"]] + """Type of treatment effect. Required. Known values are: \"TooFewSamples\", \"Inconclusive\", + \"Changed\", \"Improved\", and \"Degraded\".""" + + +class EvalRunResultComparison(TypedDict, total=False): + """Comparison results for treatment runs against the baseline. + + :ivar testing_criteria: Name of the testing criteria. Required. + :vartype testing_criteria: str + :ivar metric: Metric being evaluated. Required. + :vartype metric: str + :ivar evaluator: Name of the evaluator for this testing criteria. Required. + :vartype evaluator: str + :ivar baseline_run_summary: Summary statistics of the baseline run. Required. + :vartype baseline_run_summary: "EvalRunResultSummary" + :ivar compare_items: List of comparison results for each treatment run. Required. + :vartype compare_items: list["EvalRunResultCompareItem"] + """ + + testingCriteria: Required[str] + """Name of the testing criteria. Required.""" + metric: Required[str] + """Metric being evaluated. Required.""" + evaluator: Required[str] + """Name of the evaluator for this testing criteria. Required.""" + baselineRunSummary: Required["EvalRunResultSummary"] + """Summary statistics of the baseline run. Required.""" + compareItems: Required[list["EvalRunResultCompareItem"]] + """List of comparison results for each treatment run. Required.""" + + +class EvalRunResultSummary(TypedDict, total=False): + """Summary statistics of a metric in an evaluation run. + + :ivar run_id: The evaluation run ID. Required. + :vartype run_id: str + :ivar sample_count: Number of samples in the evaluation run. Required. + :vartype sample_count: int + :ivar average: Average value of the metric in the evaluation run. Required. + :vartype average: float + :ivar standard_deviation: Standard deviation of the metric in the evaluation run. Required. + :vartype standard_deviation: float + """ + + runId: Required[str] + """The evaluation run ID. Required.""" + sampleCount: Required[int] + """Number of samples in the evaluation run. Required.""" + average: Required[float] + """Average value of the metric in the evaluation run. Required.""" + standardDeviation: Required[float] + """Standard deviation of the metric in the evaluation run. Required.""" + + +class EvaluationComparisonInsightRequest(TypedDict, total=False): + """Evaluation Comparison Request. + + :ivar type: The type of request. Required. Evaluation Comparison. + :vartype type: Literal[InsightType.EVALUATION_COMPARISON] + :ivar eval_id: Identifier for the evaluation. Required. + :vartype eval_id: str + :ivar baseline_run_id: The baseline run ID for comparison. Required. + :vartype baseline_run_id: str + :ivar treatment_run_ids: List of treatment run IDs for comparison. Required. + :vartype treatment_run_ids: list[str] + """ + + type: Required[Literal[InsightType.EVALUATION_COMPARISON]] + """The type of request. Required. Evaluation Comparison.""" + evalId: Required[str] + """Identifier for the evaluation. Required.""" + baselineRunId: Required[str] + """The baseline run ID for comparison. Required.""" + treatmentRunIds: Required[list[str]] + """List of treatment run IDs for comparison. Required.""" + + +class EvaluationComparisonInsightResult(TypedDict, total=False): + """Insights from the evaluation comparison. + + :ivar type: The type of insights result. Required. Evaluation Comparison. + :vartype type: Literal[InsightType.EVALUATION_COMPARISON] + :ivar comparisons: Comparison results for each treatment run against the baseline. Required. + :vartype comparisons: list["EvalRunResultComparison"] + :ivar method: The statistical method used for comparison. Required. + :vartype method: str + """ + + type: Required[Literal[InsightType.EVALUATION_COMPARISON]] + """The type of insights result. Required. Evaluation Comparison.""" + comparisons: Required[list["EvalRunResultComparison"]] + """Comparison results for each treatment run against the baseline. Required.""" + method: Required[str] + """The statistical method used for comparison. Required.""" + + +class EvaluationResultSample(TypedDict, total=False): + """A sample from the evaluation result. + + :ivar id: The unique identifier for the analysis sample. Required. + :vartype id: str + :ivar features: Features to help with additional filtering of data in UX. Required. + :vartype features: dict[str, Any] + :ivar correlation_info: Info about the correlation for the analysis sample. Required. + :vartype correlation_info: dict[str, Any] + :ivar type: Evaluation Result Sample Type. Required. A sample from the evaluation result. + :vartype type: Literal[SampleType.EVALUATION_RESULT_SAMPLE] + :ivar evaluation_result: Evaluation result for the analysis sample. Required. + :vartype evaluation_result: "EvalResult" + """ + + id: Required[str] + """The unique identifier for the analysis sample. Required.""" + features: Required[dict[str, Any]] + """Features to help with additional filtering of data in UX. Required.""" + correlationInfo: Required[dict[str, Any]] + """Info about the correlation for the analysis sample. Required.""" + type: Required[Literal[SampleType.EVALUATION_RESULT_SAMPLE]] + """Evaluation Result Sample Type. Required. A sample from the evaluation result.""" + evaluationResult: Required["EvalResult"] + """Evaluation result for the analysis sample. Required.""" + + +class EvaluationRule(TypedDict, total=False): + """Evaluation rule model. + + :ivar id: Unique identifier for the evaluation rule. Required. + :vartype id: str + :ivar display_name: Display Name for the evaluation rule. + :vartype display_name: str + :ivar description: Description for the evaluation rule. + :vartype description: str + :ivar action: Definition of the evaluation rule action. Required. + :vartype action: "EvaluationRuleAction" + :ivar filter: Filter condition of the evaluation rule. + :vartype filter: "EvaluationRuleFilter" + :ivar event_type: Event type that the evaluation rule applies to. Required. Known values are: + "responseCompleted" and "manual". + :vartype event_type: Union[str, "EvaluationRuleEventType"] + :ivar enabled: Indicates whether the evaluation rule is enabled. Default is true. Required. + :vartype enabled: bool + :ivar system_data: System metadata for the evaluation rule. Required. + :vartype system_data: dict[str, str] + """ + + id: Required[str] + """Unique identifier for the evaluation rule. Required.""" + displayName: str + """Display Name for the evaluation rule.""" + description: str + """Description for the evaluation rule.""" + action: Required["EvaluationRuleAction"] + """Definition of the evaluation rule action. Required.""" + filter: "EvaluationRuleFilter" + """Filter condition of the evaluation rule.""" + eventType: Required[Union[str, "EvaluationRuleEventType"]] + """Event type that the evaluation rule applies to. Required. Known values are: + \"responseCompleted\" and \"manual\".""" + enabled: Required[bool] + """Indicates whether the evaluation rule is enabled. Default is true. Required.""" + systemData: Required[dict[str, str]] + """System metadata for the evaluation rule. Required.""" + + +class EvaluationRuleFilter(TypedDict, total=False): + """Evaluation filter model. + + :ivar agent_name: Filter by agent name. Required. + :vartype agent_name: str + """ + + agentName: Required[str] + """Filter by agent name. Required.""" + + +class EvaluationRunClusterInsightRequest(TypedDict, total=False): + """Insights on set of Evaluation Results. + + :ivar type: The type of insights request. Required. Insights on an Evaluation run result. + :vartype type: Literal[InsightType.EVALUATION_RUN_CLUSTER_INSIGHT] + :ivar eval_id: Evaluation Id for the insights. Required. + :vartype eval_id: str + :ivar run_ids: List of evaluation run IDs for the insights. Required. + :vartype run_ids: list[str] + :ivar model_configuration: Configuration of the model used in the insight generation. + :vartype model_configuration: "InsightModelConfiguration" + """ + + type: Required[Literal[InsightType.EVALUATION_RUN_CLUSTER_INSIGHT]] + """The type of insights request. Required. Insights on an Evaluation run result.""" + evalId: Required[str] + """Evaluation Id for the insights. Required.""" + runIds: Required[list[str]] + """List of evaluation run IDs for the insights. Required.""" + modelConfiguration: "InsightModelConfiguration" + """Configuration of the model used in the insight generation.""" + + +class EvaluationRunClusterInsightResult(TypedDict, total=False): + """Insights from the evaluation run cluster analysis. + + :ivar type: The type of insights result. Required. Insights on an Evaluation run result. + :vartype type: Literal[InsightType.EVALUATION_RUN_CLUSTER_INSIGHT] + :ivar cluster_insight: Required. + :vartype cluster_insight: "ClusterInsightResult" + """ + + type: Required[Literal[InsightType.EVALUATION_RUN_CLUSTER_INSIGHT]] + """The type of insights result. Required. Insights on an Evaluation run result.""" + clusterInsight: Required["ClusterInsightResult"] + """Required.""" + + +class EvaluationScheduleTask(TypedDict, total=False): + """Evaluation task for the schedule. + + :ivar configuration: Configuration for the task. + :vartype configuration: dict[str, str] + :ivar type: Required. Evaluation task. + :vartype type: Literal[ScheduleTaskType.EVALUATION] + :ivar eval_id: Identifier of the evaluation group. Required. + :vartype eval_id: str + :ivar eval_run: The evaluation run payload. Required. + :vartype eval_run: dict[str, Any] + """ + + configuration: dict[str, str] + """Configuration for the task.""" + type: Required[Literal[ScheduleTaskType.EVALUATION]] + """Required. Evaluation task.""" + evalId: Required[str] + """Identifier of the evaluation group. Required.""" + evalRun: Required[dict[str, Any]] + """The evaluation run payload. Required.""" + + +class EvaluationTaxonomy(TypedDict, total=False): + """Evaluation Taxonomy Definition. + + :ivar id: Asset ID, a unique identifier for the asset. + :vartype id: str + :ivar name: The name of the resource. Required. + :vartype name: str + :ivar version: The version of the resource. Required. + :vartype version: str + :ivar description: The asset description text. + :vartype description: str + :ivar tags: Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar taxonomy_input: Input configuration for the evaluation taxonomy. Required. + :vartype taxonomy_input: "EvaluationTaxonomyInput" + :ivar taxonomy_categories: List of taxonomy categories. + :vartype taxonomy_categories: list["TaxonomyCategory"] + :ivar properties: Additional properties for the evaluation taxonomy. + :vartype properties: dict[str, str] + """ + + id: str + """Asset ID, a unique identifier for the asset.""" + name: Required[str] + """The name of the resource. Required.""" + version: Required[str] + """The version of the resource. Required.""" + description: str + """The asset description text.""" + tags: dict[str, str] + """Tag dictionary. Tags can be added, removed, and updated.""" + taxonomyInput: Required["EvaluationTaxonomyInput"] + """Input configuration for the evaluation taxonomy. Required.""" + taxonomyCategories: list["TaxonomyCategory"] + """List of taxonomy categories.""" + properties: dict[str, str] + """Additional properties for the evaluation taxonomy.""" + + +class EvaluatorCredentialRequest(TypedDict, total=False): + """Request body for getting evaluator credentials. + + :ivar blob_uri: The blob URI for the evaluator storage. Example: + ``https://account.blob.core.windows.net:443/container``. Required. + :vartype blob_uri: str + """ + + blob_uri: Required[str] + """The blob URI for the evaluator storage. Example: + ``https://account.blob.core.windows.net:443/container``. Required.""" + + +class EvaluatorGenerationArtifacts(TypedDict, total=False): + """Service-managed provenance artifacts produced by an evaluator generation job. Present only on + EvaluatorVersion resources created via the generation pipeline. The combined-JSONL Foundry + Dataset is read-only and resolves to a versioned dataset in a service-reserved namespace. + + :ivar dataset: Reference to the single Foundry Dataset (one combined JSONL file, + version-aligned to ``EvaluatorVersion.version``) holding all artifacts produced by the + generation pipeline. Each row in the JSONL carries a ``kind`` field discriminating its content + (e.g. ``spec``, ``tools``, ``context``). Required. + :vartype dataset: "DatasetReference" + :ivar kinds: The kinds of rows present in ``dataset``. Always contains ``"spec"`` (the + generated evaluation specification, a Markdown document describing what the evaluator + measures). May additionally contain ``"tools"`` (when the generation pipeline produced or + inferred OpenAI tool schemas) and/or ``"context"`` (when supplementary materials such as file + uploads or trace samples were used during generation). Required. + :vartype kinds: list[str] + """ + + dataset: Required["DatasetReference"] + """Reference to the single Foundry Dataset (one combined JSONL file, version-aligned to + ``EvaluatorVersion.version``) holding all artifacts produced by the generation pipeline. Each + row in the JSONL carries a ``kind`` field discriminating its content (e.g. ``spec``, ``tools``, + ``context``). Required.""" + kinds: Required[list[str]] + """The kinds of rows present in ``dataset``. Always contains ``\"spec\"`` (the generated + evaluation specification, a Markdown document describing what the evaluator measures). May + additionally contain ``\"tools\"`` (when the generation pipeline produced or inferred OpenAI + tool schemas) and/or ``\"context\"`` (when supplementary materials such as file uploads or + trace samples were used during generation). Required.""" + + +class EvaluatorGenerationInputs(TypedDict, total=False): + """Caller-supplied inputs for an evaluator generation job. + + :ivar sources: Source materials for generation — agent descriptions, prompts, traces, or + datasets. Each entry is an ``EvaluatorGenerationJobSource`` variant discriminated by ``type``. + Required. + :vartype sources: list["EvaluatorGenerationJobSource"] + :ivar model: The LLM model to use for rubric generation (e.g., 'gpt-4o'). Required — users must + provide their own model rather than relying on service-owned capacity. Required. + :vartype model: str + :ivar evaluator_name: The evaluator name (immutable identifier). 1-256 characters; allowed + characters are ASCII letters, digits, underscore (``_``), period (``.``), tilde (``~``), and + hyphen (``-``). The prefix ``builtin.`` is reserved for system-managed evaluators and is + rejected by the service. If an evaluator with this name already exists in the project (and is + rubric-subtype), the service creates a new version under the same name and uses the prior + version's ``dimensions`` as context for incremental improvement (foundation of the post-//build + adaptive loop). Old versions remain queryable via ``get_version(name, version)``. If the + existing evaluator is not a rubric-subtype evaluator (built-in, prompt-based, code-based), the + request is rejected with ``400 Bad Request``. Required. + :vartype evaluator_name: str + :ivar evaluator_display_name: Optional human-friendly display name for the resulting evaluator. + Surfaced as ``EvaluatorVersion.display_name`` on the persisted evaluator. When omitted, the + service uses ``evaluator_name`` as the display name. The ``evaluator_`` prefix disambiguates + this from the immutable ``evaluator_name`` identifier. + :vartype evaluator_display_name: str + :ivar evaluator_description: Optional human-friendly description for the resulting evaluator. + Surfaced as ``EvaluatorVersion.description`` on the persisted evaluator. Typically collected + from the UI alongside ``evaluator_display_name``. The ``evaluator_`` prefix disambiguates this + from any other description fields on related models. + :vartype evaluator_description: str + """ + + sources: Required[list["EvaluatorGenerationJobSource"]] + """Source materials for generation — agent descriptions, prompts, traces, or datasets. Each entry + is an ``EvaluatorGenerationJobSource`` variant discriminated by ``type``. Required.""" + model: Required[str] + """The LLM model to use for rubric generation (e.g., 'gpt-4o'). Required — users must provide + their own model rather than relying on service-owned capacity. Required.""" + evaluator_name: Required[str] + """The evaluator name (immutable identifier). 1-256 characters; allowed characters are ASCII + letters, digits, underscore (``_``), period (``.``), tilde (``~``), and hyphen (``-``). The + prefix ``builtin.`` is reserved for system-managed evaluators and is rejected by the service. + If an evaluator with this name already exists in the project (and is rubric-subtype), the + service creates a new version under the same name and uses the prior version's ``dimensions`` + as context for incremental improvement (foundation of the post-//build adaptive loop). Old + versions remain queryable via ``get_version(name, version)``. If the existing evaluator is not + a rubric-subtype evaluator (built-in, prompt-based, code-based), the request is rejected with + ``400 Bad Request``. Required.""" + evaluator_display_name: str + """Optional human-friendly display name for the resulting evaluator. Surfaced as + ``EvaluatorVersion.display_name`` on the persisted evaluator. When omitted, the service uses + ``evaluator_name`` as the display name. The ``evaluator_`` prefix disambiguates this from the + immutable ``evaluator_name`` identifier.""" + evaluator_description: str + """Optional human-friendly description for the resulting evaluator. Surfaced as + ``EvaluatorVersion.description`` on the persisted evaluator. Typically collected from the UI + alongside ``evaluator_display_name``. The ``evaluator_`` prefix disambiguates this from any + other description fields on related models.""" + + +class EvaluatorGenerationJob(TypedDict, total=False): + """Evaluator Generation Job resource — a long-running job that generates rubric-based evaluator + definitions from source materials. On success, the result is the persisted EvaluatorVersion. + + :ivar id: Server-assigned unique identifier. Required. + :vartype id: str + :ivar inputs: Caller-supplied inputs. + :vartype inputs: "EvaluatorGenerationInputs" + :ivar result: Result produced on success. + :vartype result: "EvaluatorVersion" + :ivar status: Current lifecycle status. Required. Known values are: "queued", "in_progress", + "succeeded", "failed", and "cancelled". + :vartype status: Union[str, "JobStatus"] + :ivar error: Error details — populated only on failure. + :vartype error: "ApiError" + :ivar created_at: The timestamp when the job was created, represented in Unix time (seconds + since January 1, 1970). Required. + :vartype created_at: int + :ivar finished_at: The timestamp when the job finished, represented in Unix time (seconds since + January 1, 1970). + :vartype finished_at: int + :ivar usage: Token consumption summary. Populated when the job reaches a terminal state. + :vartype usage: "EvaluatorGenerationTokenUsage" + """ + + id: Required[str] + """Server-assigned unique identifier. Required.""" + inputs: "EvaluatorGenerationInputs" + """Caller-supplied inputs.""" + result: "EvaluatorVersion" + """Result produced on success.""" + status: Required[Union[str, "JobStatus"]] + """Current lifecycle status. Required. Known values are: \"queued\", \"in_progress\", + \"succeeded\", \"failed\", and \"cancelled\".""" + error: "ApiError" + """Error details — populated only on failure.""" + created_at: Required[int] + """The timestamp when the job was created, represented in Unix time (seconds since January 1, + 1970). Required.""" + finished_at: int + """The timestamp when the job finished, represented in Unix time (seconds since January 1, 1970).""" + usage: "EvaluatorGenerationTokenUsage" + """Token consumption summary. Populated when the job reaches a terminal state.""" + + +class EvaluatorGenerationTokenUsage(TypedDict, total=False): + """Token consumption summary for an evaluator generation job. Populated when the job reaches a + terminal state. + + :ivar input_tokens: Number of input (prompt) tokens consumed. Required. + :vartype input_tokens: int + :ivar output_tokens: Number of output (completion) tokens generated. Required. + :vartype output_tokens: int + :ivar total_tokens: Total tokens consumed (input + output). Required. + :vartype total_tokens: int + """ + + input_tokens: Required[int] + """Number of input (prompt) tokens consumed. Required.""" + output_tokens: Required[int] + """Number of output (completion) tokens generated. Required.""" + total_tokens: Required[int] + """Total tokens consumed (input + output). Required.""" + + +class EvaluatorMetric(TypedDict, total=False): + """Evaluator Metric. + + :ivar type: Type of the metric. Known values are: "ordinal", "continuous", and "boolean". + :vartype type: Union[str, "EvaluatorMetricType"] + :ivar desirable_direction: It indicates whether a higher value is better or a lower value is + better for this metric. Known values are: "increase", "decrease", and "neutral". + :vartype desirable_direction: Union[str, "EvaluatorMetricDirection"] + :ivar min_value: Minimum value for the metric. + :vartype min_value: float + :ivar max_value: Maximum value for the metric. If not specified, it is assumed to be unbounded. + :vartype max_value: float + :ivar threshold: Default pass/fail threshold for this metric. + :vartype threshold: float + :ivar is_primary: Indicates if this metric is primary when there are multiple metrics. + :vartype is_primary: bool + """ + + type: Union[str, "EvaluatorMetricType"] + """Type of the metric. Known values are: \"ordinal\", \"continuous\", and \"boolean\".""" + desirable_direction: Union[str, "EvaluatorMetricDirection"] + """It indicates whether a higher value is better or a lower value is better for this metric. Known + values are: \"increase\", \"decrease\", and \"neutral\".""" + min_value: float + """Minimum value for the metric.""" + max_value: float + """Maximum value for the metric. If not specified, it is assumed to be unbounded.""" + threshold: float + """Default pass/fail threshold for this metric.""" + is_primary: bool + """Indicates if this metric is primary when there are multiple metrics.""" + + +class EvaluatorVersion(TypedDict, total=False): + """Evaluator Definition. + + :ivar display_name: Display Name for evaluator. It helps to find the evaluator easily in AI + Foundry. It does not need to be unique. + :vartype display_name: str + :ivar metadata: Metadata about the evaluator. + :vartype metadata: dict[str, str] + :ivar evaluator_type: The type of the evaluator. Required. Known values are: "builtin" and + "custom". + :vartype evaluator_type: Union[str, "EvaluatorType"] + :ivar categories: The categories of the evaluator. Required. + :vartype categories: list[Union[str, "EvaluatorCategory"]] + :ivar supported_evaluation_levels: Evaluation levels this evaluator supports (e.g., ``turn``, + ``conversation``). When omitted on create, the service defaults to ``["turn"]``. On update, + omitting this field leaves it unchanged; an empty list is rejected. Custom code-based + evaluators support only ``turn``; custom prompt-based evaluators support exactly one level + (``turn`` or ``conversation``). + :vartype supported_evaluation_levels: list[Union[str, "EvaluationLevel"]] + :ivar definition: Definition of the evaluator. Required. + :vartype definition: "EvaluatorDefinition" + :ivar generation_artifacts: Provenance artifacts from the generation pipeline. Read-only; + present only on evaluator versions created via an EvaluatorGenerationJob. Each artifact + resolves to a versioned Foundry Dataset. + :vartype generation_artifacts: "EvaluatorGenerationArtifacts" + :ivar created_by: Creator of the evaluator. Required. + :vartype created_by: str + :ivar created_at: Creation date/time of the evaluator. Required. + :vartype created_at: str + :ivar modified_at: Last modified date/time of the evaluator. Required. + :vartype modified_at: str + :ivar id: Asset ID, a unique identifier for the asset. + :vartype id: str + :ivar name: The name of the resource. Required. + :vartype name: str + :ivar version: The version of the resource. Required. + :vartype version: str + :ivar description: The asset description text. + :vartype description: str + :ivar tags: Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + """ + + display_name: str + """Display Name for evaluator. It helps to find the evaluator easily in AI Foundry. It does not + need to be unique.""" + metadata: dict[str, str] + """Metadata about the evaluator.""" + evaluator_type: Required[Union[str, "EvaluatorType"]] + """The type of the evaluator. Required. Known values are: \"builtin\" and \"custom\".""" + categories: Required[list[Union[str, "EvaluatorCategory"]]] + """The categories of the evaluator. Required.""" + supported_evaluation_levels: list[Union[str, "EvaluationLevel"]] + """Evaluation levels this evaluator supports (e.g., ``turn``, ``conversation``). When omitted on + create, the service defaults to ``[\"turn\"]``. On update, omitting this field leaves it + unchanged; an empty list is rejected. Custom code-based evaluators support only ``turn``; + custom prompt-based evaluators support exactly one level (``turn`` or ``conversation``).""" + definition: Required["EvaluatorDefinition"] + """Definition of the evaluator. Required.""" + generation_artifacts: "EvaluatorGenerationArtifacts" + """Provenance artifacts from the generation pipeline. Read-only; present only on evaluator + versions created via an EvaluatorGenerationJob. Each artifact resolves to a versioned Foundry + Dataset.""" + created_by: Required[str] + """Creator of the evaluator. Required.""" + created_at: Required[str] + """Creation date/time of the evaluator. Required.""" + modified_at: Required[str] + """Last modified date/time of the evaluator. Required.""" + id: str + """Asset ID, a unique identifier for the asset.""" + name: Required[str] + """The name of the resource. Required.""" + version: Required[str] + """The version of the resource. Required.""" + description: str + """The asset description text.""" + tags: dict[str, str] + """Tag dictionary. Tags can be added, removed, and updated.""" + + +class ExternalAgentDefinition(TypedDict, total=False): + """The external agent definition. Represents a third-party agent hosted outside Foundry (for + example, on GCP or AWS). Registration is metadata-only: Foundry records the agent definition to + light up observability experiences (traces, evaluations) over customer-emitted OpenTelemetry + data. + + :ivar rai_config: Configuration for Responsible AI (RAI) content filtering and safety features. + :vartype rai_config: "RaiConfig" + :ivar kind: Required. EXTERNAL. + :vartype kind: Literal[AgentKind.EXTERNAL] + :ivar otel_agent_id: The OpenTelemetry agent identifier used to attribute customer-emitted + spans to this Foundry agent. Spans must include the attribute ``gen_ai.agent.id = + `` to appear under this registration. Defaults to the top-level agent name when + omitted. Provide an explicit value only for migration scenarios where the running external + agent already emits a stable id that differs from the Foundry agent name. The resolved value is + always echoed on read. + :vartype otel_agent_id: str + """ + + rai_config: "RaiConfig" + """Configuration for Responsible AI (RAI) content filtering and safety features.""" + kind: Required[Literal[AgentKind.EXTERNAL]] + """Required. EXTERNAL.""" + otel_agent_id: str + """The OpenTelemetry agent identifier used to attribute customer-emitted spans to this Foundry + agent. Spans must include the attribute ``gen_ai.agent.id = `` to appear under + this registration. Defaults to the top-level agent name when omitted. Provide an explicit value + only for migration scenarios where the running external agent already emits a stable id that + differs from the Foundry agent name. The resolved value is always echoed on read.""" + + +class FabricDataAgentToolParameters(TypedDict, total=False): + """The fabric data agent tool parameters. + + :ivar project_connections: The project connections attached to this tool. There can be a + maximum of 1 connection resource attached to the tool. + :vartype project_connections: list["ToolProjectConnection"] + """ + + project_connections: list["ToolProjectConnection"] + """The project connections attached to this tool. There can be a maximum of 1 connection resource + attached to the tool.""" + + +class FabricIQPreviewTool(TypedDict, total=False): + """A FabricIQ server-side tool. + + :ivar type: The object type, which is always 'fabric_iq_preview'. Required. FABRIC_IQ_PREVIEW. + :vartype type: Literal[ToolType.FABRIC_IQ_PREVIEW] + :ivar project_connection_id: The ID of the FabricIQ project connection. Required. + :vartype project_connection_id: str + :ivar server_label: (Optional) The label of the FabricIQ MCP server to connect to. + :vartype server_label: str + :ivar server_url: (Optional) The URL of the FabricIQ MCP server. If not provided, the URL from + the project connection will be used. + :vartype server_url: str + :ivar require_approval: (Optional) Whether the agent requires approval before executing + actions. Default is always. Is either a MCPToolRequireApproval type or a str type. + :vartype require_approval: Union["MCPToolRequireApproval", str] + """ + + type: Required[Literal[ToolType.FABRIC_IQ_PREVIEW]] + """The object type, which is always 'fabric_iq_preview'. Required. FABRIC_IQ_PREVIEW.""" + project_connection_id: Required[str] + """The ID of the FabricIQ project connection. Required.""" + server_label: str + """(Optional) The label of the FabricIQ MCP server to connect to.""" + server_url: str + """(Optional) The URL of the FabricIQ MCP server. If not provided, the URL from the project + connection will be used.""" + require_approval: Optional[Union["MCPToolRequireApproval", str]] + """(Optional) Whether the agent requires approval before executing actions. Default is always. Is + either a MCPToolRequireApproval type or a str type.""" + + +class FabricIQPreviewToolboxTool(TypedDict, total=False): + """A FabricIQ tool stored in a toolbox. + + :ivar name: Optional user-defined name for this tool or configuration. + :vartype name: str + :ivar description: Optional user-defined description for this tool or configuration. + :vartype description: str + :ivar tool_configs: Per-tool configuration map. Keys are tool names or ``*`` (catch-all + default). Resolution order: exact tool name match takes priority over ``*``. Unknown tool names + are silently ignored at runtime. + :vartype tool_configs: dict[str, "ToolConfig"] + :ivar type: Required. FABRIC_IQ_PREVIEW. + :vartype type: Literal[ToolboxToolType.FABRIC_IQ_PREVIEW] + :ivar project_connection_id: The ID of the FabricIQ project connection. Required. + :vartype project_connection_id: str + :ivar server_label: (Optional) The label of the FabricIQ MCP server to connect to. + :vartype server_label: str + :ivar server_url: (Optional) The URL of the FabricIQ MCP server. If not provided, the URL from + the project connection will be used. + :vartype server_url: str + :ivar require_approval: (Optional) Whether the agent requires approval before executing + actions. Default is always. Is either a MCPToolRequireApproval type or a str type. + :vartype require_approval: Union["MCPToolRequireApproval", str] + """ + + name: str + """Optional user-defined name for this tool or configuration.""" + description: str + """Optional user-defined description for this tool or configuration.""" + tool_configs: dict[str, "ToolConfig"] + """Per-tool configuration map. Keys are tool names or ``*`` (catch-all default). Resolution order: + exact tool name match takes priority over ``*``. Unknown tool names are silently ignored at + runtime.""" + type: Required[Literal[ToolboxToolType.FABRIC_IQ_PREVIEW]] + """Required. FABRIC_IQ_PREVIEW.""" + project_connection_id: Required[str] + """The ID of the FabricIQ project connection. Required.""" + server_label: str + """(Optional) The label of the FabricIQ MCP server to connect to.""" + server_url: str + """(Optional) The URL of the FabricIQ MCP server. If not provided, the URL from the project + connection will be used.""" + require_approval: Optional[Union["MCPToolRequireApproval", str]] + """(Optional) Whether the agent requires approval before executing actions. Default is always. Is + either a MCPToolRequireApproval type or a str type.""" + + +class FieldMapping(TypedDict, total=False): + """Field mapping configuration class. + + :ivar content_fields: List of fields with text content. Required. + :vartype content_fields: list[str] + :ivar filepath_field: Path of file to be used as a source of text content. + :vartype filepath_field: str + :ivar title_field: Field containing the title of the document. + :vartype title_field: str + :ivar url_field: Field containing the url of the document. + :vartype url_field: str + :ivar vector_fields: List of fields with vector content. + :vartype vector_fields: list[str] + :ivar metadata_fields: List of fields with metadata content. + :vartype metadata_fields: list[str] + """ + + contentFields: Required[list[str]] + """List of fields with text content. Required.""" + filepathField: str + """Path of file to be used as a source of text content.""" + titleField: str + """Field containing the title of the document.""" + urlField: str + """Field containing the url of the document.""" + vectorFields: list[str] + """List of fields with vector content.""" + metadataFields: list[str] + """List of fields with metadata content.""" + + +class FileDataGenerationJobOutput(TypedDict, total=False): + """Azure OpenAI file output for a data generation job. + + :ivar type: Azure OpenAI file output. Required. The generated data is an Azure OpenAI File. + :vartype type: Literal[DataGenerationJobOutputType.FILE] + :ivar id: The id of the output Azure OpenAI file. Required. + :vartype id: str + :ivar filename: The filename of the output Azure OpenAI file. Required. + :vartype filename: str + """ + + type: Required[Literal[DataGenerationJobOutputType.FILE]] + """Azure OpenAI file output. Required. The generated data is an Azure OpenAI File.""" + id: Required[str] + """The id of the output Azure OpenAI file. Required.""" + filename: Required[str] + """The filename of the output Azure OpenAI file. Required.""" + + +class FileDataGenerationJobSource(TypedDict, total=False): + """File source for data generation jobs — Azure OpenAI file input. + + :ivar description: Optional description of what this source represents — helps the pipeline + interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core + capabilities'). + :vartype description: str + :ivar type: The source type for this job, which is File. Required. File source — Azure OpenAI + file. + :vartype type: Literal[DataGenerationJobSourceType.FILE] + :ivar id: Input Azure Open AI file id used for data generation. Required. + :vartype id: str + """ + + description: str + """Optional description of what this source represents — helps the pipeline interpret its content + (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities').""" + type: Required[Literal[DataGenerationJobSourceType.FILE]] + """The source type for this job, which is File. Required. File source — Azure OpenAI file.""" + id: Required[str] + """Input Azure Open AI file id used for data generation. Required.""" + + +class FileDatasetVersion(TypedDict, total=False): + """FileDatasetVersion Definition. + + :ivar data_uri: URI of the data (`example `_). + Required. + :vartype data_uri: str + :ivar is_reference: Indicates if the dataset holds a reference to the storage, or the dataset + manages storage itself. If true, the underlying data will not be deleted when the dataset + version is deleted. + :vartype is_reference: bool + :ivar connection_name: The Azure Storage Account connection name. Required if + startPendingUploadVersion was not called before creating the Dataset. + :vartype connection_name: str + :ivar id: Asset ID, a unique identifier for the asset. + :vartype id: str + :ivar name: The name of the resource. Required. + :vartype name: str + :ivar version: The version of the resource. Required. + :vartype version: str + :ivar description: The asset description text. + :vartype description: str + :ivar tags: Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar type: Dataset type. Required. URI file. + :vartype type: Literal[DatasetType.URI_FILE] + """ + + dataUri: Required[str] + """URI of the data (`example `_). Required.""" + isReference: bool + """Indicates if the dataset holds a reference to the storage, or the dataset manages storage + itself. If true, the underlying data will not be deleted when the dataset version is deleted.""" + connectionName: str + """The Azure Storage Account connection name. Required if startPendingUploadVersion was not called + before creating the Dataset.""" + id: str + """Asset ID, a unique identifier for the asset.""" + name: Required[str] + """The name of the resource. Required.""" + version: Required[str] + """The version of the resource. Required.""" + description: str + """The asset description text.""" + tags: dict[str, str] + """Tag dictionary. Tags can be added, removed, and updated.""" + type: Required[Literal[DatasetType.URI_FILE]] + """Dataset type. Required. URI file.""" + + +class FileSearchTool(TypedDict, total=False): + """File search. + + :ivar type: The type of the file search tool. Always ``file_search``. Required. FILE_SEARCH. + :vartype type: Literal[ToolType.FILE_SEARCH] + :ivar vector_store_ids: The IDs of the vector stores to search. Required. + :vartype vector_store_ids: list[str] + :ivar max_num_results: The maximum number of results to return. This number should be between 1 + and 50 inclusive. + :vartype max_num_results: int + :ivar ranking_options: Ranking options for search. + :vartype ranking_options: "RankingOptions" + :ivar filters: Is either a ComparisonFilter type or a CompoundFilter type. + :vartype filters: "_unions.Filters" + :ivar name: Deprecated. This property is deprecated and will be removed in a future version. + :vartype name: str + :ivar description: Deprecated. This property is deprecated and will be removed in a future + version. + :vartype description: str + :ivar tool_configs: Deprecated. This property is deprecated and will be removed in a future + version. + :vartype tool_configs: dict[str, "ToolConfig"] + """ + + type: Required[Literal[ToolType.FILE_SEARCH]] + """The type of the file search tool. Always ``file_search``. Required. FILE_SEARCH.""" + vector_store_ids: Required[list[str]] + """The IDs of the vector stores to search. Required.""" + max_num_results: int + """The maximum number of results to return. This number should be between 1 and 50 inclusive.""" + ranking_options: "RankingOptions" + """Ranking options for search.""" + filters: Optional["_unions.Filters"] + """Is either a ComparisonFilter type or a CompoundFilter type.""" + name: str + """Deprecated. This property is deprecated and will be removed in a future version.""" + description: str + """Deprecated. This property is deprecated and will be removed in a future version.""" + tool_configs: dict[str, "ToolConfig"] + """Deprecated. This property is deprecated and will be removed in a future version.""" + + +class FileSearchToolboxTool(TypedDict, total=False): + """A file search tool stored in a toolbox. + + :ivar name: Optional user-defined name for this tool or configuration. + :vartype name: str + :ivar description: Optional user-defined description for this tool or configuration. + :vartype description: str + :ivar tool_configs: Per-tool configuration map. Keys are tool names or ``*`` (catch-all + default). Resolution order: exact tool name match takes priority over ``*``. Unknown tool names + are silently ignored at runtime. + :vartype tool_configs: dict[str, "ToolConfig"] + :ivar type: Required. FILE_SEARCH. + :vartype type: Literal[ToolboxToolType.FILE_SEARCH] + :ivar max_num_results: The maximum number of results to return. This number should be between 1 + and 50 inclusive. + :vartype max_num_results: int + :ivar ranking_options: Ranking options for search. + :vartype ranking_options: "RankingOptions" + :ivar filters: Is either a ComparisonFilter type or a CompoundFilter type. + :vartype filters: "_unions.Filters" + :ivar vector_store_ids: The IDs of the vector stores to search. + :vartype vector_store_ids: list[str] + """ + + name: str + """Optional user-defined name for this tool or configuration.""" + description: str + """Optional user-defined description for this tool or configuration.""" + tool_configs: dict[str, "ToolConfig"] + """Per-tool configuration map. Keys are tool names or ``*`` (catch-all default). Resolution order: + exact tool name match takes priority over ``*``. Unknown tool names are silently ignored at + runtime.""" + type: Required[Literal[ToolboxToolType.FILE_SEARCH]] + """Required. FILE_SEARCH.""" + max_num_results: int + """The maximum number of results to return. This number should be between 1 and 50 inclusive.""" + ranking_options: "RankingOptions" + """Ranking options for search.""" + filters: Optional["_unions.Filters"] + """Is either a ComparisonFilter type or a CompoundFilter type.""" + vector_store_ids: list[str] + """The IDs of the vector stores to search.""" + + +class FixedRatioVersionSelectionRule(TypedDict, total=False): + """FixedRatioVersionSelectionRule. + + :ivar agent_version: The agent version to route traffic to. Required. + :vartype agent_version: str + :ivar type: Required. FIXED_RATIO. + :vartype type: Literal[VersionSelectorType.FIXED_RATIO] + :ivar traffic_percentage: The percentage of traffic to route to the version. Must be between 0 + and 100. Required. + :vartype traffic_percentage: int + """ + + agent_version: Required[str] + """The agent version to route traffic to. Required.""" + type: Required[Literal[VersionSelectorType.FIXED_RATIO]] + """Required. FIXED_RATIO.""" + traffic_percentage: Required[int] + """The percentage of traffic to route to the version. Must be between 0 and 100. Required.""" + + +class FolderDatasetVersion(TypedDict, total=False): + """FileDatasetVersion Definition. + + :ivar data_uri: URI of the data (`example `_). + Required. + :vartype data_uri: str + :ivar is_reference: Indicates if the dataset holds a reference to the storage, or the dataset + manages storage itself. If true, the underlying data will not be deleted when the dataset + version is deleted. + :vartype is_reference: bool + :ivar connection_name: The Azure Storage Account connection name. Required if + startPendingUploadVersion was not called before creating the Dataset. + :vartype connection_name: str + :ivar id: Asset ID, a unique identifier for the asset. + :vartype id: str + :ivar name: The name of the resource. Required. + :vartype name: str + :ivar version: The version of the resource. Required. + :vartype version: str + :ivar description: The asset description text. + :vartype description: str + :ivar tags: Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar type: Dataset type. Required. URI folder. + :vartype type: Literal[DatasetType.URI_FOLDER] + """ + + dataUri: Required[str] + """URI of the data (`example `_). Required.""" + isReference: bool + """Indicates if the dataset holds a reference to the storage, or the dataset manages storage + itself. If true, the underlying data will not be deleted when the dataset version is deleted.""" + connectionName: str + """The Azure Storage Account connection name. Required if startPendingUploadVersion was not called + before creating the Dataset.""" + id: str + """Asset ID, a unique identifier for the asset.""" + name: Required[str] + """The name of the resource. Required.""" + version: Required[str] + """The version of the resource. Required.""" + description: str + """The asset description text.""" + tags: dict[str, str] + """Tag dictionary. Tags can be added, removed, and updated.""" + type: Required[Literal[DatasetType.URI_FOLDER]] + """Dataset type. Required. URI folder.""" + + +class FoundryModelWarning(TypedDict, total=False): + """A warning associated with a model. + + :ivar code: The warning code. Known values are: "RuntimeDependentArtifact" and + "UnclassifiedArtifact". + :vartype code: Union[str, "FoundryModelWarningCode"] + :ivar message: The warning message. + :vartype message: str + """ + + code: Union[str, "FoundryModelWarningCode"] + """The warning code. Known values are: \"RuntimeDependentArtifact\" and \"UnclassifiedArtifact\".""" + message: str + """The warning message.""" + + +class FunctionShellToolParam(TypedDict, total=False): + """Shell tool. + + :ivar type: The type of the shell tool. Always ``shell``. Required. SHELL. + :vartype type: Literal[ToolType.SHELL] + :ivar environment: + :vartype environment: "FunctionShellToolParamEnvironment" + :ivar name: Deprecated. This property is deprecated and will be removed in a future version. + :vartype name: str + :ivar description: Deprecated. This property is deprecated and will be removed in a future + version. + :vartype description: str + :ivar tool_configs: Deprecated. This property is deprecated and will be removed in a future + version. + :vartype tool_configs: dict[str, "ToolConfig"] + """ + + type: Required[Literal[ToolType.SHELL]] + """The type of the shell tool. Always ``shell``. Required. SHELL.""" + environment: Optional["FunctionShellToolParamEnvironment"] + name: str + """Deprecated. This property is deprecated and will be removed in a future version.""" + description: str + """Deprecated. This property is deprecated and will be removed in a future version.""" + tool_configs: dict[str, "ToolConfig"] + """Deprecated. This property is deprecated and will be removed in a future version.""" + + +class FunctionShellToolParamEnvironmentContainerReferenceParam(TypedDict, total=False): # pylint: disable=name-too-long + """FunctionShellToolParamEnvironmentContainerReferenceParam. + + :ivar type: References a container created with the /v1/containers endpoint. Required. + CONTAINER_REFERENCE. + :vartype type: Literal[FunctionShellToolParamEnvironmentType.CONTAINER_REFERENCE] + :ivar container_id: The ID of the referenced container. Required. + :vartype container_id: str + """ + + type: Required[Literal[FunctionShellToolParamEnvironmentType.CONTAINER_REFERENCE]] + """References a container created with the /v1/containers endpoint. Required. CONTAINER_REFERENCE.""" + container_id: Required[str] + """The ID of the referenced container. Required.""" + + +class FunctionShellToolParamEnvironmentLocalEnvironmentParam(TypedDict, total=False): # pylint: disable=name-too-long + """FunctionShellToolParamEnvironmentLocalEnvironmentParam. + + :ivar type: Use a local computer environment. Required. LOCAL. + :vartype type: Literal[FunctionShellToolParamEnvironmentType.LOCAL] + :ivar skills: An optional list of skills. + :vartype skills: list["LocalSkillParam"] + """ + + type: Required[Literal[FunctionShellToolParamEnvironmentType.LOCAL]] + """Use a local computer environment. Required. LOCAL.""" + skills: list["LocalSkillParam"] + """An optional list of skills.""" + + +class FunctionTool(TypedDict, total=False): + """Function. + + :ivar type: The type of the function tool. Always ``function``. Required. FUNCTION. + :vartype type: Literal[ToolType.FUNCTION] + :ivar name: The name of the function to call. Required. + :vartype name: str + :ivar description: + :vartype description: str + :ivar parameters: Required. + :vartype parameters: dict[str, Any] + :ivar strict: Required. + :vartype strict: bool + :ivar defer_loading: Whether this function is deferred and loaded via tool search. + :vartype defer_loading: bool + """ + + type: Required[Literal[ToolType.FUNCTION]] + """The type of the function tool. Always ``function``. Required. FUNCTION.""" + name: Required[str] + """The name of the function to call. Required.""" + description: Optional[str] + parameters: Required[Optional[dict[str, Any]]] + """Required.""" + strict: Required[Optional[bool]] + """Required.""" + defer_loading: bool + """Whether this function is deferred and loaded via tool search.""" + + +class FunctionToolParam(TypedDict, total=False): + """FunctionToolParam. + + :ivar name: Required. + :vartype name: str + :ivar description: + :vartype description: str + :ivar parameters: + :vartype parameters: "EmptyModelParam" + :ivar strict: + :vartype strict: bool + :ivar type: Required. Default value is "function". + :vartype type: Literal["function"] + :ivar defer_loading: Whether this function should be deferred and discovered via tool search. + :vartype defer_loading: bool + """ + + name: Required[str] + """Required.""" + description: Optional[str] + parameters: Optional["EmptyModelParam"] + strict: Optional[bool] + type: Required[Literal["function"]] + """Required. Default value is \"function\".""" + defer_loading: bool + """Whether this function should be deferred and discovered via tool search.""" + + +class GitHubIssueRoutineTrigger(TypedDict, total=False): + """A GitHub issue routine trigger. + + :ivar type: The trigger type. Required. A GitHub issue trigger. + :vartype type: Literal[RoutineTriggerType.GITHUB_ISSUE] + :ivar connection_id: The workspace connection identifier that resolves the GitHub configuration + for the trigger. Required. + :vartype connection_id: str + :ivar owner: The GitHub owner or organization that scopes which issues can fire the trigger. + Required. + :vartype owner: str + :ivar repository: The GitHub repository filter that scopes which issues can fire the trigger. + Required. + :vartype repository: str + :ivar issue_event: The GitHub issue event that fires the routine. Required. Known values are: + "opened" and "closed". + :vartype issue_event: Union[str, "GitHubIssueEvent"] + """ + + type: Required[Literal[RoutineTriggerType.GITHUB_ISSUE]] + """The trigger type. Required. A GitHub issue trigger.""" + connection_id: Required[str] + """The workspace connection identifier that resolves the GitHub configuration for the trigger. + Required.""" + owner: Required[str] + """The GitHub owner or organization that scopes which issues can fire the trigger. Required.""" + repository: Required[str] + """The GitHub repository filter that scopes which issues can fire the trigger. Required.""" + issue_event: Required[Union[str, "GitHubIssueEvent"]] + """The GitHub issue event that fires the routine. Required. Known values are: \"opened\" and + \"closed\".""" + + +class HeaderTelemetryEndpointAuth(TypedDict, total=False): + """Header-based secret authentication for a telemetry endpoint. The resolved secret value is + injected as an HTTP header. + + :ivar type: The authentication type, always 'header' for header-based secret authentication. + Required. Header-based secret authentication. + :vartype type: Literal[TelemetryEndpointAuthType.HEADER] + :ivar header_name: The name of the HTTP header to inject the secret value into. Required. + :vartype header_name: str + :ivar secret_id: The identifier of the secret store or connection. Required. + :vartype secret_id: str + :ivar secret_key: The key within the secret to retrieve the authentication value. Required. + :vartype secret_key: str + """ + + type: Required[Literal[TelemetryEndpointAuthType.HEADER]] + """The authentication type, always 'header' for header-based secret authentication. Required. + Header-based secret authentication.""" + header_name: Required[str] + """The name of the HTTP header to inject the secret value into. Required.""" + secret_id: Required[str] + """The identifier of the secret store or connection. Required.""" + secret_key: Required[str] + """The key within the secret to retrieve the authentication value. Required.""" + + +class HostedAgentDefinition(TypedDict, total=False): + """The hosted agent definition. + + :ivar rai_config: Configuration for Responsible AI (RAI) content filtering and safety features. + :vartype rai_config: "RaiConfig" + :ivar kind: Required. HOSTED. + :vartype kind: Literal[AgentKind.HOSTED] + :ivar cpu: The CPU configuration for the hosted agent. Required. + :vartype cpu: str + :ivar memory: The memory configuration for the hosted agent. Required. + :vartype memory: str + :ivar environment_variables: Environment variables to set in the hosted agent container. + :vartype environment_variables: dict[str, str] + :ivar container_configuration: Container-based deployment configuration. Provide this for + image-based deployments. Mutually exclusive with code_configuration — the service validates + that exactly one is set. + :vartype container_configuration: "ContainerConfiguration" + :ivar protocol_versions: The protocols that the agent supports for ingress communication. + :vartype protocol_versions: list["ProtocolVersionRecord"] + :ivar code_configuration: Code-based deployment configuration. Provide this for code-based + deployments. Mutually exclusive with container_configuration — the service validates that + exactly one is set. + :vartype code_configuration: "CodeConfiguration" + :ivar telemetry_config: Optional customer-supplied telemetry configuration for exporting + container logs, traces, and metrics. + :vartype telemetry_config: "TelemetryConfig" + """ + + rai_config: "RaiConfig" + """Configuration for Responsible AI (RAI) content filtering and safety features.""" + kind: Required[Literal[AgentKind.HOSTED]] + """Required. HOSTED.""" + cpu: Required[str] + """The CPU configuration for the hosted agent. Required.""" + memory: Required[str] + """The memory configuration for the hosted agent. Required.""" + environment_variables: dict[str, str] + """Environment variables to set in the hosted agent container.""" + container_configuration: "ContainerConfiguration" + """Container-based deployment configuration. Provide this for image-based deployments. Mutually + exclusive with code_configuration — the service validates that exactly one is set.""" + protocol_versions: list["ProtocolVersionRecord"] + """The protocols that the agent supports for ingress communication.""" + code_configuration: "CodeConfiguration" + """Code-based deployment configuration. Provide this for code-based deployments. Mutually + exclusive with container_configuration — the service validates that exactly one is set.""" + telemetry_config: "TelemetryConfig" + """Optional customer-supplied telemetry configuration for exporting container logs, traces, and + metrics.""" + + +class HourlyRecurrenceSchedule(TypedDict, total=False): + """Hourly recurrence schedule. + + :ivar type: Required. Hourly recurrence pattern. + :vartype type: Literal[RecurrenceType.HOURLY] + """ + + type: Required[Literal[RecurrenceType.HOURLY]] + """Required. Hourly recurrence pattern.""" + + +class HumanEvaluationPreviewRuleAction(TypedDict, total=False): + """Evaluation rule action for human evaluation. + + :ivar type: Required. Human evaluation preview. + :vartype type: Literal[EvaluationRuleActionType.HUMAN_EVALUATION_PREVIEW] + :ivar template_id: Human evaluation template Id. Required. + :vartype template_id: str + """ + + type: Required[Literal[EvaluationRuleActionType.HUMAN_EVALUATION_PREVIEW]] + """Required. Human evaluation preview.""" + templateId: Required[str] + """Human evaluation template Id. Required.""" + + +class HybridSearchOptions(TypedDict, total=False): + """HybridSearchOptions. + + :ivar embedding_weight: The weight of the embedding in the reciprocal ranking fusion. Required. + :vartype embedding_weight: float + :ivar text_weight: The weight of the text in the reciprocal ranking fusion. Required. + :vartype text_weight: float + """ + + embedding_weight: Required[float] + """The weight of the embedding in the reciprocal ranking fusion. Required.""" + text_weight: Required[float] + """The weight of the text in the reciprocal ranking fusion. Required.""" + + +class ImageGenTool(TypedDict, total=False): + """Image generation tool. + + :ivar type: The type of the image generation tool. Always ``image_generation``. Required. + IMAGE_GENERATION. + :vartype type: Literal[ToolType.IMAGE_GENERATION] + :ivar model: Is one of the following types: Literal["gpt-image-1"], + Literal["gpt-image-1-mini"], Literal["gpt-image-1.5"], str + :vartype model: Union[Literal["gpt-image-1"], Literal["gpt-image-1-mini"], + Literal["gpt-image-1.5"], str] + :ivar quality: The quality of the generated image. One of ``low``, ``medium``, ``high``, or + ``auto``. Default: ``auto``. Is one of the following types: Literal["low"], Literal["medium"], + Literal["high"], Literal["auto"] + :vartype quality: Literal["low", "medium", "high", "auto"] + :ivar size: The size of the generated images. For ``gpt-image-2`` and + ``gpt-image-2-2026-04-21``, arbitrary resolutions are supported as ``WIDTHxHEIGHT`` strings, + for example ``1536x864``. Width and height must both be divisible by 16 and the requested + aspect ratio must be between 1:3 and 3:1. Resolutions above ``2560x1440`` are experimental, and + the maximum supported resolution is ``3840x2160``. The requested size must also satisfy the + model's current pixel and edge limits. The standard sizes ``1024x1024``, ``1536x1024``, and + ``1024x1536`` are supported by the GPT image models; ``auto`` is supported for models that + allow automatic sizing. For ``dall-e-2``, use one of ``256x256``, ``512x512``, or + ``1024x1024``. For ``dall-e-3``, use one of ``1024x1024``, ``1792x1024``, or ``1024x1792``. Is + one of the following types: Literal["1024x1024"], Literal["1024x1536"], Literal["1536x1024"], + Literal["auto"], str + :vartype size: Union[Literal["1024x1024"], Literal["1024x1536"], Literal["1536x1024"], + Literal["auto"], str] + :ivar output_format: The output format of the generated image. One of ``png``, ``webp``, or + ``jpeg``. Default: ``png``. Is one of the following types: Literal["png"], Literal["webp"], + Literal["jpeg"] + :vartype output_format: Literal["png", "webp", "jpeg"] + :ivar output_compression: Compression level for the output image. Default: 100. + :vartype output_compression: int + :ivar moderation: Moderation level for the generated image. Default: ``auto``. Is either a + Literal["auto"] type or a Literal["low"] type. + :vartype moderation: Literal["auto", "low"] + :ivar background: Background type for the generated image. One of ``transparent``, ``opaque``, + or ``auto``. Default: ``auto``. Is one of the following types: Literal["transparent"], + Literal["opaque"], Literal["auto"] + :vartype background: Literal["transparent", "opaque", "auto"] + :ivar input_fidelity: Known values are: "high" and "low". + :vartype input_fidelity: Union[str, "InputFidelity"] + :ivar input_image_mask: Optional mask for inpainting. Contains ``image_url`` (string, optional) + and ``file_id`` (string, optional). + :vartype input_image_mask: "ImageGenToolInputImageMask" + :ivar partial_images: Number of partial images to generate in streaming mode, from 0 (default + value) to 3. + :vartype partial_images: int + :ivar action: Whether to generate a new image or edit an existing image. Default: ``auto``. + Known values are: "generate", "edit", and "auto". + :vartype action: Union[str, "ImageGenAction"] + :ivar name: Deprecated. This property is deprecated and will be removed in a future version. + :vartype name: str + :ivar description: Deprecated. This property is deprecated and will be removed in a future + version. + :vartype description: str + :ivar tool_configs: Deprecated. This property is deprecated and will be removed in a future + version. + :vartype tool_configs: dict[str, "ToolConfig"] + """ + + type: Required[Literal[ToolType.IMAGE_GENERATION]] + """The type of the image generation tool. Always ``image_generation``. Required. IMAGE_GENERATION.""" + model: Union[Literal["gpt-image-1"], Literal["gpt-image-1-mini"], Literal["gpt-image-1.5"], str] + """Is one of the following types: Literal[\"gpt-image-1\"], Literal[\"gpt-image-1-mini\"], + Literal[\"gpt-image-1.5\"], str""" + quality: Literal["low", "medium", "high", "auto"] + """The quality of the generated image. One of ``low``, ``medium``, ``high``, or ``auto``. Default: + ``auto``. Is one of the following types: Literal[\"low\"], Literal[\"medium\"], + Literal[\"high\"], Literal[\"auto\"]""" + size: Union[Literal["1024x1024"], Literal["1024x1536"], Literal["1536x1024"], Literal["auto"], str] + """The size of the generated images. For ``gpt-image-2`` and ``gpt-image-2-2026-04-21``, arbitrary + resolutions are supported as ``WIDTHxHEIGHT`` strings, for example ``1536x864``. Width and + height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. + Resolutions above ``2560x1440`` are experimental, and the maximum supported resolution is + ``3840x2160``. The requested size must also satisfy the model's current pixel and edge limits. + The standard sizes ``1024x1024``, ``1536x1024``, and ``1024x1536`` are supported by the GPT + image models; ``auto`` is supported for models that allow automatic sizing. For ``dall-e-2``, + use one of ``256x256``, ``512x512``, or ``1024x1024``. For ``dall-e-3``, use one of + ``1024x1024``, ``1792x1024``, or ``1024x1792``. Is one of the following types: + Literal[\"1024x1024\"], Literal[\"1024x1536\"], Literal[\"1536x1024\"], Literal[\"auto\"], str""" + output_format: Literal["png", "webp", "jpeg"] + """The output format of the generated image. One of ``png``, ``webp``, or ``jpeg``. Default: + ``png``. Is one of the following types: Literal[\"png\"], Literal[\"webp\"], Literal[\"jpeg\"]""" + output_compression: int + """Compression level for the output image. Default: 100.""" + moderation: Literal["auto", "low"] + """Moderation level for the generated image. Default: ``auto``. Is either a Literal[\"auto\"] type + or a Literal[\"low\"] type.""" + background: Literal["transparent", "opaque", "auto"] + """Background type for the generated image. One of ``transparent``, ``opaque``, or ``auto``. + Default: ``auto``. Is one of the following types: Literal[\"transparent\"], + Literal[\"opaque\"], Literal[\"auto\"]""" + input_fidelity: Optional[Union[str, "InputFidelity"]] + """Known values are: \"high\" and \"low\".""" + input_image_mask: "ImageGenToolInputImageMask" + """Optional mask for inpainting. Contains ``image_url`` (string, optional) and ``file_id`` + (string, optional).""" + partial_images: int + """Number of partial images to generate in streaming mode, from 0 (default value) to 3.""" + action: Union[str, "ImageGenAction"] + """Whether to generate a new image or edit an existing image. Default: ``auto``. Known values are: + \"generate\", \"edit\", and \"auto\".""" + name: str + """Deprecated. This property is deprecated and will be removed in a future version.""" + description: str + """Deprecated. This property is deprecated and will be removed in a future version.""" + tool_configs: dict[str, "ToolConfig"] + """Deprecated. This property is deprecated and will be removed in a future version.""" + + +class ImageGenToolInputImageMask(TypedDict, total=False): + """ImageGenToolInputImageMask. + + :ivar image_url: + :vartype image_url: str + :ivar file_id: + :vartype file_id: str + """ + + image_url: str + file_id: str + + +class InlineSkillParam(TypedDict, total=False): + """InlineSkillParam. + + :ivar type: Defines an inline skill for this request. Required. INLINE. + :vartype type: Literal[ContainerSkillType.INLINE] + :ivar name: The name of the skill. Required. + :vartype name: str + :ivar description: The description of the skill. Required. + :vartype description: str + :ivar source: Inline skill payload. Required. + :vartype source: "InlineSkillSourceParam" + """ + + type: Required[Literal[ContainerSkillType.INLINE]] + """Defines an inline skill for this request. Required. INLINE.""" + name: Required[str] + """The name of the skill. Required.""" + description: Required[str] + """The description of the skill. Required.""" + source: Required["InlineSkillSourceParam"] + """Inline skill payload. Required.""" + + +class InlineSkillSourceParam(TypedDict, total=False): + """Inline skill payload. + + :ivar type: The type of the inline skill source. Must be ``base64``. Required. Default value is + "base64". + :vartype type: Literal["base64"] + :ivar media_type: The media type of the inline skill payload. Must be ``application/zip``. + Required. Default value is "application/zip". + :vartype media_type: Literal["application/zip"] + :ivar data: Base64-encoded skill zip bundle. Required. + :vartype data: str + """ + + type: Required[Literal["base64"]] + """The type of the inline skill source. Must be ``base64``. Required. Default value is \"base64\".""" + media_type: Required[Literal["application/zip"]] + """The media type of the inline skill payload. Must be ``application/zip``. Required. Default + value is \"application/zip\".""" + data: Required[str] + """Base64-encoded skill zip bundle. Required.""" + + +class Insight(TypedDict, total=False): + """The response body for cluster insights. + + :ivar insight_id: The unique identifier for the insights report. Required. + :vartype insight_id: str + :ivar metadata: Metadata about the insights report. Required. + :vartype metadata: "InsightsMetadata" + :ivar state: The current state of the insights. Required. Known values are: "NotStarted", + "Running", "Succeeded", "Failed", and "Canceled". + :vartype state: Union[str, "OperationState"] + :ivar display_name: User friendly display name for the insight. Required. + :vartype display_name: str + :ivar request: Request for the insights analysis. Required. + :vartype request: "InsightRequest" + :ivar result: The result of the insights report. + :vartype result: "InsightResult" + """ + + id: Required[str] + """The unique identifier for the insights report. Required.""" + metadata: Required["InsightsMetadata"] + """Metadata about the insights report. Required.""" + state: Required[Union[str, "OperationState"]] + """The current state of the insights. Required. Known values are: \"NotStarted\", \"Running\", + \"Succeeded\", \"Failed\", and \"Canceled\".""" + displayName: Required[str] + """User friendly display name for the insight. Required.""" + request: Required["InsightRequest"] + """Request for the insights analysis. Required.""" + result: "InsightResult" + """The result of the insights report.""" + + +class InsightCluster(TypedDict, total=False): + """A cluster of analysis samples. + + :ivar id: The id of the analysis cluster. Required. + :vartype id: str + :ivar label: Label for the cluster. Required. + :vartype label: str + :ivar suggestion: Suggestion for the cluster. Required. + :vartype suggestion: str + :ivar suggestion_title: The title of the suggestion for the cluster. Required. + :vartype suggestion_title: str + :ivar description: Description of the analysis cluster. Required. + :vartype description: str + :ivar weight: The weight of the analysis cluster. This indicate number of samples in the + cluster. Required. + :vartype weight: int + :ivar sub_clusters: List of subclusters within this cluster. Empty if no subclusters exist. + :vartype sub_clusters: list["InsightCluster"] + :ivar samples: List of samples that belong to this cluster. Empty if samples are part of + subclusters. + :vartype samples: list["InsightSample"] + """ + + id: Required[str] + """The id of the analysis cluster. Required.""" + label: Required[str] + """Label for the cluster. Required.""" + suggestion: Required[str] + """Suggestion for the cluster. Required.""" + suggestionTitle: Required[str] + """The title of the suggestion for the cluster. Required.""" + description: Required[str] + """Description of the analysis cluster. Required.""" + weight: Required[int] + """The weight of the analysis cluster. This indicate number of samples in the cluster. Required.""" + subClusters: list["InsightCluster"] + """List of subclusters within this cluster. Empty if no subclusters exist.""" + samples: list["InsightSample"] + """List of samples that belong to this cluster. Empty if samples are part of subclusters.""" + + +class InsightModelConfiguration(TypedDict, total=False): + """Configuration of the model used in the insight generation. + + :ivar model_deployment_name: The model deployment to be evaluated. Accepts either the + deployment name alone or with the connection name as '{connectionName}/'. + Required. + :vartype model_deployment_name: str + """ + + modelDeploymentName: Required[str] + """The model deployment to be evaluated. Accepts either the deployment name alone or with the + connection name as '{connectionName}/'. Required.""" + + +class InsightScheduleTask(TypedDict, total=False): + """Insight task for the schedule. + + :ivar configuration: Configuration for the task. + :vartype configuration: dict[str, str] + :ivar type: Required. Insight task. + :vartype type: Literal[ScheduleTaskType.INSIGHT] + :ivar insight: The insight payload. Required. + :vartype insight: "Insight" + """ + + configuration: dict[str, str] + """Configuration for the task.""" + type: Required[Literal[ScheduleTaskType.INSIGHT]] + """Required. Insight task.""" + insight: Required["Insight"] + """The insight payload. Required.""" + + +class InsightsMetadata(TypedDict, total=False): + """Metadata about the insights. + + :ivar created_at: The timestamp when the insights were created. Required. + :vartype created_at: str + :ivar completed_at: The timestamp when the insights were completed. + :vartype completed_at: str + """ + + createdAt: Required[str] + """The timestamp when the insights were created. Required.""" + completedAt: str + """The timestamp when the insights were completed.""" + + +class InsightSummary(TypedDict, total=False): + """Summary of the error cluster analysis. + + :ivar sample_count: Total number of samples analyzed. Required. + :vartype sample_count: int + :ivar unique_subcluster_count: Total number of unique subcluster labels. Required. + :vartype unique_subcluster_count: int + :ivar unique_cluster_count: Total number of unique clusters. Required. + :vartype unique_cluster_count: int + :ivar method: Method used for clustering. Required. + :vartype method: str + :ivar usage: Token usage while performing clustering analysis. Required. + :vartype usage: "ClusterTokenUsage" + """ + + sampleCount: Required[int] + """Total number of samples analyzed. Required.""" + uniqueSubclusterCount: Required[int] + """Total number of unique subcluster labels. Required.""" + uniqueClusterCount: Required[int] + """Total number of unique clusters. Required.""" + method: Required[str] + """Method used for clustering. Required.""" + usage: Required["ClusterTokenUsage"] + """Token usage while performing clustering analysis. Required.""" + + +class InvocationsProtocolConfiguration(TypedDict, total=False): + """Configuration specific to the invocations protocol.""" + + +class InvocationsWsProtocolConfiguration(TypedDict, total=False): + """Configuration specific to the WebSocket-based invocations protocol.""" + + +class InvokeAgentInvocationsApiDispatchPayload(TypedDict, total=False): + """A manual payload used to test an invocations API routine dispatch. + + :ivar type: The manual dispatch payload type. Required. A manual payload for an invocations API + routine dispatch. + :vartype type: Literal[RoutineDispatchPayloadType.INVOKE_AGENT_INVOCATIONS_API] + :ivar input: The JSON value sent as the complete downstream invocations input. The value is + passed through as-is and can be an object, string, number, boolean, array, or null. Required. + :vartype input: Any + """ + + type: Required[Literal[RoutineDispatchPayloadType.INVOKE_AGENT_INVOCATIONS_API]] + """The manual dispatch payload type. Required. A manual payload for an invocations API routine + dispatch.""" + input: Required[Any] + """The JSON value sent as the complete downstream invocations input. The value is passed through + as-is and can be an object, string, number, boolean, array, or null. Required.""" + + +class InvokeAgentInvocationsApiRoutineAction(TypedDict, total=False): + """Dispatches a routine through the raw invocations API. Exactly one of agent_name or + agent_endpoint_id must be provided. + + :ivar type: The action type. Required. Dispatches through the raw invocations API. + :vartype type: Literal[RoutineActionType.INVOKE_AGENT_INVOCATIONS_API] + :ivar agent_name: The project-scoped agent name for routine dispatch. + :vartype agent_name: str + :ivar agent_endpoint_id: Legacy endpoint-scoped agent identifier for routine dispatch. + :vartype agent_endpoint_id: str + :ivar input: Static JSON value sent as the complete downstream input when the routine fires. + The value is passed through as-is; no templating is applied. + :vartype input: Any + :ivar session_id: An optional existing hosted-agent session identifier to continue during the + downstream dispatch. + :vartype session_id: str + """ + + type: Required[Literal[RoutineActionType.INVOKE_AGENT_INVOCATIONS_API]] + """The action type. Required. Dispatches through the raw invocations API.""" + agent_name: str + """The project-scoped agent name for routine dispatch.""" + agent_endpoint_id: str + """Legacy endpoint-scoped agent identifier for routine dispatch.""" + input: Any + """Static JSON value sent as the complete downstream input when the routine fires. The value is + passed through as-is; no templating is applied.""" + session_id: str + """An optional existing hosted-agent session identifier to continue during the downstream + dispatch.""" + + +class InvokeAgentResponsesApiDispatchPayload(TypedDict, total=False): + """A manual payload used to test a responses API routine dispatch. + + :ivar type: The manual dispatch payload type. Required. A manual payload for a responses API + routine dispatch. + :vartype type: Literal[RoutineDispatchPayloadType.INVOKE_AGENT_RESPONSES_API] + :ivar input: The JSON value sent as the complete downstream responses input. The value is + passed through as-is and can be an object, string, number, boolean, array, or null. Required. + :vartype input: Any + """ + + type: Required[Literal[RoutineDispatchPayloadType.INVOKE_AGENT_RESPONSES_API]] + """The manual dispatch payload type. Required. A manual payload for a responses API routine + dispatch.""" + input: Required[Any] + """The JSON value sent as the complete downstream responses input. The value is passed through + as-is and can be an object, string, number, boolean, array, or null. Required.""" + + +class InvokeAgentResponsesApiRoutineAction(TypedDict, total=False): + """Dispatches a routine through the responses API. Exactly one of agent_name or agent_endpoint_id + must be provided. + + :ivar type: The action type. Required. Dispatches through the responses API. + :vartype type: Literal[RoutineActionType.INVOKE_AGENT_RESPONSES_API] + :ivar agent_name: The project-scoped agent name for routine dispatch. + :vartype agent_name: str + :ivar agent_endpoint_id: Legacy endpoint-scoped agent identifier for routine dispatch. + :vartype agent_endpoint_id: str + :ivar input: Static JSON value sent as the complete downstream input when the routine fires. + The value is passed through as-is; no templating is applied. + :vartype input: Any + :ivar conversation: An optional existing conversation identifier to continue during the + downstream dispatch. + :vartype conversation: str + """ + + type: Required[Literal[RoutineActionType.INVOKE_AGENT_RESPONSES_API]] + """The action type. Required. Dispatches through the responses API.""" + agent_name: str + """The project-scoped agent name for routine dispatch.""" + agent_endpoint_id: str + """Legacy endpoint-scoped agent identifier for routine dispatch.""" + input: Any + """Static JSON value sent as the complete downstream input when the routine fires. The value is + passed through as-is; no templating is applied.""" + conversation: str + """An optional existing conversation identifier to continue during the downstream dispatch.""" + + +class LocalShellToolParam(TypedDict, total=False): + """Local shell tool. + + :ivar type: The type of the local shell tool. Always ``local_shell``. Required. LOCAL_SHELL. + :vartype type: Literal[ToolType.LOCAL_SHELL] + :ivar name: Deprecated. This property is deprecated and will be removed in a future version. + :vartype name: str + :ivar description: Deprecated. This property is deprecated and will be removed in a future + version. + :vartype description: str + :ivar tool_configs: Deprecated. This property is deprecated and will be removed in a future + version. + :vartype tool_configs: dict[str, "ToolConfig"] + """ + + type: Required[Literal[ToolType.LOCAL_SHELL]] + """The type of the local shell tool. Always ``local_shell``. Required. LOCAL_SHELL.""" + name: str + """Deprecated. This property is deprecated and will be removed in a future version.""" + description: str + """Deprecated. This property is deprecated and will be removed in a future version.""" + tool_configs: dict[str, "ToolConfig"] + """Deprecated. This property is deprecated and will be removed in a future version.""" + + +class LocalSkillParam(TypedDict, total=False): + """LocalSkillParam. + + :ivar name: The name of the skill. Required. + :vartype name: str + :ivar description: The description of the skill. Required. + :vartype description: str + :ivar path: The path to the directory containing the skill. Required. + :vartype path: str + """ + + name: Required[str] + """The name of the skill. Required.""" + description: Required[str] + """The description of the skill. Required.""" + path: Required[str] + """The path to the directory containing the skill. Required.""" + + +class LoraConfig(TypedDict, total=False): + """Adapter-specific metadata for LoRA models. Drives serving engine configuration at deployment + time. + + :ivar rank: LoRA rank (r). Positive integer. Common values: 8, 16, 32, 64. + :vartype rank: int + :ivar alpha: LoRA scaling factor (α). Positive integer; typically 2× the rank. + :vartype alpha: int + :ivar target_modules: Model layers modified by the adapter (e.g., q_proj, v_proj). + Auto-detected from adapter_config.json if omitted. + :vartype target_modules: list[str] + :ivar dropout: Dropout rate used during training. Informational — not used at serving time. + :vartype dropout: float + """ + + rank: int + """LoRA rank (r). Positive integer. Common values: 8, 16, 32, 64.""" + alpha: int + """LoRA scaling factor (α). Positive integer; typically 2× the rank.""" + targetModules: list[str] + """Model layers modified by the adapter (e.g., q_proj, v_proj). Auto-detected from + adapter_config.json if omitted.""" + dropout: float + """Dropout rate used during training. Informational — not used at serving time.""" + + +class ManagedAgentIdentityBlueprintReference(TypedDict, total=False): + """ManagedAgentIdentityBlueprintReference. + + :ivar type: Required. MANAGED_AGENT_IDENTITY_BLUEPRINT. + :vartype type: Literal[AgentBlueprintReferenceType.MANAGED_AGENT_IDENTITY_BLUEPRINT] + :ivar blueprint_id: The ID of the managed blueprint. Required. + :vartype blueprint_id: str + """ + + type: Required[Literal[AgentBlueprintReferenceType.MANAGED_AGENT_IDENTITY_BLUEPRINT]] + """Required. MANAGED_AGENT_IDENTITY_BLUEPRINT.""" + blueprint_id: Required[str] + """The ID of the managed blueprint. Required.""" + + +class ManagedAzureAISearchIndex(TypedDict, total=False): + """Managed Azure AI Search Index Definition. + + :ivar id: Asset ID, a unique identifier for the asset. + :vartype id: str + :ivar name: The name of the resource. Required. + :vartype name: str + :ivar version: The version of the resource. Required. + :vartype version: str + :ivar description: The asset description text. + :vartype description: str + :ivar tags: Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar type: Type of index. Required. Managed Azure Search. + :vartype type: Literal[IndexType.MANAGED_AZURE_SEARCH] + :ivar vector_store_id: Vector store id of managed index. Required. + :vartype vector_store_id: str + """ + + id: str + """Asset ID, a unique identifier for the asset.""" + name: Required[str] + """The name of the resource. Required.""" + version: Required[str] + """The version of the resource. Required.""" + description: str + """The asset description text.""" + tags: dict[str, str] + """Tag dictionary. Tags can be added, removed, and updated.""" + type: Required[Literal[IndexType.MANAGED_AZURE_SEARCH]] + """Type of index. Required. Managed Azure Search.""" + vectorStoreId: Required[str] + """Vector store id of managed index. Required.""" + + +class McpProtocolConfiguration(TypedDict, total=False): + """Configuration specific to the MCP protocol.""" + + +class MCPTool(TypedDict, total=False): + """MCP tool. + + :ivar type: The type of the MCP tool. Always ``mcp``. Required. MCP. + :vartype type: Literal[ToolType.MCP] + :ivar server_label: A label for this MCP server, used to identify it in tool calls. Required. + :vartype server_label: str + :ivar server_url: The URL for the MCP server. One of ``server_url``, ``connector_id``, or + ``tunnel_id`` must be provided. + :vartype server_url: str + :ivar connector_id: Identifier for service connectors, like those available in ChatGPT. One of + ``server_url``, ``connector_id``, or ``tunnel_id`` must be provided. Learn more about service + connectors `here `_. Currently supported + ``connector_id`` values are: + + * Dropbox: `connector_dropbox` + * Gmail: `connector_gmail` + * Google Calendar: `connector_googlecalendar` + * Google Drive: `connector_googledrive` + * Microsoft Teams: `connector_microsoftteams` + * Outlook Calendar: `connector_outlookcalendar` + * Outlook Email: `connector_outlookemail` + * SharePoint: `connector_sharepoint`. Is one of the following types: + Literal["connector_dropbox"], Literal["connector_gmail"], Literal["connector_googlecalendar"], + Literal["connector_googledrive"], Literal["connector_microsoftteams"], + Literal["connector_outlookcalendar"], Literal["connector_outlookemail"], + Literal["connector_sharepoint"] + :vartype connector_id: Literal["connector_dropbox", "connector_gmail", + "connector_googlecalendar", "connector_googledrive", "connector_microsoftteams", + "connector_outlookcalendar", "connector_outlookemail", "connector_sharepoint"] + :ivar tunnel_id: The Secure MCP Tunnel ID to use instead of a direct server URL. One of + ``server_url``, ``connector_id``, or ``tunnel_id`` must be provided. + :vartype tunnel_id: str + :ivar authorization: An OAuth access token that can be used with a remote MCP server, either + with a custom MCP server URL or a service connector. Your application must handle the OAuth + authorization flow and provide the token here. + :vartype authorization: str + :ivar server_description: Optional description of the MCP server, used to provide more context. + :vartype server_description: str + :ivar headers: + :vartype headers: dict[str, str] + :ivar allowed_tools: Is either a [str] type or a MCPToolFilter type. + :vartype allowed_tools: Union[list[str], "MCPToolFilter"] + :ivar require_approval: Is one of the following types: MCPToolRequireApproval, + Literal["always"], Literal["never"] + :vartype require_approval: Union["MCPToolRequireApproval", Literal["always"], Literal["never"]] + :ivar defer_loading: Whether this MCP tool is deferred and discovered via tool search. + :vartype defer_loading: bool + :ivar project_connection_id: The connection ID in the project for the MCP server. The + connection stores authentication and other connection details needed to connect to the MCP + server. + :vartype project_connection_id: str + :ivar tool_configs: Deprecated. This property is deprecated and will be removed in a future + version. + :vartype tool_configs: dict[str, "ToolConfig"] + """ + + type: Required[Literal[ToolType.MCP]] + """The type of the MCP tool. Always ``mcp``. Required. MCP.""" + server_label: Required[str] + """A label for this MCP server, used to identify it in tool calls. Required.""" + server_url: str + """The URL for the MCP server. One of ``server_url``, ``connector_id``, or ``tunnel_id`` must be + provided.""" + connector_id: Literal[ + "connector_dropbox", + "connector_gmail", + "connector_googlecalendar", + "connector_googledrive", + "connector_microsoftteams", + "connector_outlookcalendar", + "connector_outlookemail", + "connector_sharepoint", + ] + """Identifier for service connectors, like those available in ChatGPT. One of ``server_url``, + ``connector_id``, or ``tunnel_id`` must be provided. Learn more about service connectors `here + `_. Currently supported ``connector_id`` values are: + + * Dropbox: `connector_dropbox` + * Gmail: `connector_gmail` + * Google Calendar: `connector_googlecalendar` + * Google Drive: `connector_googledrive` + * Microsoft Teams: `connector_microsoftteams` + * Outlook Calendar: `connector_outlookcalendar` + * Outlook Email: `connector_outlookemail` + * SharePoint: `connector_sharepoint`. Is one of the following types: + Literal[\"connector_dropbox\"], Literal[\"connector_gmail\"], + Literal[\"connector_googlecalendar\"], Literal[\"connector_googledrive\"], + Literal[\"connector_microsoftteams\"], Literal[\"connector_outlookcalendar\"], + Literal[\"connector_outlookemail\"], Literal[\"connector_sharepoint\"]""" + tunnel_id: str + """The Secure MCP Tunnel ID to use instead of a direct server URL. One of ``server_url``, + ``connector_id``, or ``tunnel_id`` must be provided.""" + authorization: str + """An OAuth access token that can be used with a remote MCP server, either with a custom MCP + server URL or a service connector. Your application must handle the OAuth authorization flow + and provide the token here.""" + server_description: str + """Optional description of the MCP server, used to provide more context.""" + headers: Optional[dict[str, str]] + allowed_tools: Optional[Union[list[str], "MCPToolFilter"]] + """Is either a [str] type or a MCPToolFilter type.""" + require_approval: Optional[Union["MCPToolRequireApproval", Literal["always"], Literal["never"]]] + """Is one of the following types: MCPToolRequireApproval, Literal[\"always\"], Literal[\"never\"]""" + defer_loading: bool + """Whether this MCP tool is deferred and discovered via tool search.""" + project_connection_id: str + """The connection ID in the project for the MCP server. The connection stores authentication and + other connection details needed to connect to the MCP server.""" + tool_configs: dict[str, "ToolConfig"] + """Deprecated. This property is deprecated and will be removed in a future version.""" + + +class MCPToolboxTool(TypedDict, total=False): + """An MCP tool stored in a toolbox. + + :ivar name: Optional user-defined name for this tool or configuration. + :vartype name: str + :ivar description: Optional user-defined description for this tool or configuration. + :vartype description: str + :ivar tool_configs: Per-tool configuration map. Keys are tool names or ``*`` (catch-all + default). Resolution order: exact tool name match takes priority over ``*``. Unknown tool names + are silently ignored at runtime. + :vartype tool_configs: dict[str, "ToolConfig"] + :ivar type: Required. MCP. + :vartype type: Literal[ToolboxToolType.MCP] + :ivar server_label: A label for this MCP server, used to identify it in tool calls. Required. + :vartype server_label: str + :ivar server_url: The URL for the MCP server. One of ``server_url``, ``connector_id``, or + ``tunnel_id`` must be provided. + :vartype server_url: str + :ivar connector_id: Identifier for service connectors, like those available in ChatGPT. One of + ``server_url``, ``connector_id``, or ``tunnel_id`` must be provided. Learn more about service + connectors `here `_. Currently supported + ``connector_id`` values are: + + * Dropbox: `connector_dropbox` + * Gmail: `connector_gmail` + * Google Calendar: `connector_googlecalendar` + * Google Drive: `connector_googledrive` + * Microsoft Teams: `connector_microsoftteams` + * Outlook Calendar: `connector_outlookcalendar` + * Outlook Email: `connector_outlookemail` + * SharePoint: `connector_sharepoint`. Is one of the following types: + Literal["connector_dropbox"], Literal["connector_gmail"], Literal["connector_googlecalendar"], + Literal["connector_googledrive"], Literal["connector_microsoftteams"], + Literal["connector_outlookcalendar"], Literal["connector_outlookemail"], + Literal["connector_sharepoint"] + :vartype connector_id: Literal["connector_dropbox", "connector_gmail", + "connector_googlecalendar", "connector_googledrive", "connector_microsoftteams", + "connector_outlookcalendar", "connector_outlookemail", "connector_sharepoint"] + :ivar tunnel_id: The Secure MCP Tunnel ID to use instead of a direct server URL. One of + ``server_url``, ``connector_id``, or ``tunnel_id`` must be provided. + :vartype tunnel_id: str + :ivar authorization: An OAuth access token that can be used with a remote MCP server, either + with a custom MCP server URL or a service connector. Your application must handle the OAuth + authorization flow and provide the token here. + :vartype authorization: str + :ivar server_description: Optional description of the MCP server, used to provide more context. + :vartype server_description: str + :ivar headers: + :vartype headers: dict[str, str] + :ivar allowed_tools: Is either a [str] type or a MCPToolFilter type. + :vartype allowed_tools: Union[list[str], "MCPToolFilter"] + :ivar require_approval: Is one of the following types: MCPToolRequireApproval, + Literal["always"], Literal["never"] + :vartype require_approval: Union["MCPToolRequireApproval", Literal["always"], Literal["never"]] + :ivar defer_loading: Whether this MCP tool is deferred and discovered via tool search. + :vartype defer_loading: bool + :ivar project_connection_id: The connection ID in the project for the MCP server. The + connection stores authentication and other connection details needed to connect to the MCP + server. + :vartype project_connection_id: str + """ + + name: str + """Optional user-defined name for this tool or configuration.""" + description: str + """Optional user-defined description for this tool or configuration.""" + tool_configs: dict[str, "ToolConfig"] + """Per-tool configuration map. Keys are tool names or ``*`` (catch-all default). Resolution order: + exact tool name match takes priority over ``*``. Unknown tool names are silently ignored at + runtime.""" + type: Required[Literal[ToolboxToolType.MCP]] + """Required. MCP.""" + server_label: Required[str] + """A label for this MCP server, used to identify it in tool calls. Required.""" + server_url: str + """The URL for the MCP server. One of ``server_url``, ``connector_id``, or ``tunnel_id`` must be + provided.""" + connector_id: Literal[ + "connector_dropbox", + "connector_gmail", + "connector_googlecalendar", + "connector_googledrive", + "connector_microsoftteams", + "connector_outlookcalendar", + "connector_outlookemail", + "connector_sharepoint", + ] + """Identifier for service connectors, like those available in ChatGPT. One of ``server_url``, + ``connector_id``, or ``tunnel_id`` must be provided. Learn more about service connectors `here + `_. Currently supported ``connector_id`` values are: + + * Dropbox: `connector_dropbox` + * Gmail: `connector_gmail` + * Google Calendar: `connector_googlecalendar` + * Google Drive: `connector_googledrive` + * Microsoft Teams: `connector_microsoftteams` + * Outlook Calendar: `connector_outlookcalendar` + * Outlook Email: `connector_outlookemail` + * SharePoint: `connector_sharepoint`. Is one of the following types: + Literal[\"connector_dropbox\"], Literal[\"connector_gmail\"], + Literal[\"connector_googlecalendar\"], Literal[\"connector_googledrive\"], + Literal[\"connector_microsoftteams\"], Literal[\"connector_outlookcalendar\"], + Literal[\"connector_outlookemail\"], Literal[\"connector_sharepoint\"]""" + tunnel_id: str + """The Secure MCP Tunnel ID to use instead of a direct server URL. One of ``server_url``, + ``connector_id``, or ``tunnel_id`` must be provided.""" + authorization: str + """An OAuth access token that can be used with a remote MCP server, either with a custom MCP + server URL or a service connector. Your application must handle the OAuth authorization flow + and provide the token here.""" + server_description: str + """Optional description of the MCP server, used to provide more context.""" + headers: Optional[dict[str, str]] + allowed_tools: Optional[Union[list[str], "MCPToolFilter"]] + """Is either a [str] type or a MCPToolFilter type.""" + require_approval: Optional[Union["MCPToolRequireApproval", Literal["always"], Literal["never"]]] + """Is one of the following types: MCPToolRequireApproval, Literal[\"always\"], Literal[\"never\"]""" + defer_loading: bool + """Whether this MCP tool is deferred and discovered via tool search.""" + project_connection_id: str + """The connection ID in the project for the MCP server. The connection stores authentication and + other connection details needed to connect to the MCP server.""" + + +class MCPToolFilter(TypedDict, total=False): + """MCP tool filter. + + :ivar tool_names: MCP allowed tools. + :vartype tool_names: list[str] + :ivar read_only: Indicates whether or not a tool modifies data or is read-only. If an MCP + server is `annotated with `readOnlyHint` + `_, + it will match this filter. + :vartype read_only: bool + """ + + tool_names: list[str] + """MCP allowed tools.""" + read_only: bool + """Indicates whether or not a tool modifies data or is read-only. If an MCP server is `annotated + with `readOnlyHint` + `_, + it will match this filter.""" + + +class MCPToolRequireApproval(TypedDict, total=False): + """MCPToolRequireApproval. + + :ivar always: + :vartype always: "MCPToolFilter" + :ivar never: + :vartype never: "MCPToolFilter" + """ + + always: "MCPToolFilter" + never: "MCPToolFilter" + + +class MemorySearchOptions(TypedDict, total=False): + """Memory search options. + + :ivar max_memories: Maximum number of memory items to return. + :vartype max_memories: int + """ + + max_memories: int + """Maximum number of memory items to return.""" + + +class MemorySearchPreviewTool(TypedDict, total=False): + """A tool for integrating memories into the agent. + + :ivar type: The type of the tool. Always ``memory_search_preview``. Required. + MEMORY_SEARCH_PREVIEW. + :vartype type: Literal[ToolType.MEMORY_SEARCH_PREVIEW] + :ivar memory_store_name: The name of the memory store to use. Required. + :vartype memory_store_name: str + :ivar scope: The namespace used to group and isolate memories, such as a user ID. Limits which + memories can be retrieved or updated. Use special variable ``{{$userId}}`` to scope memories to + the current signed-in user. Required. + :vartype scope: str + :ivar search_options: Options for searching the memory store. + :vartype search_options: "MemorySearchOptions" + :ivar update_delay: Time to wait before updating memories after inactivity (seconds). Default + 300. + :vartype update_delay: int + """ + + type: Required[Literal[ToolType.MEMORY_SEARCH_PREVIEW]] + """The type of the tool. Always ``memory_search_preview``. Required. MEMORY_SEARCH_PREVIEW.""" + memory_store_name: Required[str] + """The name of the memory store to use. Required.""" + scope: Required[str] + """The namespace used to group and isolate memories, such as a user ID. Limits which memories can + be retrieved or updated. Use special variable ``{{$userId}}`` to scope memories to the current + signed-in user. Required.""" + search_options: "MemorySearchOptions" + """Options for searching the memory store.""" + update_delay: int + """Time to wait before updating memories after inactivity (seconds). Default 300.""" + + +class MemoryStoreDefaultDefinition(TypedDict, total=False): + """Default memory store implementation. + + :ivar kind: The kind of the memory store. Required. The default memory store implementation. + :vartype kind: Literal[MemoryStoreKind.DEFAULT] + :ivar chat_model: The name or identifier of the chat completion model deployment used for + memory processing. Required. + :vartype chat_model: str + :ivar embedding_model: The name or identifier of the embedding model deployment used for memory + processing. Required. + :vartype embedding_model: str + :ivar options: Default memory store options. + :vartype options: "MemoryStoreDefaultOptions" + """ + + kind: Required[Literal[MemoryStoreKind.DEFAULT]] + """The kind of the memory store. Required. The default memory store implementation.""" + chat_model: Required[str] + """The name or identifier of the chat completion model deployment used for memory processing. + Required.""" + embedding_model: Required[str] + """The name or identifier of the embedding model deployment used for memory processing. Required.""" + options: "MemoryStoreDefaultOptions" + """Default memory store options.""" + + +class MemoryStoreDefaultOptions(TypedDict, total=False): + """Default memory store configurations. + + :ivar user_profile_enabled: Whether to enable user profile extraction and storage. Default is + true. Required. + :vartype user_profile_enabled: bool + :ivar user_profile_details: Specific categories or types of user profile information to extract + and store. + :vartype user_profile_details: str + :ivar chat_summary_enabled: Whether to enable chat summary extraction and storage. Defaults to + ``true``. Required. + :vartype chat_summary_enabled: bool + :ivar procedural_memory_enabled: Whether to enable procedural memory extraction and storage. + The service defaults to ``true`` if a value is not specified by the caller. + :vartype procedural_memory_enabled: bool + :ivar default_ttl_seconds: The default time-to-live for memories in seconds. A value of ``0`` + indicates that memories do not expire. Defaults to ``0``. + :vartype default_ttl_seconds: str + """ + + user_profile_enabled: Required[bool] + """Whether to enable user profile extraction and storage. Default is true. Required.""" + user_profile_details: str + """Specific categories or types of user profile information to extract and store.""" + chat_summary_enabled: Required[bool] + """Whether to enable chat summary extraction and storage. Defaults to ``true``. Required.""" + procedural_memory_enabled: bool + """Whether to enable procedural memory extraction and storage. The service defaults to ``true`` if + a value is not specified by the caller.""" + default_ttl_seconds: str + """The default time-to-live for memories in seconds. A value of ``0`` indicates that memories do + not expire. Defaults to ``0``.""" + + +class MicrosoftFabricPreviewTool(TypedDict, total=False): + """The input definition information for a Microsoft Fabric tool as used to configure an agent. + + :ivar type: The object type, which is always 'fabric_dataagent_preview'. Required. + FABRIC_DATAAGENT_PREVIEW. + :vartype type: Literal[ToolType.FABRIC_DATAAGENT_PREVIEW] + :ivar fabric_dataagent_preview: The fabric data agent tool parameters. Required. + :vartype fabric_dataagent_preview: "FabricDataAgentToolParameters" + """ + + type: Required[Literal[ToolType.FABRIC_DATAAGENT_PREVIEW]] + """The object type, which is always 'fabric_dataagent_preview'. Required. + FABRIC_DATAAGENT_PREVIEW.""" + fabric_dataagent_preview: Required["FabricDataAgentToolParameters"] + """The fabric data agent tool parameters. Required.""" + + +class ModelCredentialRequest(TypedDict, total=False): + """Request to fetch credentials for a model asset. + + :ivar blob_uri: Blob URI of the model asset to fetch credentials for. Required. + :vartype blob_uri: str + """ + + blobUri: Required[str] + """Blob URI of the model asset to fetch credentials for. Required.""" + + +class ModelPendingUploadRequest(TypedDict, total=False): + """Represents a request for a pending upload of a model version. + + :ivar pending_upload_id: If PendingUploadId is not provided, a random GUID will be used. + :vartype pending_upload_id: str + :ivar connection_name: Azure Storage Account connection name to use for generating temporary + SAS token. + :vartype connection_name: str + :ivar pending_upload_type: The type of pending upload. Only TemporaryBlobReference is supported + for models. Required. Temporary blob reference. + :vartype pending_upload_type: Literal[PendingUploadType.TEMPORARY_BLOB_REFERENCE] + """ + + pendingUploadId: str + """If PendingUploadId is not provided, a random GUID will be used.""" + connectionName: str + """Azure Storage Account connection name to use for generating temporary SAS token.""" + pendingUploadType: Required[Literal[PendingUploadType.TEMPORARY_BLOB_REFERENCE]] + """The type of pending upload. Only TemporaryBlobReference is supported for models. Required. + Temporary blob reference.""" + + +class ModelSamplingParams(TypedDict, total=False): + """Represents a set of parameters used to control the sampling behavior of a language model during + text generation. + + :ivar temperature: The temperature parameter for sampling. Defaults to 1.0. + :vartype temperature: float + :ivar top_p: The top-p parameter for nucleus sampling. Defaults to 1.0. + :vartype top_p: float + :ivar seed: The random seed for reproducibility. Defaults to 42. + :vartype seed: int + :ivar max_completion_tokens: The maximum number of tokens allowed in the completion. + :vartype max_completion_tokens: int + """ + + temperature: float + """The temperature parameter for sampling. Defaults to 1.0.""" + top_p: float + """The top-p parameter for nucleus sampling. Defaults to 1.0.""" + seed: int + """The random seed for reproducibility. Defaults to 42.""" + max_completion_tokens: int + """The maximum number of tokens allowed in the completion.""" + + +class ModelSourceData(TypedDict, total=False): + """Source information for the model. + + :ivar source_type: The source type of the model. Known values are: "LocalUpload" and + "TrainingJob". + :vartype source_type: Union[str, "FoundryModelSourceType"] + :ivar job_id: The job ID that produced this model. + :vartype job_id: str + """ + + sourceType: Union[str, "FoundryModelSourceType"] + """The source type of the model. Known values are: \"LocalUpload\" and \"TrainingJob\".""" + jobId: str + """The job ID that produced this model.""" + + +class ModelVersion(TypedDict, total=False): + """Model Version Definition. + + :ivar blob_uri: URI of the model artifact in blob storage. Required. + :vartype blob_uri: str + :ivar weight_type: The weight type of the model. Known values are: "FullWeight", "LoRA", and + "DraftModel". + :vartype weight_type: Union[str, "FoundryModelWeightType"] + :ivar base_model: Base model asset ID. + :vartype base_model: str + :ivar source: The source of the model. + :vartype source: "ModelSourceData" + :ivar lora_config: Adapter-specific configuration. Required when weight_type is lora; ignored + otherwise. May be auto-populated from adapter_config.json when present in the uploaded files — + user-provided values take precedence over auto-detected values. + :vartype lora_config: "LoraConfig" + :ivar artifact_profile: The artifact profile of the model. + :vartype artifact_profile: "ArtifactProfile" + :ivar warnings: Service-computed advisory warnings derived from the artifact profile. + :vartype warnings: list["FoundryModelWarning"] + :ivar id: Asset ID, a unique identifier for the asset. + :vartype id: str + :ivar name: The name of the resource. Required. + :vartype name: str + :ivar version: The version of the resource. Required. + :vartype version: str + :ivar description: The asset description text. + :vartype description: str + :ivar tags: Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + """ + + blobUri: Required[str] + """URI of the model artifact in blob storage. Required.""" + weightType: Union[str, "FoundryModelWeightType"] + """The weight type of the model. Known values are: \"FullWeight\", \"LoRA\", and \"DraftModel\".""" + baseModel: str + """Base model asset ID.""" + source: "ModelSourceData" + """The source of the model.""" + loraConfig: "LoraConfig" + """Adapter-specific configuration. Required when weight_type is lora; ignored otherwise. May be + auto-populated from adapter_config.json when present in the uploaded files — user-provided + values take precedence over auto-detected values.""" + artifactProfile: "ArtifactProfile" + """The artifact profile of the model.""" + warnings: list["FoundryModelWarning"] + """Service-computed advisory warnings derived from the artifact profile.""" + id: str + """Asset ID, a unique identifier for the asset.""" + name: Required[str] + """The name of the resource. Required.""" + version: Required[str] + """The version of the resource. Required.""" + description: str + """The asset description text.""" + tags: dict[str, str] + """Tag dictionary. Tags can be added, removed, and updated.""" + + +class MonthlyRecurrenceSchedule(TypedDict, total=False): + """Monthly recurrence schedule. + + :ivar type: Monthly recurrence type. Required. Monthly recurrence pattern. + :vartype type: Literal[RecurrenceType.MONTHLY] + :ivar days_of_month: Days of the month for the recurrence schedule. Required. + :vartype days_of_month: list[int] + """ + + type: Required[Literal[RecurrenceType.MONTHLY]] + """Monthly recurrence type. Required. Monthly recurrence pattern.""" + daysOfMonth: Required[list[int]] + """Days of the month for the recurrence schedule. Required.""" + + +class NamespaceToolParam(TypedDict, total=False): + """Namespace. + + :ivar type: The type of the tool. Always ``namespace``. Required. NAMESPACE. + :vartype type: Literal[ToolType.NAMESPACE] + :ivar name: The namespace name used in tool calls (for example, ``crm``). Required. + :vartype name: str + :ivar description: A description of the namespace shown to the model. Required. + :vartype description: str + :ivar tools: The function/custom tools available inside this namespace. Required. + :vartype tools: list[Union["FunctionToolParam", "CustomToolParam"]] + """ + + type: Required[Literal[ToolType.NAMESPACE]] + """The type of the tool. Always ``namespace``. Required. NAMESPACE.""" + name: Required[str] + """The namespace name used in tool calls (for example, ``crm``). Required.""" + description: Required[str] + """A description of the namespace shown to the model. Required.""" + tools: Required[list[Union["FunctionToolParam", "CustomToolParam"]]] + """The function/custom tools available inside this namespace. Required.""" + + +class OneTimeTrigger(TypedDict, total=False): + """One-time trigger. + + :ivar type: Required. One-time trigger. + :vartype type: Literal[TriggerType.ONE_TIME] + :ivar trigger_at: Date and time for the one-time trigger in ISO 8601 format. Required. + :vartype trigger_at: str + :ivar time_zone: Time zone for the one-time trigger. Defaults to ``UTC``. + :vartype time_zone: str + """ + + type: Required[Literal[TriggerType.ONE_TIME]] + """Required. One-time trigger.""" + triggerAt: Required[str] + """Date and time for the one-time trigger in ISO 8601 format. Required.""" + timeZone: str + """Time zone for the one-time trigger. Defaults to ``UTC``.""" + + +class OpenApiAnonymousAuthDetails(TypedDict, total=False): + """Security details for OpenApi anonymous authentication. + + :ivar type: The object type, which is always 'anonymous'. Required. ANONYMOUS. + :vartype type: Literal[OpenApiAuthType.ANONYMOUS] + """ + + type: Required[Literal[OpenApiAuthType.ANONYMOUS]] + """The object type, which is always 'anonymous'. Required. ANONYMOUS.""" + + +class OpenApiFunctionDefinition(TypedDict, total=False): + """The input definition information for an openapi function. + + :ivar name: The name of the function to be called. Required. + :vartype name: str + :ivar description: A description of what the function does, used by the model to choose when + and how to call the function. + :vartype description: str + :ivar spec: The openapi function shape, described as a JSON Schema object. Required. + :vartype spec: dict[str, Any] + :ivar auth: Open API authentication details. Required. + :vartype auth: "OpenApiAuthDetails" + :ivar default_params: List of OpenAPI spec parameters that will use user-provided defaults. + :vartype default_params: list[str] + :ivar functions: List of function definitions used by OpenApi tool. + :vartype functions: list["OpenApiFunctionDefinitionFunction"] + """ + + name: Required[str] + """The name of the function to be called. Required.""" + description: str + """A description of what the function does, used by the model to choose when and how to call the + function.""" + spec: Required[dict[str, Any]] + """The openapi function shape, described as a JSON Schema object. Required.""" + auth: Required["OpenApiAuthDetails"] + """Open API authentication details. Required.""" + default_params: list[str] + """List of OpenAPI spec parameters that will use user-provided defaults.""" + functions: list["OpenApiFunctionDefinitionFunction"] + """List of function definitions used by OpenApi tool.""" + + +class OpenApiFunctionDefinitionFunction(TypedDict, total=False): + """OpenApiFunctionDefinitionFunction. + + :ivar name: The name of the function to be called. Required. + :vartype name: str + :ivar description: A description of what the function does, used by the model to choose when + and how to call the function. + :vartype description: str + :ivar parameters: The parameters the functions accepts, described as a JSON Schema object. + Required. + :vartype parameters: dict[str, Any] + """ + + name: Required[str] + """The name of the function to be called. Required.""" + description: str + """A description of what the function does, used by the model to choose when and how to call the + function.""" + parameters: Required[dict[str, Any]] + """The parameters the functions accepts, described as a JSON Schema object. Required.""" + + +class OpenApiManagedAuthDetails(TypedDict, total=False): + """Security details for OpenApi managed_identity authentication. + + :ivar type: The object type, which is always 'managed_identity'. Required. MANAGED_IDENTITY. + :vartype type: Literal[OpenApiAuthType.MANAGED_IDENTITY] + :ivar security_scheme: Connection auth security details. Required. + :vartype security_scheme: "OpenApiManagedSecurityScheme" + """ + + type: Required[Literal[OpenApiAuthType.MANAGED_IDENTITY]] + """The object type, which is always 'managed_identity'. Required. MANAGED_IDENTITY.""" + security_scheme: Required["OpenApiManagedSecurityScheme"] + """Connection auth security details. Required.""" + + +class OpenApiManagedSecurityScheme(TypedDict, total=False): + """Security scheme for OpenApi managed_identity authentication. + + :ivar audience: Authentication scope for managed_identity auth type. Required. + :vartype audience: str + """ + + audience: Required[str] + """Authentication scope for managed_identity auth type. Required.""" + + +class OpenApiProjectConnectionAuthDetails(TypedDict, total=False): + """Security details for OpenApi project connection authentication. + + :ivar type: The object type, which is always 'project_connection'. Required. + PROJECT_CONNECTION. + :vartype type: Literal[OpenApiAuthType.PROJECT_CONNECTION] + :ivar security_scheme: Project connection auth security details. Required. + :vartype security_scheme: "OpenApiProjectConnectionSecurityScheme" + """ + + type: Required[Literal[OpenApiAuthType.PROJECT_CONNECTION]] + """The object type, which is always 'project_connection'. Required. PROJECT_CONNECTION.""" + security_scheme: Required["OpenApiProjectConnectionSecurityScheme"] + """Project connection auth security details. Required.""" + + +class OpenApiProjectConnectionSecurityScheme(TypedDict, total=False): + """Security scheme for OpenApi managed_identity authentication. + + :ivar project_connection_id: Project connection id for Project Connection auth type. Required. + :vartype project_connection_id: str + """ + + project_connection_id: Required[str] + """Project connection id for Project Connection auth type. Required.""" + + +class OpenApiTool(TypedDict, total=False): + """The input definition information for an OpenAPI tool as used to configure an agent. + + :ivar type: The object type, which is always 'openapi'. Required. OPENAPI. + :vartype type: Literal[ToolType.OPENAPI] + :ivar tool_configs: Deprecated. This property is deprecated and will be removed in a future + version. + :vartype tool_configs: dict[str, "ToolConfig"] + :ivar openapi: The openapi function definition. Required. + :vartype openapi: "OpenApiFunctionDefinition" + """ + + type: Required[Literal[ToolType.OPENAPI]] + """The object type, which is always 'openapi'. Required. OPENAPI.""" + tool_configs: dict[str, "ToolConfig"] + """Deprecated. This property is deprecated and will be removed in a future version.""" + openapi: Required["OpenApiFunctionDefinition"] + """The openapi function definition. Required.""" + + +class OpenApiToolboxTool(TypedDict, total=False): + """An OpenAPI tool stored in a toolbox. + + :ivar name: Optional user-defined name for this tool or configuration. + :vartype name: str + :ivar description: Optional user-defined description for this tool or configuration. + :vartype description: str + :ivar tool_configs: Per-tool configuration map. Keys are tool names or ``*`` (catch-all + default). Resolution order: exact tool name match takes priority over ``*``. Unknown tool names + are silently ignored at runtime. + :vartype tool_configs: dict[str, "ToolConfig"] + :ivar type: Required. OPENAPI. + :vartype type: Literal[ToolboxToolType.OPENAPI] + :ivar openapi: The openapi function definition. Required. + :vartype openapi: "OpenApiFunctionDefinition" + """ + + name: str + """Optional user-defined name for this tool or configuration.""" + description: str + """Optional user-defined description for this tool or configuration.""" + tool_configs: dict[str, "ToolConfig"] + """Per-tool configuration map. Keys are tool names or ``*`` (catch-all default). Resolution order: + exact tool name match takes priority over ``*``. Unknown tool names are silently ignored at + runtime.""" + type: Required[Literal[ToolboxToolType.OPENAPI]] + """Required. OPENAPI.""" + openapi: Required["OpenApiFunctionDefinition"] + """The openapi function definition. Required.""" + + +class OptimizationAgentIdentifier(TypedDict, total=False): + """Identifies the registered Foundry agent to optimize (request-only). Skills, tools, and + system_prompt are specified in options.optimization_config. + + :ivar agent_name: Registered Foundry agent name (required). Required. + :vartype agent_name: str + :ivar agent_version: Pinned agent version. Defaults to latest if omitted. + :vartype agent_version: str + """ + + agent_name: Required[str] + """Registered Foundry agent name (required). Required.""" + agent_version: str + """Pinned agent version. Defaults to latest if omitted.""" + + +class OptimizationCandidate(TypedDict, total=False): + """Aggregated evaluation result for a single candidate agent configuration across all tasks. + + :ivar candidate_id: Server-assigned candidate identifier. Use with GET /candidates/{id} + sub-endpoints. + :vartype candidate_id: str + :ivar name: Display name of the candidate (e.g., 'baseline', 'instruction-v2'). Required. + :vartype name: str + :ivar mutations: What was mutated from the baseline (e.g., {system_prompt: 'new prompt'}). + :vartype mutations: dict[str, Any] + :ivar avg_score: Average composite score across all tasks. Required. + :vartype avg_score: float + :ivar avg_tokens: Average token usage across all tasks. Required. + :vartype avg_tokens: float + :ivar eval_id: Foundry evaluation identifier used to score this candidate. + :vartype eval_id: str + :ivar eval_run_id: Foundry evaluation run identifier for this candidate's scoring run. + :vartype eval_run_id: str + :ivar promotion: Promotion metadata. Null if the candidate has not been promoted. + :vartype promotion: "PromotionInfo" + """ + + candidate_id: str + """Server-assigned candidate identifier. Use with GET /candidates/{id} sub-endpoints.""" + name: Required[str] + """Display name of the candidate (e.g., 'baseline', 'instruction-v2'). Required.""" + mutations: dict[str, Any] + """What was mutated from the baseline (e.g., {system_prompt: 'new prompt'}).""" + avg_score: Required[float] + """Average composite score across all tasks. Required.""" + avg_tokens: Required[float] + """Average token usage across all tasks. Required.""" + eval_id: str + """Foundry evaluation identifier used to score this candidate.""" + eval_run_id: str + """Foundry evaluation run identifier for this candidate's scoring run.""" + promotion: "PromotionInfo" + """Promotion metadata. Null if the candidate has not been promoted.""" + + +class OptimizationDatasetCriterion(TypedDict, total=False): + """Evaluation criterion: a name + instruction pair used for per-item scoring. + + :ivar name: Criterion name. Required. + :vartype name: str + :ivar instruction: Criterion instruction / description. Required. + :vartype instruction: str + """ + + name: Required[str] + """Criterion name. Required.""" + instruction: Required[str] + """Criterion instruction / description. Required.""" + + +class OptimizationDatasetItem(TypedDict, total=False): + """A single item in an inline dataset. + + :ivar query: The user query / prompt. + :vartype query: str + :ivar ground_truth: Expected ground truth answer. + :vartype ground_truth: str + :ivar desired_num_turns: Desired number of conversation turns for simulation mode (1-20). + :vartype desired_num_turns: int + :ivar criteria: Per-item evaluation criteria. + :vartype criteria: list["OptimizationDatasetCriterion"] + """ + + query: str + """The user query / prompt.""" + ground_truth: str + """Expected ground truth answer.""" + desired_num_turns: int + """Desired number of conversation turns for simulation mode (1-20).""" + criteria: list["OptimizationDatasetCriterion"] + """Per-item evaluation criteria.""" + + +class OptimizationEvaluatorRef(TypedDict, total=False): + """Reference to a named evaluator, optionally pinned to a version. + + :ivar name: Evaluator name. Required. + :vartype name: str + :ivar version: Evaluator version. If not specified, the latest version is used. + :vartype version: str + """ + + name: Required[str] + """Evaluator name. Required.""" + version: str + """Evaluator version. If not specified, the latest version is used.""" + + +class OptimizationInlineDatasetInput(TypedDict, total=False): + """Inline dataset — items supplied directly in the request body. + + :ivar type: Dataset input type discriminator. Required. Inline dataset — items are provided + directly in the request body. + :vartype type: Literal[OptimizationDatasetInputType.INLINE] + :ivar dataset_items: Dataset items. Required. + :vartype dataset_items: list["OptimizationDatasetItem"] + """ + + type: Required[Literal[OptimizationDatasetInputType.INLINE]] + """Dataset input type discriminator. Required. Inline dataset — items are provided directly in the + request body.""" + items: Required[list["OptimizationDatasetItem"]] + """Dataset items. Required.""" + + +class OptimizationJob(TypedDict, total=False): + """Agent optimization job resource — a long-running job that optimizes an agent's configuration + (instructions, model, skills, tools) to maximize evaluation scores. On success, the result + contains scored candidates. + + :ivar id: Server-assigned unique identifier. Required. + :vartype id: str + :ivar inputs: Caller-supplied inputs. + :vartype inputs: "OptimizationJobInputs" + :ivar result: Result produced on success. + :vartype result: "OptimizationJobResult" + :ivar status: Current lifecycle status. Required. Known values are: "queued", "in_progress", + "succeeded", "failed", and "cancelled". + :vartype status: Union[str, "JobStatus"] + :ivar error: Error details — populated only on failure. + :vartype error: "ApiError" + :ivar created_at: The timestamp when the job was created, represented in Unix time. Required. + :vartype created_at: int + :ivar updated_at: The timestamp when the job was last updated, represented in Unix time. + Required. + :vartype updated_at: int + :ivar progress: Progress snapshot. May be present in terminal states reflecting last-known + progress. + :vartype progress: "OptimizationJobProgress" + :ivar warnings: Non-fatal warnings emitted at any point during optimization. + :vartype warnings: list[str] + """ + + id: Required[str] + """Server-assigned unique identifier. Required.""" + inputs: "OptimizationJobInputs" + """Caller-supplied inputs.""" + result: "OptimizationJobResult" + """Result produced on success.""" + status: Required[Union[str, "JobStatus"]] + """Current lifecycle status. Required. Known values are: \"queued\", \"in_progress\", + \"succeeded\", \"failed\", and \"cancelled\".""" + error: "ApiError" + """Error details — populated only on failure.""" + created_at: Required[int] + """The timestamp when the job was created, represented in Unix time. Required.""" + updated_at: Required[int] + """The timestamp when the job was last updated, represented in Unix time. Required.""" + progress: "OptimizationJobProgress" + """Progress snapshot. May be present in terminal states reflecting last-known progress.""" + warnings: list[str] + """Non-fatal warnings emitted at any point during optimization.""" + + +class OptimizationJobInputs(TypedDict, total=False): + """Caller-supplied inputs for an optimization job. + + :ivar agent: The agent (and pinned version) being optimized. Required. + :vartype agent: "OptimizationAgentIdentifier" + :ivar train_dataset: Training dataset — either inline items or a reference to a registered + dataset. Required. Required. + :vartype train_dataset: "OptimizationDatasetInput" + :ivar validation_dataset: Optional held-out validation dataset for measuring generalization of + the final candidate. + :vartype validation_dataset: "OptimizationDatasetInput" + :ivar evaluators: Job-level evaluators referenced by name and optional version. Required; at + least one must be provided. Required. + :vartype evaluators: list["OptimizationEvaluatorRef"] + :ivar options: Tuning knobs and run-mode. + :vartype options: "OptimizationOptions" + """ + + agent: Required["OptimizationAgentIdentifier"] + """The agent (and pinned version) being optimized. Required.""" + train_dataset: Required["OptimizationDatasetInput"] + """Training dataset — either inline items or a reference to a registered dataset. Required. + Required.""" + validation_dataset: "OptimizationDatasetInput" + """Optional held-out validation dataset for measuring generalization of the final candidate.""" + evaluators: Required[list["OptimizationEvaluatorRef"]] + """Job-level evaluators referenced by name and optional version. Required; at least one must be + provided. Required.""" + options: "OptimizationOptions" + """Tuning knobs and run-mode.""" + + +class OptimizationJobProgress(TypedDict, total=False): + """In-flight progress; only populated while status is queued or in_progress. + + :ivar candidates_completed: Number of candidates whose evaluation has completed so far. + Required. + :vartype candidates_completed: int + :ivar best_score: Best score observed so far across all candidates. Required. + :vartype best_score: float + :ivar elapsed_seconds: Wall-clock time elapsed in seconds since the job began executing. + Required. + :vartype elapsed_seconds: float + """ + + candidates_completed: Required[int] + """Number of candidates whose evaluation has completed so far. Required.""" + best_score: Required[float] + """Best score observed so far across all candidates. Required.""" + elapsed_seconds: Required[float] + """Wall-clock time elapsed in seconds since the job began executing. Required.""" + + +class OptimizationJobResult(TypedDict, total=False): + """Terminal-state result body. Populated when status is succeeded or failed. + + :ivar baseline: Candidate ID of the original (un-optimized) baseline evaluation. + :vartype baseline: str + :ivar best: Candidate ID of the highest-scoring candidate found during optimization. + :vartype best: str + :ivar candidates: All evaluated candidates including baseline. + :vartype candidates: list["OptimizationCandidate"] + """ + + baseline: str + """Candidate ID of the original (un-optimized) baseline evaluation.""" + best: str + """Candidate ID of the highest-scoring candidate found during optimization.""" + candidates: list["OptimizationCandidate"] + """All evaluated candidates including baseline.""" + + +class OptimizationOptions(TypedDict, total=False): + """Tuning knobs and run-mode for an optimization job. + + :ivar max_candidates: Maximum number of optimization candidates to generate. Must be >= 1. + Default: 5. + :vartype max_candidates: int + :ivar optimization_config: Per-target-attribute configuration overrides. Contains skills, + tools, system_prompt for the agent, plus model space for model optimization. + :vartype optimization_config: dict[str, Any] + :ivar eval_model: Model deployment used for evaluation. Defaults to server config (typically + 'gpt-4o'). + :vartype eval_model: str + :ivar optimization_model: Model deployment for optimization reasoning (must be gpt-5 family). + Falls back to the default eval model when not set. + :vartype optimization_model: str + :ivar evaluation_level: Evaluation granularity. Null/omitted means per-item single-turn. Set to + 'conversation' for per-conversation multi-turn simulation scoring. Known values are: "turn" and + "conversation". + :vartype evaluation_level: Union[str, "EvaluationLevel"] + """ + + max_candidates: int + """Maximum number of optimization candidates to generate. Must be >= 1. Default: 5.""" + optimization_config: dict[str, Any] + """Per-target-attribute configuration overrides. Contains skills, tools, system_prompt for the + agent, plus model space for model optimization.""" + eval_model: str + """Model deployment used for evaluation. Defaults to server config (typically 'gpt-4o').""" + optimization_model: str + """Model deployment for optimization reasoning (must be gpt-5 family). Falls back to the default + eval model when not set.""" + evaluation_level: Union[str, "EvaluationLevel"] + """Evaluation granularity. Null/omitted means per-item single-turn. Set to 'conversation' for + per-conversation multi-turn simulation scoring. Known values are: \"turn\" and + \"conversation\".""" + + +class OptimizationReferenceDatasetInput(TypedDict, total=False): + """Reference to a registered Foundry dataset. + + :ivar type: Dataset input type discriminator. Required. Reference to a registered Foundry + dataset by name and version. + :vartype type: Literal[OptimizationDatasetInputType.REFERENCE] + :ivar name: Registered dataset name. Required. + :vartype name: str + :ivar version: Dataset version. If not specified, the latest version is used. + :vartype version: str + """ + + type: Required[Literal[OptimizationDatasetInputType.REFERENCE]] + """Dataset input type discriminator. Required. Reference to a registered Foundry dataset by name + and version.""" + name: Required[str] + """Registered dataset name. Required.""" + version: str + """Dataset version. If not specified, the latest version is used.""" + + +class OtlpTelemetryEndpoint(TypedDict, total=False): + """An OTLP (OpenTelemetry Protocol) telemetry export endpoint. + + :ivar data: Data types to export to this endpoint. Use an empty array to export no data. + Required. + :vartype data: list[Union[str, "TelemetryDataKind"]] + :ivar auth: Optional authentication configuration. + :vartype auth: "TelemetryEndpointAuth" + :ivar kind: The endpoint kind, always 'OTLP' for OpenTelemetry Protocol endpoints. Required. + OpenTelemetry Protocol (OTLP) endpoint. + :vartype kind: Literal[TelemetryEndpointKind.OTLP] + :ivar endpoint: The OTLP collector endpoint URL. Required. + :vartype endpoint: str + :ivar protocol: The transport protocol for the OTLP endpoint. Required. Known values are: + "Http" and "Grpc". + :vartype protocol: Union[str, "TelemetryTransportProtocol"] + """ + + data: Required[list[Union[str, "TelemetryDataKind"]]] + """Data types to export to this endpoint. Use an empty array to export no data. Required.""" + auth: "TelemetryEndpointAuth" + """Optional authentication configuration.""" + kind: Required[Literal[TelemetryEndpointKind.OTLP]] + """The endpoint kind, always 'OTLP' for OpenTelemetry Protocol endpoints. Required. OpenTelemetry + Protocol (OTLP) endpoint.""" + endpoint: Required[str] + """The OTLP collector endpoint URL. Required.""" + protocol: Required[Union[str, "TelemetryTransportProtocol"]] + """The transport protocol for the OTLP endpoint. Required. Known values are: \"Http\" and + \"Grpc\".""" + + +class PendingUploadRequest(TypedDict, total=False): + """Represents a request for a pending upload. + + :ivar pending_upload_id: If PendingUploadId is not provided, a random GUID will be used. + :vartype pending_upload_id: str + :ivar connection_name: Azure Storage Account connection name to use for generating temporary + SAS token. + :vartype connection_name: str + :ivar pending_upload_type: The type of pending upload. Required. Deprecated: the service never + read this value and silently ignored it. Use TemporaryBlobReference instead. + :vartype pending_upload_type: Literal[PendingUploadType.BLOB_REFERENCE] + """ + + pendingUploadId: str + """If PendingUploadId is not provided, a random GUID will be used.""" + connectionName: str + """Azure Storage Account connection name to use for generating temporary SAS token.""" + pendingUploadType: Required[Literal[PendingUploadType.BLOB_REFERENCE]] + """The type of pending upload. Required. Deprecated: the service never read this value and + silently ignored it. Use TemporaryBlobReference instead.""" + + +class PromotionInfo(TypedDict, total=False): + """Promotion metadata recorded when a candidate is deployed to a Foundry agent. + + :ivar promoted_at: Timestamp when promotion occurred, represented in Unix time. Required. + :vartype promoted_at: int + :ivar agent_name: Name of the Foundry agent this candidate was promoted to. Required. + :vartype agent_name: str + :ivar agent_version: Version of the Foundry agent this candidate was promoted to. Required. + :vartype agent_version: str + """ + + promoted_at: Required[int] + """Timestamp when promotion occurred, represented in Unix time. Required.""" + agent_name: Required[str] + """Name of the Foundry agent this candidate was promoted to. Required.""" + agent_version: Required[str] + """Version of the Foundry agent this candidate was promoted to. Required.""" + + +class PromptAgentDefinition(TypedDict, total=False): + """The prompt agent definition. + + :ivar rai_config: Configuration for Responsible AI (RAI) content filtering and safety features. + :vartype rai_config: "RaiConfig" + :ivar kind: Required. PROMPT. + :vartype kind: Literal[AgentKind.PROMPT] + :ivar model: The model deployment to use for this agent. Required. + :vartype model: str + :ivar instructions: A system (or developer) message inserted into the model's context. + :vartype instructions: str + :ivar temperature: What sampling temperature to use, between 0 and 2. Higher values like 0.8 + will make the output more random, while lower values like 0.2 will make it more focused and + deterministic. We generally recommend altering this or ``top_p`` but not both. Defaults to + ``1``. + :vartype temperature: float + :ivar top_p: An alternative to sampling with temperature, called nucleus sampling, where the + model considers the results of the tokens with top_p probability mass. So 0.1 means only the + tokens comprising the top 10% probability mass are considered. We generally recommend altering + this or ``temperature`` but not both. Defaults to ``1``. + :vartype top_p: float + :ivar reasoning: + :vartype reasoning: "Reasoning" + :ivar tools: An array of tools the model may call while generating a response. You can specify + which tool to use by setting the ``tool_choice`` parameter. + :vartype tools: list["Tool"] + :ivar tool_choice: How the model should select which tool (or tools) to use when generating a + response. See the ``tools`` parameter to see how to specify which tools the model can call. Is + either a str type or a ToolChoiceParam type. + :vartype tool_choice: Union[str, "ToolChoiceParam"] + :ivar text: Configuration options for a text response from the model. Can be plain text or + structured JSON data. + :vartype text: "PromptAgentDefinitionTextOptions" + :ivar structured_inputs: Set of structured inputs that can participate in prompt template + substitution or tool argument bindings. + :vartype structured_inputs: dict[str, "StructuredInputDefinition"] + """ + + rai_config: "RaiConfig" + """Configuration for Responsible AI (RAI) content filtering and safety features.""" + kind: Required[Literal[AgentKind.PROMPT]] + """Required. PROMPT.""" + model: Required[str] + """The model deployment to use for this agent. Required.""" + instructions: Optional[str] + """A system (or developer) message inserted into the model's context.""" + temperature: Optional[float] + """What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output + more random, while lower values like 0.2 will make it more focused and deterministic. We + generally recommend altering this or ``top_p`` but not both. Defaults to ``1``.""" + top_p: Optional[float] + """An alternative to sampling with temperature, called nucleus sampling, where the model considers + the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising + the top 10% probability mass are considered. We generally recommend altering this or + ``temperature`` but not both. Defaults to ``1``.""" + reasoning: Optional["Reasoning"] + tools: list["Tool"] + """An array of tools the model may call while generating a response. You can specify which tool to + use by setting the ``tool_choice`` parameter.""" + tool_choice: Union[str, "ToolChoiceParam"] + """How the model should select which tool (or tools) to use when generating a response. See the + ``tools`` parameter to see how to specify which tools the model can call. Is either a str type + or a ToolChoiceParam type.""" + text: "PromptAgentDefinitionTextOptions" + """Configuration options for a text response from the model. Can be plain text or structured JSON + data.""" + structured_inputs: dict[str, "StructuredInputDefinition"] + """Set of structured inputs that can participate in prompt template substitution or tool argument + bindings.""" + + +class PromptAgentDefinitionTextOptions(TypedDict, total=False): + """Configuration options for a text response from the model. Can be plain text or structured JSON + data. + + :ivar format: + :vartype format: "TextResponseFormat" + """ + + format: "TextResponseFormat" + + +class PromptBasedEvaluatorDefinition(TypedDict, total=False): + """Prompt-based evaluator. + + :ivar init_parameters: The JSON schema (Draft 2020-12) for the evaluator's input parameters. + This includes parameters like type, properties, required. + :vartype init_parameters: dict[str, Any] + :ivar data_schema: The JSON schema (Draft 2020-12) for the evaluator's input data. This + includes parameters like type, properties, required. + :vartype data_schema: dict[str, Any] + :ivar metrics: List of output metrics produced by this evaluator. + :vartype metrics: dict[str, "EvaluatorMetric"] + :ivar type: Required. Prompt-based definition. + :vartype type: Literal[EvaluatorDefinitionType.PROMPT] + :ivar prompt_text: The prompt text used for evaluation. Required. + :vartype prompt_text: str + """ + + init_parameters: dict[str, Any] + """The JSON schema (Draft 2020-12) for the evaluator's input parameters. This includes parameters + like type, properties, required.""" + data_schema: dict[str, Any] + """The JSON schema (Draft 2020-12) for the evaluator's input data. This includes parameters like + type, properties, required.""" + metrics: dict[str, "EvaluatorMetric"] + """List of output metrics produced by this evaluator.""" + type: Required[Literal[EvaluatorDefinitionType.PROMPT]] + """Required. Prompt-based definition.""" + prompt_text: Required[str] + """The prompt text used for evaluation. Required.""" + + +class PromptDataGenerationJobSource(TypedDict, total=False): + """Prompt source for data generation jobs — inline text provided by the user. + + :ivar description: Optional description of what this source represents — helps the pipeline + interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core + capabilities'). + :vartype description: str + :ivar type: The source type for this source, which is Prompt. Required. Prompt source — inline + text provided by the user. + :vartype type: Literal[DataGenerationJobSourceType.PROMPT] + :ivar prompt: Inline prompt text (e.g., agent description, policy text, supplementary context). + Required. + :vartype prompt: str + """ + + description: str + """Optional description of what this source represents — helps the pipeline interpret its content + (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities').""" + type: Required[Literal[DataGenerationJobSourceType.PROMPT]] + """The source type for this source, which is Prompt. Required. Prompt source — inline text + provided by the user.""" + prompt: Required[str] + """Inline prompt text (e.g., agent description, policy text, supplementary context). Required.""" + + +class PromptEvaluatorGenerationJobSource(TypedDict, total=False): + """Prompt source for evaluator generation jobs — inline text provided by the user. + + :ivar description: Optional description of what this source represents — helps the pipeline + interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core + capabilities'). + :vartype description: str + :ivar type: The source type for this source, which is Prompt. Required. Prompt source — inline + text provided by the user. + :vartype type: Literal[EvaluatorGenerationJobSourceType.PROMPT] + :ivar prompt: Inline prompt text (e.g., agent description, policy text, supplementary context). + Required. + :vartype prompt: str + """ + + description: str + """Optional description of what this source represents — helps the pipeline interpret its content + (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities').""" + type: Required[Literal[EvaluatorGenerationJobSourceType.PROMPT]] + """The source type for this source, which is Prompt. Required. Prompt source — inline text + provided by the user.""" + prompt: Required[str] + """Inline prompt text (e.g., agent description, policy text, supplementary context). Required.""" + + +class ProtocolConfiguration(TypedDict, total=False): + """Per-protocol configuration for the agent endpoint. + + :ivar activity: Configuration for the activity protocol. + :vartype activity: "ActivityProtocolConfiguration" + :ivar responses: Configuration for the responses protocol. + :vartype responses: "ResponsesProtocolConfiguration" + :ivar a2a: Configuration for the A2A protocol. + :vartype a2a: "A2AProtocolConfiguration" + :ivar mcp: Configuration for the MCP protocol. + :vartype mcp: "McpProtocolConfiguration" + :ivar invocations: Configuration for the invocations protocol. + :vartype invocations: "InvocationsProtocolConfiguration" + :ivar invocations_ws: Configuration for the WebSocket-based invocations protocol. + :vartype invocations_ws: "InvocationsWsProtocolConfiguration" + """ + + activity: "ActivityProtocolConfiguration" + """Configuration for the activity protocol.""" + responses: "ResponsesProtocolConfiguration" + """Configuration for the responses protocol.""" + a2a: "A2AProtocolConfiguration" + """Configuration for the A2A protocol.""" + mcp: "McpProtocolConfiguration" + """Configuration for the MCP protocol.""" + invocations: "InvocationsProtocolConfiguration" + """Configuration for the invocations protocol.""" + invocations_ws: "InvocationsWsProtocolConfiguration" + """Configuration for the WebSocket-based invocations protocol.""" + + +class ProtocolVersionRecord(TypedDict, total=False): + """A record mapping for a single protocol and its version. + + :ivar protocol: The protocol type. Required. Known values are: "activity", "responses", "a2a", + "mcp", "invocations", and "invocations_ws". + :vartype protocol: Union[str, "AgentEndpointProtocol"] + :ivar version: The version string for the protocol, e.g. 'v0.1.1'. Required. + :vartype version: str + """ + + protocol: Required[Union[str, "AgentEndpointProtocol"]] + """The protocol type. Required. Known values are: \"activity\", \"responses\", \"a2a\", \"mcp\", + \"invocations\", and \"invocations_ws\".""" + version: Required[str] + """The version string for the protocol, e.g. 'v0.1.1'. Required.""" + + +class RaiConfig(TypedDict, total=False): + """Configuration for Responsible AI (RAI) content filtering and safety features. + + :ivar rai_policy_name: The name of the RAI policy to apply. Required. + :vartype rai_policy_name: str + """ + + rai_policy_name: Required[str] + """The name of the RAI policy to apply. Required.""" + + +class RankingOptions(TypedDict, total=False): + """RankingOptions. + + :ivar ranker: The ranker to use for the file search. Known values are: "auto" and + "default-2024-11-15". + :vartype ranker: Union[str, "RankerVersionType"] + :ivar score_threshold: The score threshold for the file search, a number between 0 and 1. + Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer + results. + :vartype score_threshold: float + :ivar hybrid_search: Weights that control how reciprocal rank fusion balances semantic + embedding matches versus sparse keyword matches when hybrid search is enabled. + :vartype hybrid_search: "HybridSearchOptions" + """ + + ranker: Union[str, "RankerVersionType"] + """The ranker to use for the file search. Known values are: \"auto\" and \"default-2024-11-15\".""" + score_threshold: float + """The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will + attempt to return only the most relevant results, but may return fewer results.""" + hybrid_search: "HybridSearchOptions" + """Weights that control how reciprocal rank fusion balances semantic embedding matches versus + sparse keyword matches when hybrid search is enabled.""" + + +class Reasoning(TypedDict, total=False): + """Reasoning. + + :ivar effort: Is one of the following types: Literal["none"], Literal["minimal"], + Literal["low"], Literal["medium"], Literal["high"], Literal["xhigh"] + :vartype effort: Literal["none", "minimal", "low", "medium", "high", "xhigh"] + :ivar summary: Is one of the following types: Literal["auto"], Literal["concise"], + Literal["detailed"] + :vartype summary: Literal["auto", "concise", "detailed"] + :ivar context: Is one of the following types: Literal["auto"], Literal["current_turn"], + Literal["all_turns"] + :vartype context: Literal["auto", "current_turn", "all_turns"] + :ivar generate_summary: Is one of the following types: Literal["auto"], Literal["concise"], + Literal["detailed"] + :vartype generate_summary: Literal["auto", "concise", "detailed"] + """ + + effort: Optional[Literal["none", "minimal", "low", "medium", "high", "xhigh"]] + """Is one of the following types: Literal[\"none\"], Literal[\"minimal\"], Literal[\"low\"], + Literal[\"medium\"], Literal[\"high\"], Literal[\"xhigh\"]""" + summary: Optional[Literal["auto", "concise", "detailed"]] + """Is one of the following types: Literal[\"auto\"], Literal[\"concise\"], Literal[\"detailed\"]""" + context: Optional[Literal["auto", "current_turn", "all_turns"]] + """Is one of the following types: Literal[\"auto\"], Literal[\"current_turn\"], + Literal[\"all_turns\"]""" + generate_summary: Optional[Literal["auto", "concise", "detailed"]] + """Is one of the following types: Literal[\"auto\"], Literal[\"concise\"], Literal[\"detailed\"]""" + + +class RecurrenceTrigger(TypedDict, total=False): + """Recurrence based trigger. + + :ivar type: Type of the trigger. Required. Recurrence based trigger. + :vartype type: Literal[TriggerType.RECURRENCE] + :ivar start_time: Start time for the recurrence schedule in ISO 8601 format. + :vartype start_time: str + :ivar end_time: End time for the recurrence schedule in ISO 8601 format. + :vartype end_time: str + :ivar time_zone: Time zone for the recurrence schedule. Defaults to ``UTC``. + :vartype time_zone: str + :ivar interval: Interval for the recurrence schedule. Required. + :vartype interval: int + :ivar schedule: Recurrence schedule for the recurrence trigger. Required. + :vartype schedule: "RecurrenceSchedule" + """ + + type: Required[Literal[TriggerType.RECURRENCE]] + """Type of the trigger. Required. Recurrence based trigger.""" + startTime: str + """Start time for the recurrence schedule in ISO 8601 format.""" + endTime: str + """End time for the recurrence schedule in ISO 8601 format.""" + timeZone: str + """Time zone for the recurrence schedule. Defaults to ``UTC``.""" + interval: Required[int] + """Interval for the recurrence schedule. Required.""" + schedule: Required["RecurrenceSchedule"] + """Recurrence schedule for the recurrence trigger. Required.""" + + +class RedTeam(TypedDict, total=False): + """Red team details. + + :ivar name: Identifier of the red team run. Required. + :vartype name: str + :ivar display_name: Name of the red-team run. + :vartype display_name: str + :ivar num_turns: Number of simulation rounds. + :vartype num_turns: int + :ivar attack_strategies: List of attack strategies or nested lists of attack strategies. + :vartype attack_strategies: list[Union[str, "AttackStrategy"]] + :ivar simulation_only: Simulation-only or Simulation + Evaluation. If ``true`` the scan outputs + conversation not evaluation result. The service defaults to ``false`` if a value is not + specified by the caller. + :vartype simulation_only: bool + :ivar risk_categories: List of risk categories to generate attack objectives for. + :vartype risk_categories: list[Union[str, "RiskCategory"]] + :ivar application_scenario: Application scenario for the red team operation, to generate + scenario specific attacks. + :vartype application_scenario: str + :ivar tags: Red team's tags. Unlike properties, tags are fully mutable. + :vartype tags: dict[str, str] + :ivar properties: Red team's properties. Unlike tags, properties are add-only. Once added, a + property cannot be removed. + :vartype properties: dict[str, str] + :ivar status: Status of the red-team. It is set by service and is read-only. + :vartype status: str + :ivar target: Target configuration for the red-team run. Required. + :vartype target: "RedTeamTargetConfig" + """ + + id: Required[str] + """Identifier of the red team run. Required.""" + displayName: str + """Name of the red-team run.""" + numTurns: int + """Number of simulation rounds.""" + attackStrategies: list[Union[str, "AttackStrategy"]] + """List of attack strategies or nested lists of attack strategies.""" + simulationOnly: bool + """Simulation-only or Simulation + Evaluation. If ``true`` the scan outputs conversation not + evaluation result. The service defaults to ``false`` if a value is not specified by the caller.""" + riskCategories: list[Union[str, "RiskCategory"]] + """List of risk categories to generate attack objectives for.""" + applicationScenario: str + """Application scenario for the red team operation, to generate scenario specific attacks.""" + tags: dict[str, str] + """Red team's tags. Unlike properties, tags are fully mutable.""" + properties: dict[str, str] + """Red team's properties. Unlike tags, properties are add-only. Once added, a property cannot be + removed.""" + status: str + """Status of the red-team. It is set by service and is read-only.""" + target: Required["RedTeamTargetConfig"] + """Target configuration for the red-team run. Required.""" + + +class ReminderPreviewToolboxTool(TypedDict, total=False): + """A reminder tool stored in a toolbox. + + :ivar name: Optional user-defined name for this tool or configuration. + :vartype name: str + :ivar description: Optional user-defined description for this tool or configuration. + :vartype description: str + :ivar tool_configs: Per-tool configuration map. Keys are tool names or ``*`` (catch-all + default). Resolution order: exact tool name match takes priority over ``*``. Unknown tool names + are silently ignored at runtime. + :vartype tool_configs: dict[str, "ToolConfig"] + :ivar type: Required. REMINDER_PREVIEW. + :vartype type: Literal[ToolboxToolType.REMINDER_PREVIEW] + """ + + name: str + """Optional user-defined name for this tool or configuration.""" + description: str + """Optional user-defined description for this tool or configuration.""" + tool_configs: dict[str, "ToolConfig"] + """Per-tool configuration map. Keys are tool names or ``*`` (catch-all default). Resolution order: + exact tool name match takes priority over ``*``. Unknown tool names are silently ignored at + runtime.""" + type: Required[Literal[ToolboxToolType.REMINDER_PREVIEW]] + """Required. REMINDER_PREVIEW.""" + + +class ResponsesProtocolConfiguration(TypedDict, total=False): + """Configuration specific to the responses protocol.""" + + +class RubricBasedEvaluatorDefinition(TypedDict, total=False): + """Rubric-based evaluator definition — stores dimensions produced by the generate API. Used for + both quality and safety evaluators. + + :ivar init_parameters: The JSON schema (Draft 2020-12) for the evaluator's input parameters. + This includes parameters like type, properties, required. + :vartype init_parameters: dict[str, Any] + :ivar data_schema: The JSON schema (Draft 2020-12) for the evaluator's input data. This + includes parameters like type, properties, required. + :vartype data_schema: dict[str, Any] + :ivar metrics: List of output metrics produced by this evaluator. + :vartype metrics: dict[str, "EvaluatorMetric"] + :ivar type: Required. Rubric-based evaluator definition. Stores dimensions (the scoring + blueprint) for both quality and safety evaluators. Can be created via the generate API or + manually via createVersion. + :vartype type: Literal[EvaluatorDefinitionType.RUBRIC] + :ivar dimensions: The set of dimensions — the scoring blueprint used by the LLM judge. Quality + evaluators include a non-editable residual dimension with id 'general_quality' + (always_applicable: true); safety evaluators include 'general_policy_compliance'. Both use the + same Dimension structure. Required. + :vartype dimensions: list["Dimension"] + :ivar pass_threshold: Pass/fail threshold for the aggregate rubric score, on the same + normalized 0.0-1.0 scale as the emitted ``score``. When the runtime weighted average meets or + exceeds this value, the result is ``pass``. Defaults to 0.5 (equivalent to a raw 1-5 weighted + average of 3.0). The 'any dimension scored 1 → fail' rule still applies regardless of this + threshold. + :vartype pass_threshold: float + """ + + init_parameters: dict[str, Any] + """The JSON schema (Draft 2020-12) for the evaluator's input parameters. This includes parameters + like type, properties, required.""" + data_schema: dict[str, Any] + """The JSON schema (Draft 2020-12) for the evaluator's input data. This includes parameters like + type, properties, required.""" + metrics: dict[str, "EvaluatorMetric"] + """List of output metrics produced by this evaluator.""" + type: Required[Literal[EvaluatorDefinitionType.RUBRIC]] + """Required. Rubric-based evaluator definition. Stores dimensions (the scoring blueprint) for both + quality and safety evaluators. Can be created via the generate API or manually via + createVersion.""" + dimensions: Required[list["Dimension"]] + """The set of dimensions — the scoring blueprint used by the LLM judge. Quality evaluators include + a non-editable residual dimension with id 'general_quality' (always_applicable: true); safety + evaluators include 'general_policy_compliance'. Both use the same Dimension structure. + Required.""" + pass_threshold: float + """Pass/fail threshold for the aggregate rubric score, on the same normalized 0.0-1.0 scale as the + emitted ``score``. When the runtime weighted average meets or exceeds this value, the result is + ``pass``. Defaults to 0.5 (equivalent to a raw 1-5 weighted average of 3.0). The 'any dimension + scored 1 → fail' rule still applies regardless of this threshold.""" + + +class Schedule(TypedDict, total=False): + """Schedule model. + + :ivar schedule_id: Identifier of the schedule. Required. + :vartype schedule_id: str + :ivar display_name: Name of the schedule. + :vartype display_name: str + :ivar description: Description of the schedule. + :vartype description: str + :ivar enabled: Enabled status of the schedule. Required. + :vartype enabled: bool + :ivar provisioning_status: Provisioning status of the schedule. Known values are: "Creating", + "Updating", "Deleting", "Succeeded", and "Failed". + :vartype provisioning_status: Union[str, "ScheduleProvisioningStatus"] + :ivar trigger: Trigger for the schedule. Required. + :vartype trigger: "Trigger" + :ivar task: Task for the schedule. Required. + :vartype task: "ScheduleTask" + :ivar tags: Schedule's tags. Unlike properties, tags are fully mutable. + :vartype tags: dict[str, str] + :ivar properties: Schedule's properties. Unlike tags, properties are add-only. Once added, a + property cannot be removed. + :vartype properties: dict[str, str] + :ivar system_data: System metadata for the resource. Required. + :vartype system_data: dict[str, str] + """ + + id: Required[str] + """Identifier of the schedule. Required.""" + displayName: str + """Name of the schedule.""" + description: str + """Description of the schedule.""" + enabled: Required[bool] + """Enabled status of the schedule. Required.""" + provisioningStatus: Union[str, "ScheduleProvisioningStatus"] + """Provisioning status of the schedule. Known values are: \"Creating\", \"Updating\", + \"Deleting\", \"Succeeded\", and \"Failed\".""" + trigger: Required["Trigger"] + """Trigger for the schedule. Required.""" + task: Required["ScheduleTask"] + """Task for the schedule. Required.""" + tags: dict[str, str] + """Schedule's tags. Unlike properties, tags are fully mutable.""" + properties: dict[str, str] + """Schedule's properties. Unlike tags, properties are add-only. Once added, a property cannot be + removed.""" + systemData: Required[dict[str, str]] + """System metadata for the resource. Required.""" + + +class ScheduleRoutineTrigger(TypedDict, total=False): + """A recurring cron-based routine trigger. + + :ivar type: The trigger type. Required. A recurring cron-based trigger. + :vartype type: Literal[RoutineTriggerType.SCHEDULE] + :ivar cron_expression: A 5-field cron expression. The service enforces a minimum interval of + five minutes by default. Required. + :vartype cron_expression: str + :ivar time_zone: An IANA or Windows time zone identifier for the schedule. Required. + :vartype time_zone: str + """ + + type: Required[Literal[RoutineTriggerType.SCHEDULE]] + """The trigger type. Required. A recurring cron-based trigger.""" + cron_expression: Required[str] + """A 5-field cron expression. The service enforces a minimum interval of five minutes by default. + Required.""" + time_zone: Required[str] + """An IANA or Windows time zone identifier for the schedule. Required.""" + + +class SharepointGroundingToolParameters(TypedDict, total=False): + """The sharepoint grounding tool parameters. + + :ivar project_connections: The project connections attached to this tool. There can be a + maximum of 1 connection resource attached to the tool. + :vartype project_connections: list["ToolProjectConnection"] + """ + + project_connections: list["ToolProjectConnection"] + """The project connections attached to this tool. There can be a maximum of 1 connection resource + attached to the tool.""" + + +class SharepointPreviewTool(TypedDict, total=False): + """The input definition information for a sharepoint tool as used to configure an agent. + + :ivar type: The object type, which is always 'sharepoint_grounding_preview'. Required. + SHAREPOINT_GROUNDING_PREVIEW. + :vartype type: Literal[ToolType.SHAREPOINT_GROUNDING_PREVIEW] + :ivar sharepoint_grounding_preview: The sharepoint grounding tool parameters. Required. + :vartype sharepoint_grounding_preview: "SharepointGroundingToolParameters" + """ + + type: Required[Literal[ToolType.SHAREPOINT_GROUNDING_PREVIEW]] + """The object type, which is always 'sharepoint_grounding_preview'. Required. + SHAREPOINT_GROUNDING_PREVIEW.""" + sharepoint_grounding_preview: Required["SharepointGroundingToolParameters"] + """The sharepoint grounding tool parameters. Required.""" + + +class SimpleQnADataGenerationJobOptions(TypedDict, total=False): + """The options for a data generation job with SimpleQnA type. + + :ivar max_samples: Maximum number of samples to generate. Required. + :vartype max_samples: int + :ivar train_split: The proportion of the generated data to be used for training when the data + is used for fine-tuning. The rest will be used for validation. Value should be between 0 and 1. + :vartype train_split: float + :ivar model_options: The LLM model options. + :vartype model_options: "DataGenerationModelOptions" + :ivar type: The data generation job type, which is SimpleQnA for this model. Required. Simple + question and answers between user and agent. + :vartype type: Literal[DataGenerationJobType.SIMPLE_QNA] + :ivar question_types: The question types to generate. Used only for fine-tuning scenarios. + :vartype question_types: list[Union[str, "SimpleQnAFineTuningQuestionType"]] + """ + + max_samples: Required[int] + """Maximum number of samples to generate. Required.""" + train_split: float + """The proportion of the generated data to be used for training when the data is used for + fine-tuning. The rest will be used for validation. Value should be between 0 and 1.""" + model_options: "DataGenerationModelOptions" + """The LLM model options.""" + type: Required[Literal[DataGenerationJobType.SIMPLE_QNA]] + """The data generation job type, which is SimpleQnA for this model. Required. Simple question and + answers between user and agent.""" + question_types: list[Union[str, "SimpleQnAFineTuningQuestionType"]] + """The question types to generate. Used only for fine-tuning scenarios.""" + + +class SkillInlineContent(TypedDict, total=False): + """Inline content for defining a simple skill without uploading files. Follows the agentskills.io + SKILL.md specification. + + :ivar description: A human-readable description of what the skill does and when to use it. + Required. + :vartype description: str + :ivar instructions: The skill instructions in markdown format. This is the body content of the + SKILL.md file. Required. + :vartype instructions: str + :ivar license: License name or reference to a bundled license file. + :vartype license: str + :ivar compatibility: Environment requirements or compatibility notes for the skill. + :vartype compatibility: str + :ivar metadata: Arbitrary key-value metadata for additional properties. + :vartype metadata: dict[str, str] + :ivar allowed_tools: List of pre-approved tools the skill may use. Experimental. + :vartype allowed_tools: list[str] + """ + + description: Required[str] + """A human-readable description of what the skill does and when to use it. Required.""" + instructions: Required[str] + """The skill instructions in markdown format. This is the body content of the SKILL.md file. + Required.""" + license: str + """License name or reference to a bundled license file.""" + compatibility: str + """Environment requirements or compatibility notes for the skill.""" + metadata: dict[str, str] + """Arbitrary key-value metadata for additional properties.""" + allowed_tools: list[str] + """List of pre-approved tools the skill may use. Experimental.""" + + +class SkillReferenceParam(TypedDict, total=False): + """SkillReferenceParam. + + :ivar type: References a skill created with the /v1/skills endpoint. Required. SKILL_REFERENCE. + :vartype type: Literal[ContainerSkillType.SKILL_REFERENCE] + :ivar skill_id: The ID of the referenced skill. Required. + :vartype skill_id: str + :ivar version: Optional skill version. Use a positive integer or 'latest'. Omit for default. + :vartype version: str + """ + + type: Required[Literal[ContainerSkillType.SKILL_REFERENCE]] + """References a skill created with the /v1/skills endpoint. Required. SKILL_REFERENCE.""" + skill_id: Required[str] + """The ID of the referenced skill. Required.""" + version: str + """Optional skill version. Use a positive integer or 'latest'. Omit for default.""" + + +class SpecificApplyPatchParam(TypedDict, total=False): + """Specific apply patch tool choice. + + :ivar type: The tool to call. Always ``apply_patch``. Required. APPLY_PATCH. + :vartype type: Literal[ToolChoiceParamType.APPLY_PATCH] + """ + + type: Required[Literal[ToolChoiceParamType.APPLY_PATCH]] + """The tool to call. Always ``apply_patch``. Required. APPLY_PATCH.""" + + +class SpecificFunctionShellParam(TypedDict, total=False): + """Specific shell tool choice. + + :ivar type: The tool to call. Always ``shell``. Required. SHELL. + :vartype type: Literal[ToolChoiceParamType.SHELL] + """ + + type: Required[Literal[ToolChoiceParamType.SHELL]] + """The tool to call. Always ``shell``. Required. SHELL.""" + + +class StructuredInputDefinition(TypedDict, total=False): + """An structured input that can participate in prompt template substitutions and tool argument + binding. + + :ivar description: A human-readable description of the input. + :vartype description: str + :ivar default_value: The default value for the input if no run-time value is provided. + :vartype default_value: Any + :ivar schema: The JSON schema for the structured input (optional). + :vartype schema: dict[str, Any] + :ivar required: Whether the input property is required when the agent is invoked. The service + defaults to ``false`` if a value is not specified by the caller. + :vartype required: bool + """ + + description: str + """A human-readable description of the input.""" + default_value: Any + """The default value for the input if no run-time value is provided.""" + schema: dict[str, Any] + """The JSON schema for the structured input (optional).""" + required: bool + """Whether the input property is required when the agent is invoked. The service defaults to + ``false`` if a value is not specified by the caller.""" + + +class StructuredOutputDefinition(TypedDict, total=False): + """A structured output that can be produced by the agent. + + :ivar name: The name of the structured output. Required. + :vartype name: str + :ivar description: A description of the output to emit. Used by the model to determine when to + emit the output. Required. + :vartype description: str + :ivar schema: The JSON schema for the structured output. Required. + :vartype schema: dict[str, Any] + :ivar strict: Whether to enforce strict validation. Default ``true``. Required. + :vartype strict: bool + """ + + name: Required[str] + """The name of the structured output. Required.""" + description: Required[str] + """A description of the output to emit. Used by the model to determine when to emit the output. + Required.""" + schema: Required[dict[str, Any]] + """The JSON schema for the structured output. Required.""" + strict: Required[Optional[bool]] + """Whether to enforce strict validation. Default ``true``. Required.""" + + +class TaxonomyCategory(TypedDict, total=False): + """Taxonomy category definition. + + :ivar id: Unique identifier of the taxonomy category. Required. + :vartype id: str + :ivar name: Name of the taxonomy category. Required. + :vartype name: str + :ivar description: Description of the taxonomy category. + :vartype description: str + :ivar risk_category: Risk category associated with this taxonomy category. Required. Known + values are: "HateUnfairness", "Violence", "Sexual", "SelfHarm", "ProtectedMaterial", + "CodeVulnerability", "UngroundedAttributes", "ProhibitedActions", "SensitiveDataLeakage", and + "TaskAdherence". + :vartype risk_category: Union[str, "RiskCategory"] + :ivar sub_categories: List of taxonomy sub categories. Required. + :vartype sub_categories: list["TaxonomySubCategory"] + :ivar properties: Additional properties for the taxonomy category. + :vartype properties: dict[str, str] + """ + + id: Required[str] + """Unique identifier of the taxonomy category. Required.""" + name: Required[str] + """Name of the taxonomy category. Required.""" + description: str + """Description of the taxonomy category.""" + riskCategory: Required[Union[str, "RiskCategory"]] + """Risk category associated with this taxonomy category. Required. Known values are: + \"HateUnfairness\", \"Violence\", \"Sexual\", \"SelfHarm\", \"ProtectedMaterial\", + \"CodeVulnerability\", \"UngroundedAttributes\", \"ProhibitedActions\", + \"SensitiveDataLeakage\", and \"TaskAdherence\".""" + subCategories: Required[list["TaxonomySubCategory"]] + """List of taxonomy sub categories. Required.""" + properties: dict[str, str] + """Additional properties for the taxonomy category.""" + + +class TaxonomySubCategory(TypedDict, total=False): + """Taxonomy sub-category definition. + + :ivar id: Unique identifier of the taxonomy sub-category. Required. + :vartype id: str + :ivar name: Name of the taxonomy sub-category. Required. + :vartype name: str + :ivar description: Description of the taxonomy sub-category. + :vartype description: str + :ivar enabled: List of taxonomy items under this sub-category. Required. + :vartype enabled: bool + :ivar properties: Additional properties for the taxonomy sub-category. + :vartype properties: dict[str, str] + """ + + id: Required[str] + """Unique identifier of the taxonomy sub-category. Required.""" + name: Required[str] + """Name of the taxonomy sub-category. Required.""" + description: str + """Description of the taxonomy sub-category.""" + enabled: Required[bool] + """List of taxonomy items under this sub-category. Required.""" + properties: dict[str, str] + """Additional properties for the taxonomy sub-category.""" + + +class TelemetryConfig(TypedDict, total=False): + """Customer-supplied telemetry configuration for exporting container logs, traces, and metrics. + + :ivar endpoints: Customer-supplied telemetry export endpoint configurations. Required. + :vartype endpoints: list["TelemetryEndpoint"] + """ + + endpoints: Required[list["TelemetryEndpoint"]] + """Customer-supplied telemetry export endpoint configurations. Required.""" + + +class TextResponseFormatJsonObject(TypedDict, total=False): + """JSON object. + + :ivar type: The type of response format being defined. Always ``json_object``. Required. + JSON_OBJECT. + :vartype type: Literal[TextResponseFormatConfigurationType.JSON_OBJECT] + """ + + type: Required[Literal[TextResponseFormatConfigurationType.JSON_OBJECT]] + """The type of response format being defined. Always ``json_object``. Required. JSON_OBJECT.""" + + +class TextResponseFormatJsonSchema(TypedDict, total=False): + """JSON schema. + + :ivar type: The type of response format being defined. Always ``json_schema``. Required. + JSON_SCHEMA. + :vartype type: Literal[TextResponseFormatConfigurationType.JSON_SCHEMA] + :ivar description: A description of what the response format is for, used by the model to + determine how to respond in the format. + :vartype description: str + :ivar name: The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and + dashes, with a maximum length of 64. Required. + :vartype name: str + :ivar schema: Required. + :vartype schema: dict[str, Any] + :ivar strict: + :vartype strict: bool + """ + + type: Required[Literal[TextResponseFormatConfigurationType.JSON_SCHEMA]] + """The type of response format being defined. Always ``json_schema``. Required. JSON_SCHEMA.""" + description: str + """A description of what the response format is for, used by the model to determine how to respond + in the format.""" + name: Required[str] + """The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with + a maximum length of 64. Required.""" + schema: Required[dict[str, Any]] + """Required.""" + strict: Optional[bool] + + +class TextResponseFormatText(TypedDict, total=False): + """Text. + + :ivar type: The type of response format being defined. Always ``text``. Required. TEXT. + :vartype type: Literal[TextResponseFormatConfigurationType.TEXT] + """ + + type: Required[Literal[TextResponseFormatConfigurationType.TEXT]] + """The type of response format being defined. Always ``text``. Required. TEXT.""" + + +class TimerRoutineTrigger(TypedDict, total=False): + """A one-shot timer routine trigger. + + :ivar type: The trigger type. Required. A one-shot timer trigger. + :vartype type: Literal[RoutineTriggerType.TIMER] + :ivar at: The UTC date and time at which the timer fires. + :vartype at: int + """ + + type: Required[Literal[RoutineTriggerType.TIMER]] + """The trigger type. Required. A one-shot timer trigger.""" + at: int + """The UTC date and time at which the timer fires.""" + + +class ToolboxPolicies(TypedDict, total=False): + """Policy configuration for a toolbox, including content safety and other governance settings. + + :ivar rai_config: Responsible AI content filtering configuration. + :vartype rai_config: "RaiConfig" + """ + + rai_config: "RaiConfig" + """Responsible AI content filtering configuration.""" + + +class ToolboxSearchPreviewToolboxTool(TypedDict, total=False): + """A toolbox search tool stored in a toolbox. + + :ivar name: Optional user-defined name for this tool or configuration. + :vartype name: str + :ivar description: Optional user-defined description for this tool or configuration. + :vartype description: str + :ivar tool_configs: Per-tool configuration map. Keys are tool names or ``*`` (catch-all + default). Resolution order: exact tool name match takes priority over ``*``. Unknown tool names + are silently ignored at runtime. + :vartype tool_configs: dict[str, "ToolConfig"] + :ivar type: The type of the tool. Always ``toolbox_search_preview``. Required. + TOOLBOX_SEARCH_PREVIEW. + :vartype type: Literal[ToolboxToolType.TOOLBOX_SEARCH_PREVIEW] + """ + + name: str + """Optional user-defined name for this tool or configuration.""" + description: str + """Optional user-defined description for this tool or configuration.""" + tool_configs: dict[str, "ToolConfig"] + """Per-tool configuration map. Keys are tool names or ``*`` (catch-all default). Resolution order: + exact tool name match takes priority over ``*``. Unknown tool names are silently ignored at + runtime.""" + type: Required[Literal[ToolboxToolType.TOOLBOX_SEARCH_PREVIEW]] + """The type of the tool. Always ``toolbox_search_preview``. Required. TOOLBOX_SEARCH_PREVIEW.""" + + +class ToolboxSkillReference(TypedDict, total=False): + """A reference to an existing skill to include in a toolbox. + + :ivar type: The type of skill source. Required. Default value is "skill_reference". + :vartype type: Literal["skill_reference"] + :ivar name: The name of the skill. Required. + :vartype name: str + :ivar version: The version of the skill. If not specified, the skill's default version is used. + When a version is specified, the reference is pinned to that immutable version. + :vartype version: str + """ + + type: Required[Literal["skill_reference"]] + """The type of skill source. Required. Default value is \"skill_reference\".""" + name: Required[str] + """The name of the skill. Required.""" + version: str + """The version of the skill. If not specified, the skill's default version is used. When a version + is specified, the reference is pinned to that immutable version.""" + + +class ToolChoiceAllowed(TypedDict, total=False): + """Allowed tools. + + :ivar type: Allowed tool configuration type. Always ``allowed_tools``. Required. ALLOWED_TOOLS. + :vartype type: Literal[ToolChoiceParamType.ALLOWED_TOOLS] + :ivar mode: Constrains the tools available to the model to a pre-defined set. ``auto`` allows + the model to pick from among the allowed tools and generate a message. ``required`` requires + the model to call one or more of the allowed tools. Required. Is either a Literal["auto"] type + or a Literal["required"] type. + :vartype mode: Literal["auto", "required"] + :ivar tools: Required. A list of tool definitions that the model should be allowed to call. For + the Responses API, the list of tool definitions might look like: + + .. code-block:: json + + [ + { "type": "function", "name": "get_weather" }, + { "type": "mcp", "server_label": "deepwiki" }, + { "type": "image_generation" } + ] + :vartype tools: list[dict[str, Any]] + """ + + type: Required[Literal[ToolChoiceParamType.ALLOWED_TOOLS]] + """Allowed tool configuration type. Always ``allowed_tools``. Required. ALLOWED_TOOLS.""" + mode: Required[Literal["auto", "required"]] + """Constrains the tools available to the model to a pre-defined set. ``auto`` allows the model to + pick from among the allowed tools and generate a message. ``required`` requires the model to + call one or more of the allowed tools. Required. Is either a Literal[\"auto\"] type or a + Literal[\"required\"] type.""" + tools: Required[list[dict[str, Any]]] + """Required. A list of tool definitions that the model should be allowed to call. For the + Responses API, the list of tool definitions might look like: + + .. code-block:: json + + [ + { \"type\": \"function\", \"name\": \"get_weather\" }, + { \"type\": \"mcp\", \"server_label\": \"deepwiki\" }, + { \"type\": \"image_generation\" } + ]""" + + +class ToolChoiceCodeInterpreter(TypedDict, total=False): + """Indicates that the model should use a built-in tool to generate a response. `Learn more about + built-in tools `_. + + :ivar type: Required. CODE_INTERPRETER. + :vartype type: Literal[ToolChoiceParamType.CODE_INTERPRETER] + """ + + type: Required[Literal[ToolChoiceParamType.CODE_INTERPRETER]] + """Required. CODE_INTERPRETER.""" + + +class ToolChoiceComputer(TypedDict, total=False): + """Indicates that the model should use a built-in tool to generate a response. `Learn more about + built-in tools `_. + + :ivar type: Required. COMPUTER. + :vartype type: Literal[ToolChoiceParamType.COMPUTER] + """ + + type: Required[Literal[ToolChoiceParamType.COMPUTER]] + """Required. COMPUTER.""" + + +class ToolChoiceComputerUse(TypedDict, total=False): + """Indicates that the model should use a built-in tool to generate a response. `Learn more about + built-in tools `_. + + :ivar type: Required. COMPUTER_USE. + :vartype type: Literal[ToolChoiceParamType.COMPUTER_USE] + """ + + type: Required[Literal[ToolChoiceParamType.COMPUTER_USE]] + """Required. COMPUTER_USE.""" + + +class ToolChoiceComputerUsePreview(TypedDict, total=False): + """Indicates that the model should use a built-in tool to generate a response. `Learn more about + built-in tools `_. + + :ivar type: Required. COMPUTER_USE_PREVIEW. + :vartype type: Literal[ToolChoiceParamType.COMPUTER_USE_PREVIEW] + """ + + type: Required[Literal[ToolChoiceParamType.COMPUTER_USE_PREVIEW]] + """Required. COMPUTER_USE_PREVIEW.""" + + +class ToolChoiceCustom(TypedDict, total=False): + """Custom tool. + + :ivar type: For custom tool calling, the type is always ``custom``. Required. CUSTOM. + :vartype type: Literal[ToolChoiceParamType.CUSTOM] + :ivar name: The name of the custom tool to call. Required. + :vartype name: str + """ + + type: Required[Literal[ToolChoiceParamType.CUSTOM]] + """For custom tool calling, the type is always ``custom``. Required. CUSTOM.""" + name: Required[str] + """The name of the custom tool to call. Required.""" + + +class ToolChoiceFileSearch(TypedDict, total=False): + """Indicates that the model should use a built-in tool to generate a response. `Learn more about + built-in tools `_. + + :ivar type: Required. FILE_SEARCH. + :vartype type: Literal[ToolChoiceParamType.FILE_SEARCH] + """ + + type: Required[Literal[ToolChoiceParamType.FILE_SEARCH]] + """Required. FILE_SEARCH.""" + + +class ToolChoiceFunction(TypedDict, total=False): + """Function tool. + + :ivar type: For function calling, the type is always ``function``. Required. FUNCTION. + :vartype type: Literal[ToolChoiceParamType.FUNCTION] + :ivar name: The name of the function to call. Required. + :vartype name: str + """ + + type: Required[Literal[ToolChoiceParamType.FUNCTION]] + """For function calling, the type is always ``function``. Required. FUNCTION.""" + name: Required[str] + """The name of the function to call. Required.""" + + +class ToolChoiceImageGeneration(TypedDict, total=False): + """Indicates that the model should use a built-in tool to generate a response. `Learn more about + built-in tools `_. + + :ivar type: Required. IMAGE_GENERATION. + :vartype type: Literal[ToolChoiceParamType.IMAGE_GENERATION] + """ + + type: Required[Literal[ToolChoiceParamType.IMAGE_GENERATION]] + """Required. IMAGE_GENERATION.""" + + +class ToolChoiceMCP(TypedDict, total=False): + """MCP tool. + + :ivar type: For MCP tools, the type is always ``mcp``. Required. MCP. + :vartype type: Literal[ToolChoiceParamType.MCP] + :ivar server_label: The label of the MCP server to use. Required. + :vartype server_label: str + :ivar name: + :vartype name: str + """ + + type: Required[Literal[ToolChoiceParamType.MCP]] + """For MCP tools, the type is always ``mcp``. Required. MCP.""" + server_label: Required[str] + """The label of the MCP server to use. Required.""" + name: Optional[str] + + +class ToolChoiceWebSearchPreview(TypedDict, total=False): + """Indicates that the model should use a built-in tool to generate a response. `Learn more about + built-in tools `_. + + :ivar type: Required. WEB_SEARCH_PREVIEW. + :vartype type: Literal[ToolChoiceParamType.WEB_SEARCH_PREVIEW] + """ + + type: Required[Literal[ToolChoiceParamType.WEB_SEARCH_PREVIEW]] + """Required. WEB_SEARCH_PREVIEW.""" + + +class ToolChoiceWebSearchPreview20250311(TypedDict, total=False): + """Indicates that the model should use a built-in tool to generate a response. `Learn more about + built-in tools `_. + + :ivar type: Required. WEB_SEARCH_PREVIEW_2025_03_11. + :vartype type: Literal[ToolChoiceParamType.WEB_SEARCH_PREVIEW_2025_03_11] + """ + + type: Required[Literal[ToolChoiceParamType.WEB_SEARCH_PREVIEW_2025_03_11]] + """Required. WEB_SEARCH_PREVIEW_2025_03_11.""" + + +class ToolConfig(TypedDict, total=False): + """Per-tool configuration that controls tool visibility and search behavior. + + :ivar pin: When true, the tool is always included in agent context and visible in + ``tools/list``. When false (default), the tool is hidden from ``tools/list`` and only + discoverable via ``tool_search``. + :vartype pin: bool + :ivar additional_search_text: Additional text indexed for tool_search. Supplements the native + tool description to improve discoverability. Does not alter ``tools/list`` output. + :vartype additional_search_text: str + """ + + pin: bool + """When true, the tool is always included in agent context and visible in ``tools/list``. When + false (default), the tool is hidden from ``tools/list`` and only discoverable via + ``tool_search``.""" + additional_search_text: str + """Additional text indexed for tool_search. Supplements the native tool description to improve + discoverability. Does not alter ``tools/list`` output.""" + + +class ToolDescription(TypedDict, total=False): + """Description of a tool that can be used by an agent. + + :ivar name: The name of the tool. + :vartype name: str + :ivar description: A brief description of the tool's purpose. + :vartype description: str + """ + + name: str + """The name of the tool.""" + description: str + """A brief description of the tool's purpose.""" + + +class ToolProjectConnection(TypedDict, total=False): + """A project connection resource. + + :ivar project_connection_id: A project connection in a ToolProjectConnectionList attached to + this tool. Required. + :vartype project_connection_id: str + """ + + project_connection_id: Required[str] + """A project connection in a ToolProjectConnectionList attached to this tool. Required.""" + + +class ToolSearchToolParam(TypedDict, total=False): + """Tool search tool. + + :ivar type: The type of the tool. Always ``tool_search``. Required. TOOL_SEARCH. + :vartype type: Literal[ToolType.TOOL_SEARCH] + :ivar execution: Whether tool search is executed by the server or by the client. Known values + are: "server" and "client". + :vartype execution: Union[str, "ToolSearchExecutionType"] + :ivar description: + :vartype description: str + :ivar parameters: + :vartype parameters: "EmptyModelParam" + """ + + type: Required[Literal[ToolType.TOOL_SEARCH]] + """The type of the tool. Always ``tool_search``. Required. TOOL_SEARCH.""" + execution: Union[str, "ToolSearchExecutionType"] + """Whether tool search is executed by the server or by the client. Known values are: \"server\" + and \"client\".""" + description: Optional[str] + parameters: Optional["EmptyModelParam"] + + +class ToolUseFineTuningDataGenerationJobOptions(TypedDict, total=False): # pylint: disable=name-too-long + """The options for a data generation job with ToolUse type. Used only for fine-tuning scenarios. + + :ivar max_samples: Maximum number of samples to generate. Required. + :vartype max_samples: int + :ivar train_split: The proportion of the generated data to be used for training when the data + is used for fine-tuning. The rest will be used for validation. Value should be between 0 and 1. + :vartype train_split: float + :ivar model_options: The LLM model options. + :vartype model_options: "DataGenerationModelOptions" + :ivar type: The data generation job type, which is ToolUse for this model. Required. Tool + calling conversation between user and agent. + :vartype type: Literal[DataGenerationJobType.TOOL_USE] + """ + + max_samples: Required[int] + """Maximum number of samples to generate. Required.""" + train_split: float + """The proportion of the generated data to be used for training when the data is used for + fine-tuning. The rest will be used for validation. Value should be between 0 and 1.""" + model_options: "DataGenerationModelOptions" + """The LLM model options.""" + type: Required[Literal[DataGenerationJobType.TOOL_USE]] + """The data generation job type, which is ToolUse for this model. Required. Tool calling + conversation between user and agent.""" + + +class TracesDataGenerationJobOptions(TypedDict, total=False): + """The options for a data generation job with Traces type. + + :ivar max_samples: Maximum number of samples to generate. Required. + :vartype max_samples: int + :ivar train_split: The proportion of the generated data to be used for training when the data + is used for fine-tuning. The rest will be used for validation. Value should be between 0 and 1. + :vartype train_split: float + :ivar model_options: The LLM model options. + :vartype model_options: "DataGenerationModelOptions" + :ivar type: The data generation job type, which is Traces for this model. Required. Single turn + query and response from agent traces. + :vartype type: Literal[DataGenerationJobType.TRACES] + """ + + max_samples: Required[int] + """Maximum number of samples to generate. Required.""" + train_split: float + """The proportion of the generated data to be used for training when the data is used for + fine-tuning. The rest will be used for validation. Value should be between 0 and 1.""" + model_options: "DataGenerationModelOptions" + """The LLM model options.""" + type: Required[Literal[DataGenerationJobType.TRACES]] + """The data generation job type, which is Traces for this model. Required. Single turn query and + response from agent traces.""" + + +class TracesDataGenerationJobSource(TypedDict, total=False): + """Traces source for data generation jobs — conversation traces from Application Insights. + + :ivar description: Optional description of what this source represents — helps the pipeline + interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core + capabilities'). + :vartype description: str + :ivar type: The source type for this source, which is Traces. Required. Traces source — + conversation traces from Application Insights. + :vartype type: Literal[DataGenerationJobSourceType.TRACES] + :ivar agent_id: The unique agent ID used to filter traces. Provide either ``agent_id`` or + ``agent_name`` — at least one is required. + :vartype agent_id: str + :ivar agent_name: The agent name to fetch traces for. Provide either ``agent_id`` or + ``agent_name`` — at least one is required. + :vartype agent_name: str + :ivar agent_version: The agent version. If not specified, traces for ALL versions of the agent + are included within the time window. + :vartype agent_version: str + :ivar start_time: Start of the time window (Unix timestamp in seconds) for fetching traces. + Required. + :vartype start_time: int + :ivar end_time: End of the time window (Unix timestamp in seconds). Defaults to current time. + :vartype end_time: int + """ + + description: str + """Optional description of what this source represents — helps the pipeline interpret its content + (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities').""" + type: Required[Literal[DataGenerationJobSourceType.TRACES]] + """The source type for this source, which is Traces. Required. Traces source — conversation traces + from Application Insights.""" + agent_id: str + """The unique agent ID used to filter traces. Provide either ``agent_id`` or ``agent_name`` — at + least one is required.""" + agent_name: str + """The agent name to fetch traces for. Provide either ``agent_id`` or ``agent_name`` — at least + one is required.""" + agent_version: str + """The agent version. If not specified, traces for ALL versions of the agent are included within + the time window.""" + start_time: Required[int] + """Start of the time window (Unix timestamp in seconds) for fetching traces. Required.""" + end_time: int + """End of the time window (Unix timestamp in seconds). Defaults to current time.""" + + +class TracesEvaluatorGenerationJobSource(TypedDict, total=False): + """Traces source for evaluator generation jobs — conversation traces from Application Insights. + + :ivar description: Optional description of what this source represents — helps the pipeline + interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core + capabilities'). + :vartype description: str + :ivar type: The source type for this source, which is Traces. Required. Traces source — + conversation traces from Application Insights. + :vartype type: Literal[EvaluatorGenerationJobSourceType.TRACES] + :ivar agent_id: The unique agent ID used to filter traces. Provide either ``agent_id`` or + ``agent_name`` — at least one is required. + :vartype agent_id: str + :ivar agent_name: The agent name to fetch traces for. Provide either ``agent_id`` or + ``agent_name`` — at least one is required. + :vartype agent_name: str + :ivar agent_version: The agent version. If not specified, traces for ALL versions of the agent + are included within the time window. + :vartype agent_version: str + :ivar start_time: Start of the time window (Unix timestamp in seconds) for fetching traces. + Required. + :vartype start_time: int + :ivar end_time: End of the time window (Unix timestamp in seconds). Defaults to current time. + :vartype end_time: int + """ + + description: str + """Optional description of what this source represents — helps the pipeline interpret its content + (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities').""" + type: Required[Literal[EvaluatorGenerationJobSourceType.TRACES]] + """The source type for this source, which is Traces. Required. Traces source — conversation traces + from Application Insights.""" + agent_id: str + """The unique agent ID used to filter traces. Provide either ``agent_id`` or ``agent_name`` — at + least one is required.""" + agent_name: str + """The agent name to fetch traces for. Provide either ``agent_id`` or ``agent_name`` — at least + one is required.""" + agent_version: str + """The agent version. If not specified, traces for ALL versions of the agent are included within + the time window.""" + start_time: Required[int] + """Start of the time window (Unix timestamp in seconds) for fetching traces. Required.""" + end_time: int + """End of the time window (Unix timestamp in seconds). Defaults to current time.""" + + +class UpdateModelVersionRequest(TypedDict, total=False): + """Request body for updating a model version. Only description and tags can be modified. + + :ivar description: The asset description text. + :vartype description: str + :ivar tags: Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + """ + + description: str + """The asset description text.""" + tags: dict[str, str] + """Tag dictionary. Tags can be added, removed, and updated.""" + + +class UpdateToolboxRequest(TypedDict, total=False): + """UpdateToolboxRequest. + + :ivar default_version: The version identifier that the toolbox should point to. When set, the + toolbox's default version will resolve to this version instead of the latest. Required. + :vartype default_version: str + """ + + default_version: Required[str] + """The version identifier that the toolbox should point to. When set, the toolbox's default + version will resolve to this version instead of the latest. Required.""" + + +class VersionRefIndicator(TypedDict, total=False): + """Version indicator that references a specific agent version by name. + + :ivar type: Discriminator value for version_ref. Required. Direct reference to a specific agent + version. + :vartype type: Literal[VersionIndicatorType.VERSION_REF] + :ivar agent_version: The agent version identifier returned by the agent version APIs. Required. + :vartype agent_version: str + """ + + type: Required[Literal[VersionIndicatorType.VERSION_REF]] + """Discriminator value for version_ref. Required. Direct reference to a specific agent version.""" + agent_version: Required[str] + """The agent version identifier returned by the agent version APIs. Required.""" + + +class VersionSelector(TypedDict, total=False): + """VersionSelector. + + :ivar version_selection_rules: Required. + :vartype version_selection_rules: list["VersionSelectionRule"] + """ + + version_selection_rules: Required[list["VersionSelectionRule"]] + """Required.""" + + +class WebSearchApproximateLocation(TypedDict, total=False): + """Web search approximate location. + + :ivar type: The type of location approximation. Always ``approximate``. Required. Default value + is "approximate". + :vartype type: Literal["approximate"] + :ivar country: + :vartype country: str + :ivar region: + :vartype region: str + :ivar city: + :vartype city: str + :ivar timezone: + :vartype timezone: str + """ + + type: Required[Literal["approximate"]] + """The type of location approximation. Always ``approximate``. Required. Default value is + \"approximate\".""" + country: Optional[str] + region: Optional[str] + city: Optional[str] + timezone: Optional[str] + + +class WebSearchConfiguration(TypedDict, total=False): + """A web search configuration for bing custom search. + + :ivar project_connection_id: Project connection id for grounding with bing custom search. + Required. + :vartype project_connection_id: str + :ivar instance_name: Name of the custom configuration instance given to config. Required. + :vartype instance_name: str + """ + + project_connection_id: Required[str] + """Project connection id for grounding with bing custom search. Required.""" + instance_name: Required[str] + """Name of the custom configuration instance given to config. Required.""" + + +class WebSearchPreviewTool(TypedDict, total=False): + """Web search preview. + + :ivar type: The type of the web search tool. One of ``web_search_preview`` or + ``web_search_preview_2025_03_11``. Required. WEB_SEARCH_PREVIEW. + :vartype type: Literal[ToolType.WEB_SEARCH_PREVIEW] + :ivar user_location: + :vartype user_location: "ApproximateLocation" + :ivar search_context_size: High level guidance for the amount of context window space to use + for the search. One of ``low``, ``medium``, or ``high``. ``medium`` is the default. Known + values are: "low", "medium", and "high". + :vartype search_context_size: Union[str, "SearchContextSize"] + :ivar search_content_types: + :vartype search_content_types: list[Union[str, "SearchContentType"]] + """ + + type: Required[Literal[ToolType.WEB_SEARCH_PREVIEW]] + """The type of the web search tool. One of ``web_search_preview`` or + ``web_search_preview_2025_03_11``. Required. WEB_SEARCH_PREVIEW.""" + user_location: Optional["ApproximateLocation"] + search_context_size: Union[str, "SearchContextSize"] + """High level guidance for the amount of context window space to use for the search. One of + ``low``, ``medium``, or ``high``. ``medium`` is the default. Known values are: \"low\", + \"medium\", and \"high\".""" + search_content_types: list[Union[str, "SearchContentType"]] + + +class WebSearchTool(TypedDict, total=False): + """Web search. + + :ivar type: The type of the web search tool. One of ``web_search`` or + ``web_search_2025_08_26``. Required. WEB_SEARCH. + :vartype type: Literal[ToolType.WEB_SEARCH] + :ivar filters: + :vartype filters: "WebSearchToolFilters" + :ivar user_location: + :vartype user_location: "WebSearchApproximateLocation" + :ivar search_context_size: High level guidance for the amount of context window space to use + for the search. One of ``low``, ``medium``, or ``high``. ``medium`` is the default. Is one of + the following types: Literal["low"], Literal["medium"], Literal["high"] + :vartype search_context_size: Literal["low", "medium", "high"] + :ivar name: Deprecated. This property is deprecated and will be removed in a future version. + :vartype name: str + :ivar description: Deprecated. This property is deprecated and will be removed in a future + version. + :vartype description: str + :ivar tool_configs: Deprecated. This property is deprecated and will be removed in a future + version. + :vartype tool_configs: dict[str, "ToolConfig"] + :ivar custom_search_configuration: The project connections attached to this tool. There can be + a maximum of 1 connection resource attached to the tool. + :vartype custom_search_configuration: "WebSearchConfiguration" + """ + + type: Required[Literal[ToolType.WEB_SEARCH]] + """The type of the web search tool. One of ``web_search`` or ``web_search_2025_08_26``. Required. + WEB_SEARCH.""" + filters: Optional["WebSearchToolFilters"] + user_location: Optional["WebSearchApproximateLocation"] + search_context_size: Literal["low", "medium", "high"] + """High level guidance for the amount of context window space to use for the search. One of + ``low``, ``medium``, or ``high``. ``medium`` is the default. Is one of the following types: + Literal[\"low\"], Literal[\"medium\"], Literal[\"high\"]""" + name: str + """Deprecated. This property is deprecated and will be removed in a future version.""" + description: str + """Deprecated. This property is deprecated and will be removed in a future version.""" + tool_configs: dict[str, "ToolConfig"] + """Deprecated. This property is deprecated and will be removed in a future version.""" + custom_search_configuration: "WebSearchConfiguration" + """The project connections attached to this tool. There can be a maximum of 1 connection resource + attached to the tool.""" + + +class WebSearchToolboxTool(TypedDict, total=False): + """A web search tool stored in a toolbox. + + :ivar name: Optional user-defined name for this tool or configuration. + :vartype name: str + :ivar description: Optional user-defined description for this tool or configuration. + :vartype description: str + :ivar tool_configs: Per-tool configuration map. Keys are tool names or ``*`` (catch-all + default). Resolution order: exact tool name match takes priority over ``*``. Unknown tool names + are silently ignored at runtime. + :vartype tool_configs: dict[str, "ToolConfig"] + :ivar type: Required. WEB_SEARCH. + :vartype type: Literal[ToolboxToolType.WEB_SEARCH] + :ivar filters: + :vartype filters: "WebSearchToolFilters" + :ivar user_location: + :vartype user_location: "WebSearchApproximateLocation" + :ivar search_context_size: High level guidance for the amount of context window space to use + for the search. One of ``low``, ``medium``, or ``high``. ``medium`` is the default. Is one of + the following types: Literal["low"], Literal["medium"], Literal["high"] + :vartype search_context_size: Literal["low", "medium", "high"] + :ivar custom_search_configuration: The project connections attached to this tool. There can be + a maximum of 1 connection resource attached to the tool. + :vartype custom_search_configuration: "WebSearchConfiguration" + """ + + name: str + """Optional user-defined name for this tool or configuration.""" + description: str + """Optional user-defined description for this tool or configuration.""" + tool_configs: dict[str, "ToolConfig"] + """Per-tool configuration map. Keys are tool names or ``*`` (catch-all default). Resolution order: + exact tool name match takes priority over ``*``. Unknown tool names are silently ignored at + runtime.""" + type: Required[Literal[ToolboxToolType.WEB_SEARCH]] + """Required. WEB_SEARCH.""" + filters: Optional["WebSearchToolFilters"] + user_location: Optional["WebSearchApproximateLocation"] + search_context_size: Literal["low", "medium", "high"] + """High level guidance for the amount of context window space to use for the search. One of + ``low``, ``medium``, or ``high``. ``medium`` is the default. Is one of the following types: + Literal[\"low\"], Literal[\"medium\"], Literal[\"high\"]""" + custom_search_configuration: "WebSearchConfiguration" + """The project connections attached to this tool. There can be a maximum of 1 connection resource + attached to the tool.""" + + +class WebSearchToolFilters(TypedDict, total=False): + """WebSearchToolFilters. + + :ivar allowed_domains: + :vartype allowed_domains: list[str] + """ + + allowed_domains: Optional[list[str]] + + +class WeeklyRecurrenceSchedule(TypedDict, total=False): + """Weekly recurrence schedule. + + :ivar type: Weekly recurrence type. Required. Weekly recurrence pattern. + :vartype type: Literal[RecurrenceType.WEEKLY] + :ivar days_of_week: Days of the week for the recurrence schedule. Required. + :vartype days_of_week: list[Union[str, "DayOfWeek"]] + """ + + type: Required[Literal[RecurrenceType.WEEKLY]] + """Weekly recurrence type. Required. Weekly recurrence pattern.""" + daysOfWeek: Required[list[Union[str, "DayOfWeek"]]] + """Days of the week for the recurrence schedule. Required.""" + + +class WorkflowAgentDefinition(TypedDict, total=False): + """The workflow agent definition. + + :ivar rai_config: Configuration for Responsible AI (RAI) content filtering and safety features. + :vartype rai_config: "RaiConfig" + :ivar kind: Required. WORKFLOW. + :vartype kind: Literal[AgentKind.WORKFLOW] + :ivar workflow: The CSDL YAML definition of the workflow. + :vartype workflow: str + """ + + rai_config: "RaiConfig" + """Configuration for Responsible AI (RAI) content filtering and safety features.""" + kind: Required[Literal[AgentKind.WORKFLOW]] + """Required. WORKFLOW.""" + workflow: str + """The CSDL YAML definition of the workflow.""" + + +class WorkIQPreviewTool(TypedDict, total=False): + """A WorkIQ server-side tool. + + :ivar type: The object type, which is always 'work_iq_preview'. Required. WORK_IQ_PREVIEW. + :vartype type: Literal[ToolType.WORK_IQ_PREVIEW] + :ivar project_connection_id: The ID of the WorkIQ project connection. Required. + :vartype project_connection_id: str + """ + + type: Required[Literal[ToolType.WORK_IQ_PREVIEW]] + """The object type, which is always 'work_iq_preview'. Required. WORK_IQ_PREVIEW.""" + project_connection_id: Required[str] + """The ID of the WorkIQ project connection. Required.""" + + +class WorkIQPreviewToolboxTool(TypedDict, total=False): + """A WorkIQ tool stored in a toolbox. + + :ivar name: Optional user-defined name for this tool or configuration. + :vartype name: str + :ivar description: Optional user-defined description for this tool or configuration. + :vartype description: str + :ivar tool_configs: Per-tool configuration map. Keys are tool names or ``*`` (catch-all + default). Resolution order: exact tool name match takes priority over ``*``. Unknown tool names + are silently ignored at runtime. + :vartype tool_configs: dict[str, "ToolConfig"] + :ivar type: Required. WORK_IQ_PREVIEW. + :vartype type: Literal[ToolboxToolType.WORK_IQ_PREVIEW] + :ivar project_connection_id: The ID of the WorkIQ project connection. Required. + :vartype project_connection_id: str + """ + + name: str + """Optional user-defined name for this tool or configuration.""" + description: str + """Optional user-defined description for this tool or configuration.""" + tool_configs: dict[str, "ToolConfig"] + """Per-tool configuration map. Keys are tool names or ``*`` (catch-all default). Resolution order: + exact tool name match takes priority over ``*``. Unknown tool names are silently ignored at + runtime.""" + type: Required[Literal[ToolboxToolType.WORK_IQ_PREVIEW]] + """Required. WORK_IQ_PREVIEW.""" + project_connection_id: Required[str] + """The ID of the WorkIQ project connection. Required.""" + + +class CreateMemoryStoreRequest(TypedDict, total=False): + """CreateMemoryStoreRequest. + + :ivar name: The name of the memory store. Required. + :vartype name: str + :ivar description: A human-readable description of the memory store. + :vartype description: str + :ivar metadata: Arbitrary key-value metadata to associate with the memory store. + :vartype metadata: dict[str, str] + :ivar definition: The memory store definition. Required. + :vartype definition: "MemoryStoreDefinition" + """ + + name: Required[str] + """The name of the memory store. Required.""" + description: str + """A human-readable description of the memory store.""" + metadata: dict[str, str] + """Arbitrary key-value metadata to associate with the memory store.""" + definition: Required["MemoryStoreDefinition"] + """The memory store definition. Required.""" + + +class UpdateMemoryStoreRequest(TypedDict, total=False): + """UpdateMemoryStoreRequest. + + :ivar description: A human-readable description of the memory store. + :vartype description: str + :ivar metadata: Arbitrary key-value metadata to associate with the memory store. + :vartype metadata: dict[str, str] + """ + + description: str + """A human-readable description of the memory store.""" + metadata: dict[str, str] + """Arbitrary key-value metadata to associate with the memory store.""" + + +class SearchMemoriesRequest(TypedDict, total=False): + """SearchMemoriesRequest. + + :ivar scope: The namespace that logically groups and isolates memories, such as a user ID. + Required. + :vartype scope: str + :ivar items: Items for which to search for relevant memories. + :vartype items: list[dict[str, Any]] + :ivar previous_search_id: The unique ID of the previous search request, enabling incremental + memory search from where the last operation left off. + :vartype previous_search_id: str + :ivar options: Memory search options. + :vartype options: "MemorySearchOptions" + """ + + scope: Required[str] + """The namespace that logically groups and isolates memories, such as a user ID. Required.""" + items: list[dict[str, Any]] + """Items for which to search for relevant memories.""" + previous_search_id: str + """The unique ID of the previous search request, enabling incremental memory search from where the + last operation left off.""" + options: "MemorySearchOptions" + """Memory search options.""" + + +class UpdateMemoriesRequest(TypedDict, total=False): + """UpdateMemoriesRequest. + + :ivar scope: The namespace that logically groups and isolates memories, such as a user ID. + Required. + :vartype scope: str + :ivar items_property: Conversation items to be stored in memory. + :vartype items_property: list[dict[str, Any]] + :ivar previous_update_id: The unique ID of the previous update request, enabling incremental + memory updates from where the last operation left off. + :vartype previous_update_id: str + :ivar update_delay: Timeout period before processing the memory update in seconds. If a new + update request is received during this period, it will cancel the current request and reset the + timeout. Set to 0 to immediately trigger the update without delay. Defaults to 300 (5 minutes). + :vartype update_delay: int + """ + + scope: Required[str] + """The namespace that logically groups and isolates memories, such as a user ID. Required.""" + items: list[dict[str, Any]] + """Conversation items to be stored in memory.""" + previous_update_id: str + """The unique ID of the previous update request, enabling incremental memory updates from where + the last operation left off.""" + update_delay: int + """Timeout period before processing the memory update in seconds. If a new update request is + received during this period, it will cancel the current request and reset the timeout. Set to 0 + to immediately trigger the update without delay. Defaults to 300 (5 minutes).""" + + +class DeleteScopeRequest(TypedDict, total=False): + """DeleteScopeRequest. + + :ivar scope: The namespace that logically groups and isolates memories to delete, such as a + user ID. Required. + :vartype scope: str + """ + + scope: Required[str] + """The namespace that logically groups and isolates memories to delete, such as a user ID. + Required.""" + + +class CreateMemoryRequest(TypedDict, total=False): + """CreateMemoryRequest. + + :ivar scope: The namespace that logically groups and isolates memories, such as a user ID. + Required. + :vartype scope: str + :ivar content: The content of the memory. Required. + :vartype content: str + :ivar kind: The kind of the memory item. Required. Known values are: "user_profile", + "chat_summary", and "procedural". + :vartype kind: Union[str, "MemoryItemKind"] + """ + + scope: Required[str] + """The namespace that logically groups and isolates memories, such as a user ID. Required.""" + content: Required[str] + """The content of the memory. Required.""" + kind: Required[Union[str, "MemoryItemKind"]] + """The kind of the memory item. Required. Known values are: \"user_profile\", \"chat_summary\", + and \"procedural\".""" + + +class UpdateMemoryRequest(TypedDict, total=False): + """UpdateMemoryRequest. + + :ivar content: The updated content of the memory. Required. + :vartype content: str + """ + + content: Required[str] + """The updated content of the memory. Required.""" + + +class ListMemoriesRequest(TypedDict, total=False): + """ListMemoriesRequest. + + :ivar scope: The namespace that logically groups and isolates memories, such as a user ID. + Required. + :vartype scope: str + """ + + scope: Required[str] + """The namespace that logically groups and isolates memories, such as a user ID. Required.""" + + +class CreateOrUpdateRoutineRequest(TypedDict, total=False): + """CreateOrUpdateRoutineRequest. + + :ivar description: A human-readable description of the routine. + :vartype description: str + :ivar enabled: Whether the routine is enabled. + :vartype enabled: bool + :ivar triggers: The triggers configured for the routine. In v1, exactly one trigger entry is + supported. + :vartype triggers: dict[str, "RoutineTrigger"] + :ivar action: The action executed when the routine fires. + :vartype action: "RoutineAction" + """ + + description: str + """A human-readable description of the routine.""" + enabled: bool + """Whether the routine is enabled.""" + triggers: dict[str, "RoutineTrigger"] + """The triggers configured for the routine. In v1, exactly one trigger entry is supported.""" + action: "RoutineAction" + """The action executed when the routine fires.""" + + +class DispatchRoutineAsyncRequest(TypedDict, total=False): + """DispatchRoutineAsyncRequest. + + :ivar payload: A direct action-input override sent downstream when testing a routine. + :vartype payload: "RoutineDispatchPayload" + """ + + payload: "RoutineDispatchPayload" + """A direct action-input override sent downstream when testing a routine.""" + + +class UpdateSkillRequest(TypedDict, total=False): + """UpdateSkillRequest. + + :ivar default_version: The version identifier that the skill should point to. When set, the + skill's default version will resolve to this version instead of the latest. Required. + :vartype default_version: str + """ + + default_version: Required[str] + """The version identifier that the skill should point to. When set, the skill's default version + will resolve to this version instead of the latest. Required.""" + + +class CreateSkillVersionRequest(TypedDict, total=False): + """CreateSkillVersionRequest. + + :ivar inline_content: Inline skill content for simple skills without file uploads. + Foundry-specific extension. + :vartype inline_content: "SkillInlineContent" + :ivar default: Whether to set this version as the default. + :vartype default: bool + """ + + inline_content: "SkillInlineContent" + """Inline skill content for simple skills without file uploads. Foundry-specific extension.""" + default: bool + """Whether to set this version as the default.""" + + +class CreateAgentVersionRequest(TypedDict, total=False): + """CreateAgentVersionRequest. + + :ivar metadata: Set of 16 key-value pairs that can be attached to an object. This can be + useful for storing additional information about the object in a structured + format, and querying for objects via API or the dashboard. + + Keys are strings with a maximum length of 64 characters. Values are strings + with a maximum length of 512 characters. + :vartype metadata: dict[str, str] + :ivar description: A human-readable description of the agent. + :vartype description: str + :ivar definition: The agent definition. This can be a workflow, hosted agent, or a simple agent + definition. Required. + :vartype definition: "AgentDefinition" + :ivar blueprint_reference: The blueprint reference for the agent. + :vartype blueprint_reference: "AgentBlueprintReference" + :ivar draft: (Preview) Whether this agent version is a draft (candidate) rather than a release. + The service defaults to ``false`` if a value is not specified by the caller. Draft versions are + recorded but excluded from default 'latest' resolution and are not auto-promoted. + :vartype draft: bool + """ + + metadata: dict[str, str] + """Set of 16 key-value pairs that can be attached to an object. This can be + useful for storing additional information about the object in a structured + format, and querying for objects via API or the dashboard. + + Keys are strings with a maximum length of 64 characters. Values are strings + with a maximum length of 512 characters.""" + description: str + """A human-readable description of the agent.""" + definition: Required["AgentDefinition"] + """The agent definition. This can be a workflow, hosted agent, or a simple agent definition. + Required.""" + blueprint_reference: "AgentBlueprintReference" + """The blueprint reference for the agent.""" + draft: bool + """(Preview) Whether this agent version is a draft (candidate) rather than a release. The service + defaults to ``false`` if a value is not specified by the caller. Draft versions are recorded + but excluded from default 'latest' resolution and are not auto-promoted.""" + + +class CreateAgentVersionFromManifestRequest(TypedDict, total=False): + """CreateAgentVersionFromManifestRequest. + + :ivar metadata: Set of 16 key-value pairs that can be attached to an object. This can be + useful for storing additional information about the object in a structured + format, and querying for objects via API or the dashboard. + + Keys are strings with a maximum length of 64 characters. Values are strings + with a maximum length of 512 characters. + :vartype metadata: dict[str, str] + :ivar description: A human-readable description of the agent. + :vartype description: str + :ivar manifest_id: The manifest ID to import the agent version from. Required. + :vartype manifest_id: str + :ivar parameter_values: The inputs to the manifest that will result in a fully materialized + Agent. Required. + :vartype parameter_values: dict[str, Any] + """ + + metadata: dict[str, str] + """Set of 16 key-value pairs that can be attached to an object. This can be + useful for storing additional information about the object in a structured + format, and querying for objects via API or the dashboard. + + Keys are strings with a maximum length of 64 characters. Values are strings + with a maximum length of 512 characters.""" + description: str + """A human-readable description of the agent.""" + manifest_id: Required[str] + """The manifest ID to import the agent version from. Required.""" + parameter_values: Required[dict[str, Any]] + """The inputs to the manifest that will result in a fully materialized Agent. Required.""" + + +class PatchAgentObjectRequest(TypedDict, total=False): + """PatchAgentObjectRequest. + + :ivar agent_endpoint: The endpoint configuration for the agent. + :vartype agent_endpoint: "AgentEndpointConfig" + :ivar agent_card: Optional agent card for the agent. + :vartype agent_card: "AgentCard" + """ + + agent_endpoint: "AgentEndpointConfig" + """The endpoint configuration for the agent.""" + agent_card: "AgentCard" + """Optional agent card for the agent.""" + + +class CreateSessionRequest(TypedDict, total=False): + """CreateSessionRequest. + + :ivar agent_session_id: Optional caller-provided session ID. If specified, it must be unique + within the agent endpoint. Auto-generated if omitted. + :vartype agent_session_id: str + :ivar version_indicator: Determines which agent version backs the session. Required. + :vartype version_indicator: "VersionIndicator" + """ + + agent_session_id: str + """Optional caller-provided session ID. If specified, it must be unique within the agent endpoint. + Auto-generated if omitted.""" + version_indicator: Required["VersionIndicator"] + """Determines which agent version backs the session. Required.""" + + +class CreateToolboxVersionRequest(TypedDict, total=False): + """CreateToolboxVersionRequest. + + :ivar description: A human-readable description of the toolbox. + :vartype description: str + :ivar metadata: Arbitrary key-value metadata to associate with the toolbox. + :vartype metadata: dict[str, str] + :ivar tools: The list of tools to include in this version. Required. + :vartype tools: list["ToolboxTool"] + :ivar skills: The list of skill sources to include in this version. A skill reference specifies + a skill name and optionally a version. If version is omitted, the skill's default version is + used. + :vartype skills: list["ToolboxSkill"] + :ivar policies: Policy configuration for this toolbox version. + :vartype policies: "ToolboxPolicies" + """ + + description: str + """A human-readable description of the toolbox.""" + metadata: dict[str, str] + """Arbitrary key-value metadata to associate with the toolbox.""" + tools: Required[list["ToolboxTool"]] + """The list of tools to include in this version. Required.""" + skills: list["ToolboxSkill"] + """The list of skill sources to include in this version. A skill reference specifies a skill name + and optionally a version. If version is omitted, the skill's default version is used.""" + policies: "ToolboxPolicies" + """Policy configuration for this toolbox version.""" + + +class UpdateToolboxRequest1(TypedDict, total=False): + """UpdateToolboxRequest1. + + :ivar default_version: The version identifier that the toolbox should point to. When set, the + toolbox's default version will resolve to this version instead of the latest. Required. + :vartype default_version: str + """ + + default_version: Required[str] + """The version identifier that the toolbox should point to. When set, the toolbox's default + version will resolve to this version instead of the latest. Required.""" + + +Tool = Union[ + A2APreviewTool, + ApplyPatchToolParam, + AzureAISearchTool, + AzureFunctionTool, + BingCustomSearchPreviewTool, + BingGroundingTool, + BrowserAutomationPreviewTool, + CaptureStructuredOutputsTool, + CodeInterpreterTool, + ComputerTool, + ComputerUsePreviewTool, + CustomToolParam, + MicrosoftFabricPreviewTool, + FabricIQPreviewTool, + FileSearchTool, + FunctionTool, + ImageGenTool, + LocalShellToolParam, + MCPTool, + MemorySearchPreviewTool, + NamespaceToolParam, + OpenApiTool, + SharepointPreviewTool, + FunctionShellToolParam, + ToolSearchToolParam, + WebSearchTool, + WebSearchPreviewTool, + WorkIQPreviewTool, +] +ToolboxTool = Union[ + A2APreviewToolboxTool, + AzureAISearchToolboxTool, + BrowserAutomationPreviewToolboxTool, + CodeInterpreterToolboxTool, + FabricIQPreviewToolboxTool, + FileSearchToolboxTool, + MCPToolboxTool, + OpenApiToolboxTool, + ReminderPreviewToolboxTool, + ToolboxSearchPreviewToolboxTool, + WebSearchToolboxTool, + WorkIQPreviewToolboxTool, +] +AgentBlueprintReference = Union[ManagedAgentIdentityBlueprintReference] +InsightRequest = Union[ + AgentClusterInsightRequest, EvaluationComparisonInsightRequest, EvaluationRunClusterInsightRequest +] +InsightResult = Union[AgentClusterInsightResult, EvaluationComparisonInsightResult, EvaluationRunClusterInsightResult] +DataGenerationJobSource = Union[ + AgentDataGenerationJobSource, + FileDataGenerationJobSource, + PromptDataGenerationJobSource, + TracesDataGenerationJobSource, +] +AgentDefinition = Union[ExternalAgentDefinition, HostedAgentDefinition, PromptAgentDefinition, WorkflowAgentDefinition] +AgentEndpointAuthorizationScheme = Union[ + BotServiceAuthorizationScheme, + BotServiceRbacAuthorizationScheme, + BotServiceTenantAuthorizationScheme, + EntraAuthorizationScheme, +] +EvaluatorGenerationJobSource = Union[ + AgentEvaluatorGenerationJobSource, + DatasetEvaluatorGenerationJobSource, + PromptEvaluatorGenerationJobSource, + TracesEvaluatorGenerationJobSource, +] +EvaluationTaxonomyInput = Union[AgentTaxonomyInput] +EvaluationTarget = Union[AzureAIAgentTarget, AzureAIModelTarget] +Index = Union[AzureAISearchIndex, CosmosDBIndex, ManagedAzureAISearchIndex] +RedTeamTargetConfig = Union[AzureOpenAIModelConfiguration] +EvaluatorDefinition = Union[ + CodeBasedEvaluatorDefinition, + EndpointBasedEvaluatorDefinition, + PromptBasedEvaluatorDefinition, + RubricBasedEvaluatorDefinition, +] +FunctionShellToolParamEnvironment = Union[ + ContainerAutoParam, + FunctionShellToolParamEnvironmentContainerReferenceParam, + FunctionShellToolParamEnvironmentLocalEnvironmentParam, +] +ContainerNetworkPolicyParam = Union[ContainerNetworkPolicyAllowlistParam, ContainerNetworkPolicyDisabledParam] +ContainerSkill = Union[InlineSkillParam, SkillReferenceParam] +EvaluationRuleAction = Union[ContinuousEvaluationRuleAction, HumanEvaluationPreviewRuleAction] +Trigger = Union[CronTrigger, OneTimeTrigger, RecurrenceTrigger] +CustomToolParamFormat = Union[CustomGrammarFormatParam, CustomTextFormatParam] +RoutineTrigger = Union[CustomRoutineTrigger, GitHubIssueRoutineTrigger, ScheduleRoutineTrigger, TimerRoutineTrigger] +RecurrenceSchedule = Union[ + DailyRecurrenceSchedule, HourlyRecurrenceSchedule, MonthlyRecurrenceSchedule, WeeklyRecurrenceSchedule +] +DataGenerationJobOptions = Union[ + SimpleQnADataGenerationJobOptions, ToolUseFineTuningDataGenerationJobOptions, TracesDataGenerationJobOptions +] +DataGenerationJobOutput = Union[DatasetDataGenerationJobOutput, FileDataGenerationJobOutput] +DatasetVersion = Union[FileDatasetVersion, FolderDatasetVersion] +InsightSample = Union[EvaluationResultSample] +ScheduleTask = Union[EvaluationScheduleTask, InsightScheduleTask] +VersionSelectionRule = Union[FixedRatioVersionSelectionRule] +TelemetryEndpointAuth = Union[HeaderTelemetryEndpointAuth] +RoutineDispatchPayload = Union[InvokeAgentInvocationsApiDispatchPayload, InvokeAgentResponsesApiDispatchPayload] +RoutineAction = Union[InvokeAgentInvocationsApiRoutineAction, InvokeAgentResponsesApiRoutineAction] +MemoryStoreDefinition = Union[MemoryStoreDefaultDefinition] +OpenApiAuthDetails = Union[OpenApiAnonymousAuthDetails, OpenApiManagedAuthDetails, OpenApiProjectConnectionAuthDetails] +OptimizationDatasetInput = Union[OptimizationInlineDatasetInput, OptimizationReferenceDatasetInput] +TelemetryEndpoint = Union[OtlpTelemetryEndpoint] +ToolChoiceParam = Union[ + ToolChoiceAllowed, + SpecificApplyPatchParam, + ToolChoiceCodeInterpreter, + ToolChoiceComputer, + ToolChoiceComputerUse, + ToolChoiceComputerUsePreview, + ToolChoiceCustom, + ToolChoiceFileSearch, + ToolChoiceFunction, + ToolChoiceImageGeneration, + ToolChoiceMCP, + SpecificFunctionShellParam, + ToolChoiceWebSearchPreview, + ToolChoiceWebSearchPreview20250311, +] +TextResponseFormat = Union[TextResponseFormatJsonObject, TextResponseFormatJsonSchema, TextResponseFormatText] +ToolboxSkill = Union[ToolboxSkillReference] +VersionIndicator = Union[VersionRefIndicator] diff --git a/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_with_prompt_source.py b/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_with_prompt_source.py index 0230217a1d21..1f775d291c05 100644 --- a/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_with_prompt_source.py +++ b/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_with_prompt_source.py @@ -42,6 +42,7 @@ import os import time +from typing import Union from dotenv import load_dotenv from openai.types.eval_create_params import DataSourceConfigCustom @@ -51,6 +52,8 @@ InputMessagesTemplateTemplateEvalItem, SourceFileID, ) +from openai.types.evals.run_create_response import RunCreateResponse +from openai.types.evals.run_retrieve_response import RunRetrieveResponse from openai.types.responses.response_input_text_param import ResponseInputTextParam from azure.identity import DefaultAzureCredential @@ -231,7 +234,7 @@ def main() -> None: input_messages=input_message, model=model_name, ) - eval_run = openai_client.evals.runs.create( + eval_run: Union[RunCreateResponse, RunRetrieveResponse] = openai_client.evals.runs.create( eval_id=eval_object.id, name="generated-qna-evaluation-run", data_source=data_source, diff --git a/sdk/ai/azure-ai-projects/samples/evaluations/sample_eval_catalog.py b/sdk/ai/azure-ai-projects/samples/evaluations/sample_eval_catalog.py index 6eed731eb0e6..c5921531f15d 100644 --- a/sdk/ai/azure-ai-projects/samples/evaluations/sample_eval_catalog.py +++ b/sdk/ai/azure-ai-projects/samples/evaluations/sample_eval_catalog.py @@ -153,10 +153,11 @@ pprint(prompt_evaluator_latest) print("Updating code based evaluator version") - updated_evaluator = project_client.beta.evaluators.update_version( + # TODO: Remove this suppression once TypeSpec typing for EvaluatorVersion is fixed. + updated_evaluator = project_client.beta.evaluators.update_version( # type: ignore[call-overload] # pyright: ignore[reportCallIssue] name=code_evaluator.name, version=code_evaluator.version, - evaluator_version={ + evaluator_version={ # pyright: ignore[reportArgumentType] "categories": [EvaluatorCategory.SAFETY], "display_name": "my_custom_evaluator_updated", "description": "Custom evaluator description changed", diff --git a/sdk/ai/azure-ai-projects/samples/evaluations/sample_eval_catalog_code_based_evaluators.py b/sdk/ai/azure-ai-projects/samples/evaluations/sample_eval_catalog_code_based_evaluators.py index f1ffe187b7f0..15fc03eaa7d7 100644 --- a/sdk/ai/azure-ai-projects/samples/evaluations/sample_eval_catalog_code_based_evaluators.py +++ b/sdk/ai/azure-ai-projects/samples/evaluations/sample_eval_catalog_code_based_evaluators.py @@ -50,9 +50,10 @@ ): print("Creating a single evaluator version - Code based (json style)") - code_evaluator = project_client.beta.evaluators.create_version( + # TODO: Remove this suppression once TypeSpec typing for EvaluatorVersion is fixed. + code_evaluator = project_client.beta.evaluators.create_version( # type: ignore[call-overload] # pyright: ignore[reportCallIssue] name="my_custom_evaluator_code", - evaluator_version={ + evaluator_version={ # pyright: ignore[reportArgumentType] "name": "my_custom_evaluator_code", "categories": [EvaluatorCategory.QUALITY], "display_name": "my_custom_evaluator_code", diff --git a/sdk/ai/azure-ai-projects/samples/evaluations/sample_eval_catalog_prompt_based_evaluators.py b/sdk/ai/azure-ai-projects/samples/evaluations/sample_eval_catalog_prompt_based_evaluators.py index 77efc2d9c11e..ac3a403c7225 100644 --- a/sdk/ai/azure-ai-projects/samples/evaluations/sample_eval_catalog_prompt_based_evaluators.py +++ b/sdk/ai/azure-ai-projects/samples/evaluations/sample_eval_catalog_prompt_based_evaluators.py @@ -83,9 +83,10 @@ ): print("Creating a single evaluator version - Prompt based (json style)") - prompt_evaluator = project_client.beta.evaluators.create_version( + # TODO: Remove this suppression once TypeSpec typing for EvaluatorVersion is fixed. + prompt_evaluator = project_client.beta.evaluators.create_version( # type: ignore[call-overload] # pyright: ignore[reportCallIssue] name="my_custom_evaluator_prompt", - evaluator_version={ + evaluator_version={ # pyright: ignore[reportArgumentType] "name": "my_custom_evaluator_prompt", "categories": [EvaluatorCategory.QUALITY], "display_name": "my_custom_evaluator_prompt", diff --git a/sdk/ai/azure-ai-projects/samples/evaluations/sample_rubric_evaluator_generation_basic.py b/sdk/ai/azure-ai-projects/samples/evaluations/sample_rubric_evaluator_generation_basic.py index 98b97a79e171..f8278c861838 100644 --- a/sdk/ai/azure-ai-projects/samples/evaluations/sample_rubric_evaluator_generation_basic.py +++ b/sdk/ai/azure-ai-projects/samples/evaluations/sample_rubric_evaluator_generation_basic.py @@ -47,8 +47,7 @@ import time import uuid from datetime import datetime, timezone -from typing import cast - +from typing import cast, Union from dotenv import load_dotenv from openai.types.eval_create_params import DataSourceConfigCustom from openai.types.evals.create_eval_jsonl_run_data_source_param import ( @@ -56,6 +55,8 @@ SourceFileContent, SourceFileContentContent, ) +from openai.types.evals.run_create_response import RunCreateResponse +from openai.types.evals.run_retrieve_response import RunRetrieveResponse from azure.identity import DefaultAzureCredential from azure.ai.projects import AIProjectClient @@ -171,7 +172,7 @@ ) # 3. Run the evaluation against inline JSONL sample data. - eval_run = openai_client.evals.runs.create( + eval_run: Union[RunCreateResponse, RunRetrieveResponse] = openai_client.evals.runs.create( eval_id=eval_object.id, name=f"{evaluator.name}-run", metadata={"sample": "rubric_evaluator_generation_basic"}, diff --git a/sdk/ai/azure-ai-projects/samples/evaluations/sample_rubric_evaluator_generation_iterate.py b/sdk/ai/azure-ai-projects/samples/evaluations/sample_rubric_evaluator_generation_iterate.py index 5ab81435203d..ad037eeb9a52 100644 --- a/sdk/ai/azure-ai-projects/samples/evaluations/sample_rubric_evaluator_generation_iterate.py +++ b/sdk/ai/azure-ai-projects/samples/evaluations/sample_rubric_evaluator_generation_iterate.py @@ -163,9 +163,10 @@ ) # 3. Save the edited definition as v2. - v2 = project_client.beta.evaluators.create_version( + # TODO: Remove this suppression once TypeSpec typing for EvaluatorVersion is fixed. + v2 = project_client.beta.evaluators.create_version( # type: ignore[call-overload] # pyright: ignore[reportCallIssue] name=evaluator_name, - evaluator_version={ + evaluator_version={ # pyright: ignore[reportArgumentType] "name": evaluator_name, # Narrow each category to its enum value (the categories list is Union[str, EvaluatorCategory]). "categories": [c.value if isinstance(c, EvaluatorCategory) else c for c in v1.categories], diff --git a/sdk/ai/azure-ai-projects/samples/evaluations/sample_rubric_evaluator_manual.py b/sdk/ai/azure-ai-projects/samples/evaluations/sample_rubric_evaluator_manual.py index aab7a76eb131..4c90f8f3dc73 100644 --- a/sdk/ai/azure-ai-projects/samples/evaluations/sample_rubric_evaluator_manual.py +++ b/sdk/ai/azure-ai-projects/samples/evaluations/sample_rubric_evaluator_manual.py @@ -47,7 +47,7 @@ import time import uuid from datetime import datetime, timezone - +from typing import Union from dotenv import load_dotenv from openai.types.eval_create_params import DataSourceConfigCustom from openai.types.evals.create_eval_jsonl_run_data_source_param import ( @@ -55,6 +55,8 @@ SourceFileContent, SourceFileContentContent, ) +from openai.types.evals.run_create_response import RunCreateResponse +from openai.types.evals.run_retrieve_response import RunRetrieveResponse from azure.identity import DefaultAzureCredential from azure.ai.projects import AIProjectClient @@ -87,9 +89,10 @@ # Each dimension is scored independently on a 1-5 scale by an LLM judge at # evaluation time. `weight` (1-10) controls how strongly each dimension # contributes to the normalized aggregate score. - evaluator = project_client.beta.evaluators.create_version( + # TODO: Remove this suppression once TypeSpec typing for EvaluatorVersion is fixed. + evaluator = project_client.beta.evaluators.create_version( # type: ignore[call-overload] # pyright: ignore[reportCallIssue] name=evaluator_name, - evaluator_version={ + evaluator_version={ # pyright: ignore[reportArgumentType] "name": evaluator_name, "categories": [EvaluatorCategory.QUALITY], "display_name": "Reservation Quality (Manual)", @@ -165,7 +168,7 @@ ) # 3. Run the evaluation against inline JSONL sample data. - eval_run = openai_client.evals.runs.create( + eval_run: Union[RunCreateResponse, RunRetrieveResponse] = openai_client.evals.runs.create( eval_id=eval_object.id, name=f"{evaluator_name}-run", metadata={"sample": "evaluator_rubric_manual"}, diff --git a/sdk/ai/azure-ai-projects/samples/hosted_agents/sample_agent_user_identity_isolation.py b/sdk/ai/azure-ai-projects/samples/hosted_agents/sample_agent_user_identity_isolation.py index 83daa9486a28..d2384254bb6a 100644 --- a/sdk/ai/azure-ai-projects/samples/hosted_agents/sample_agent_user_identity_isolation.py +++ b/sdk/ai/azure-ai-projects/samples/hosted_agents/sample_agent_user_identity_isolation.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. diff --git a/sdk/ai/azure-ai-projects/tsp-location.yaml b/sdk/ai/azure-ai-projects/tsp-location.yaml index 0a2c8e8edb1d..b00b4dd0b34a 100644 --- a/sdk/ai/azure-ai-projects/tsp-location.yaml +++ b/sdk/ai/azure-ai-projects/tsp-location.yaml @@ -1,5 +1,5 @@ directory: specification/ai-foundry/data-plane/Foundry/src/sdk-python-js-azure-ai-projects -commit: 5c50b699e1066ef791ac65840f898cb868eac6bd +commit: fca510e0c031a185e189d35bc353b8e7254c150a repo: Azure/azure-rest-api-specs additionalDirectories: - specification/ai-foundry/data-plane/Foundry/src/agents From 939b4c3387d5ed6b3087200b9935603043e62388 Mon Sep 17 00:00:00 2001 From: Darren Cohen <39422044+dargilco@users.noreply.github.com> Date: Thu, 9 Jul 2026 07:55:04 -0700 Subject: [PATCH 06/15] Fix TypeSpec paths (#47959) --- sdk/ai/azure-ai-projects/tsp-location.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/ai/azure-ai-projects/tsp-location.yaml b/sdk/ai/azure-ai-projects/tsp-location.yaml index b00b4dd0b34a..b092360c07d2 100644 --- a/sdk/ai/azure-ai-projects/tsp-location.yaml +++ b/sdk/ai/azure-ai-projects/tsp-location.yaml @@ -17,9 +17,9 @@ additionalDirectories: - specification/ai-foundry/data-plane/Foundry/src/insights - specification/ai-foundry/data-plane/Foundry/src/memory-stores - specification/ai-foundry/data-plane/Foundry/src/models - - specification/ai-foundry/data-plane/Foundry/src/openai-conversations - - specification/ai-foundry/data-plane/Foundry/src/openai-evaluations - - specification/ai-foundry/data-plane/Foundry/src/openai-responses + - specification/ai-foundry/data-plane/Foundry/src/openai/conversations + - specification/ai-foundry/data-plane/Foundry/src/openai/evaluations + - specification/ai-foundry/data-plane/Foundry/src/openai/responses - specification/ai-foundry/data-plane/Foundry/src/red-teams - specification/ai-foundry/data-plane/Foundry/src/routines - specification/ai-foundry/data-plane/Foundry/src/schedules From 8932768dacf94dafdf11d1dc3bec305d1fcd9ad5 Mon Sep 17 00:00:00 2001 From: Howie Leung Date: Thu, 23 Jul 2026 15:29:56 -0700 Subject: [PATCH 07/15] Remove sample_agent_toolbox_skill.py per bakcned folks and Linda request, add new hosted agent samples for Teams message trigger and reminder preview (#48234) * Remove sample_agent_toolbox_skill.py per bakcned folks and Linda request, add new hosted agent samples for Teams message trigger and reminder preview * change log --- sdk/ai/azure-ai-projects/CHANGELOG.md | 7 +- .../tools/sample_agent_toolbox_skill.py | 155 ------------- .../assets/toolbox-agent/main.py | 22 +- .../assets/toolbox-agent/requirements.txt | 4 +- .../samples/hosted_agents/rbac_util.py | 132 +++++++++++ ...ple_routines_with_teams_message_trigger.py | 212 ++++++++++++++++++ .../sample_toolbox_with_reminder_preview.py | 183 +++++++++++++++ .../sample_toolbox_with_skill.py | 46 ++-- .../tests/samples/test_samples.py | 11 +- 9 files changed, 564 insertions(+), 208 deletions(-) delete mode 100644 sdk/ai/azure-ai-projects/samples/agents/tools/sample_agent_toolbox_skill.py create mode 100644 sdk/ai/azure-ai-projects/samples/hosted_agents/rbac_util.py create mode 100644 sdk/ai/azure-ai-projects/samples/hosted_agents/sample_routines_with_teams_message_trigger.py create mode 100644 sdk/ai/azure-ai-projects/samples/hosted_agents/sample_toolbox_with_reminder_preview.py diff --git a/sdk/ai/azure-ai-projects/CHANGELOG.md b/sdk/ai/azure-ai-projects/CHANGELOG.md index e2443a81cc6a..024d828ea590 100644 --- a/sdk/ai/azure-ai-projects/CHANGELOG.md +++ b/sdk/ai/azure-ai-projects/CHANGELOG.md @@ -17,11 +17,14 @@ ### Sample updates * Added new Hosted Agent sample `sample_agent_user_identity_isolation.py` under `samples/hosted_agents/`, demonstrating per-user response-chain isolation with delegated end-user identities sent in the `x-ms-user-identity` header. +* Added new Hosted Agent routine samples `sample_routines_with_github_issue_trigger.py` and `sample_routines_with_teams_message_trigger.py`, demonstrating GitHub issue and Microsoft Teams channel-message triggers for routines backed by a temporary Hosted Agent version. +* Added new Hosted Agent sample `sample_toolbox_with_reminder_preview.py` under `samples/hosted_agents/`, demonstrating a Reminder Preview toolbox tool wired through a Foundry Toolbox MCP endpoint. * Updated Hosted Agent toolbox asset `samples/hosted_agents/assets/toolbox-agent/main.py` to use `FoundryToolbox` and `as_skills_provider()` for toolbox MCP skill discovery and wiring, replacing the earlier manual MCP session, auth, and HTTP client setup. * Renamed the Hosted Agent image-based creation samples from `sample_create_hosted_agent.py` and `sample_create_hosted_agent_async.py` to `sample_create_hosted_agent_from_image.py` and `sample_create_hosted_agent_from_image_async.py`. +* Relocated Hosted Agent routine trigger samples `sample_routines_with_dispatch.py`, `sample_routines_with_schedule_trigger.py`, and `sample_routines_with_timer_trigger.py` from `samples/routines/` to `samples/hosted_agents/`. * Removed Hosted Agent endpoint samples `sample_agent_endpoint.py` and `sample_agent_endpoint_async.py`. -* Updated Hosted Agent samples to remove sample-level RBAC assignment/setup flows. -* Updated Hosted Agent samples to deploy Hosted Agents by creating a temporary Hosted Agent version for execution flows, then restoring the endpoint and deleting that version during cleanup. +* Removed prompt-agent toolbox skill sample `samples/agents/tools/sample_agent_toolbox_skill.py` because skill-in-toolbox is not yet supported in Prompt Agents. +* Updated Hosted Agent toolbox samples to create temporary Hosted Agent versions for execution flows, assign Azure AI User RBAC before invoking Toolbox MCP endpoints, restore the prior endpoint, and clean up temporary resources during teardown. ## 2.3.0 (2026-07-01) diff --git a/sdk/ai/azure-ai-projects/samples/agents/tools/sample_agent_toolbox_skill.py b/sdk/ai/azure-ai-projects/samples/agents/tools/sample_agent_toolbox_skill.py deleted file mode 100644 index f4e0e7de9e38..000000000000 --- a/sdk/ai/azure-ai-projects/samples/agents/tools/sample_agent_toolbox_skill.py +++ /dev/null @@ -1,155 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ - -""" -DESCRIPTION: - This sample demonstrates how to expose a Skill to a Prompt Agent via a - Toolbox, using the synchronous AIProjectClient and the OpenAI-compatible - client. - - It creates a Skill with inline content describing how to compute shipping - cost, then creates a Toolbox version that references the skill. A Prompt - Agent is created with an `MCPTool` pointed at the toolbox's versioned - `/mcp` endpoint. The skill's instructions are injected into the agent's - context, so when asked a shipping-cost question the agent answers directly - using the skill's formula. - - Skills are currently a preview features. In the Python SDK, - you access these operations via `project_client.beta.skills`. - -USAGE: - python sample_agent_toolbox_skill.py - - Before running the sample: - - pip install "azure-ai-projects>=2.3.0" python-dotenv openai - - Set these environment variables with your own values: - 1) FOUNDRY_PROJECT_ENDPOINT - The Azure AI Project endpoint, as found in the - Overview page of your Microsoft Foundry portal. - 2) FOUNDRY_MODEL_NAME - The deployment name of the AI model, as found under - the "Name" column in the "Models + endpoints" tab in your Microsoft - Foundry project. - 3) FOUNDRY_AGENT_NAME - Optional. The name of the AI agent. If not set, defaults to "MyAgent". -""" - -import os - -from dotenv import load_dotenv - -from azure.ai.projects.models._models import ToolboxSearchPreviewToolboxTool -from azure.core.exceptions import ResourceNotFoundError -from azure.identity import DefaultAzureCredential - -from azure.ai.projects import AIProjectClient -from azure.ai.projects.models import ( - MCPTool, - PromptAgentDefinition, - SkillInlineContent, - ToolboxSearchPreviewToolboxTool, - ToolboxSkillReference, -) -from util import create_version_with_endpoint - -load_dotenv() - -endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"] - -SKILL_NAME = "shipping-cost-skill" -TOOLBOX_NAME = "toolbox_with_skill" -agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent") - - -with ( - DefaultAzureCredential() as credential, - AIProjectClient(endpoint=endpoint, credential=credential) as project_client, - project_client.get_openai_client(agent_name=agent_name) as openai_client, -): - - try: - project_client.toolboxes.delete(TOOLBOX_NAME) - except ResourceNotFoundError: - pass - - try: - project_client.beta.skills.delete(SKILL_NAME) - except ResourceNotFoundError: - pass - - skill_version = project_client.beta.skills.create( - name=SKILL_NAME, - inline_content=SkillInlineContent( - description="Compute shipping cost for a package given weight and destination.", - instructions=( - "You are a shipping cost calculator. When asked to compute " - "shipping cost, use this formula: cost (USD) = 5 + 2 * weight_kg " - "for domestic destinations, and cost (USD) = 15 + 4 * weight_kg " - "for international destinations. Always state the formula you used." - ), - metadata={"revision": "1"}, - ), - ) - print(f"Created skill: {skill_version.name} version={skill_version.version}") - - toolbox_version = project_client.toolboxes.create_version( - name=TOOLBOX_NAME, - description="Toolbox exposing a shipping-cost skill.", - tools=[ToolboxSearchPreviewToolboxTool()], - skills=[ToolboxSkillReference(name=skill_version.name, version=skill_version.version)], - ) - print(f"Created toolbox: {toolbox_version.name} version={toolbox_version.version}") - - toolbox_mcp_url = f"{endpoint}/toolboxes/{TOOLBOX_NAME}/versions/{toolbox_version.version}/mcp?api-version=v1" - token = credential.get_token("https://ai.azure.com/.default").token - - toolbox_mcp_tool = MCPTool( - server_label="skill-toolbox", - server_url=toolbox_mcp_url, - authorization=token, - require_approval="never", - ) - - with create_version_with_endpoint( - project_client=project_client, - agent_name=agent_name, - definition=PromptAgentDefinition( - model=os.environ["FOUNDRY_MODEL_NAME"], - instructions=( - "Answer the user using the `shipping-cost-skill` instructions " - "available in your context. Do not call `tool_search`; the " - "skill rules are already part of your knowledge. Apply the " - "skill's formula exactly as given and state the formula in " - "your answer." - ), - temperature=0, - tools=[toolbox_mcp_tool], - ), - ) as agent: - - user_input = "Compute the shipping cost for a 3 kg package shipped domestically." - print(f"User: {user_input}") - response = openai_client.responses.create( - input=user_input, - ) - - for item in response.output: - if item.type == "mcp_list_tools": - print(f"mcp_list_tools server_label={item.server_label} tools={[t.name for t in (item.tools or [])]}") - elif item.type == "mcp_call": - print(f"mcp_call server_label={item.server_label} name={item.name} error={item.error}") - if getattr(item, "output", None): - print(f" output: {item.output}") - elif item.type == "mcp_approval_request": - print(f"mcp_approval_request server_label={item.server_label} name={item.name}") - else: - print(f"output item type={item.type}") - - print(f"Response: {response.output_text}") - - project_client.toolboxes.delete(TOOLBOX_NAME) - print("Toolbox deleted") - project_client.beta.skills.delete(SKILL_NAME) - print("Skill deleted") diff --git a/sdk/ai/azure-ai-projects/samples/hosted_agents/assets/toolbox-agent/main.py b/sdk/ai/azure-ai-projects/samples/hosted_agents/assets/toolbox-agent/main.py index 51ba81ad11b6..f0ba05195eca 100644 --- a/sdk/ai/azure-ai-projects/samples/hosted_agents/assets/toolbox-agent/main.py +++ b/sdk/ai/azure-ai-projects/samples/hosted_agents/assets/toolbox-agent/main.py @@ -9,42 +9,28 @@ from azure.identity import DefaultAzureCredential from dotenv import load_dotenv -# Load environment variables from .env file load_dotenv() async def main() -> None: credential = DefaultAzureCredential() - # FoundryToolbox resolves the toolbox endpoint from the environment - # (TOOLBOX_ENDPOINT, or FOUNDRY_PROJECT_ENDPOINT + TOOLBOX_NAME), authenticates - # every request with the credential, and forwards the platform per-request - # call-id. ``load_tools=False`` keeps the toolbox's tools hidden so only its - # Agent Skills (SEP-2640) are surfaced; passing it via ``tools=`` connects the - # MCP session that ``as_skills_provider()`` reads from. - toolbox = FoundryToolbox(url=os.environ["MCP_SERVER_URL"], credential=credential, load_tools=False) + toolbox = FoundryToolbox(url=os.environ["MCP_SERVER_URL"], credential=credential) - # as_skills_provider() discovers skills from skill://index.json on the toolbox - # MCP session and exposes them as an agent context provider; SKILL.md bodies are - # fetched on demand via resources/read. - skills_provider = toolbox.as_skills_provider() + # set disable_load_skill_approval to avoid approval required for loading skills + skills_provider = toolbox.as_skills_provider(disable_load_skill_approval=True) client = FoundryChatClient( project_endpoint=os.environ["FOUNDRY_PROJECT_ENDPOINT"], model=os.environ["FOUNDRY_MODEL_NAME"], credential=credential, + allow_preview=True, ) agent = Agent( client=client, - name=os.environ.get("AGENT_NAME", "hosted-toolbox-mcp-skills"), - instructions="You are a helpful assistant.", tools=toolbox, context_providers=[skills_provider], - # History will be managed by the hosting infrastructure, thus there - # is no need to store history by the service. Learn more at: - # https://developers.openai.com/api/reference/resources/responses/methods/create - default_options={"store": False}, ) server = ResponsesHostServer(agent) diff --git a/sdk/ai/azure-ai-projects/samples/hosted_agents/assets/toolbox-agent/requirements.txt b/sdk/ai/azure-ai-projects/samples/hosted_agents/assets/toolbox-agent/requirements.txt index 74e9d565df41..fd97a8982681 100644 --- a/sdk/ai/azure-ai-projects/samples/hosted_agents/assets/toolbox-agent/requirements.txt +++ b/sdk/ai/azure-ai-projects/samples/hosted_agents/assets/toolbox-agent/requirements.txt @@ -1,3 +1,3 @@ -agent-framework-foundry==1.10.0 -agent-framework-foundry-hosting>=1.0.0a260630 +agent-framework-foundry==1.10.2 +agent-framework-foundry-hosting==1.0.0b260721 python-dotenv diff --git a/sdk/ai/azure-ai-projects/samples/hosted_agents/rbac_util.py b/sdk/ai/azure-ai-projects/samples/hosted_agents/rbac_util.py new file mode 100644 index 000000000000..8e97fdaa09fd --- /dev/null +++ b/sdk/ai/azure-ai-projects/samples/hosted_agents/rbac_util.py @@ -0,0 +1,132 @@ +import os +import uuid +from typing import Any, cast +from urllib.parse import urlparse + +from azure.core.credentials import TokenCredential +from azure.core.exceptions import ResourceNotFoundError +from azure.ai.projects.models import AgentVersionDetails + +AZURE_AI_USER_ROLE_DEFINITION_GUID = "53ca6127-db72-4b80-b1b0-d745d6d5456d" + + +def _extract_resource_group_name(resource_id: str) -> str: + parts = resource_id.strip("/").split("/") + for index, part in enumerate(parts): + if part.lower() == "resourcegroups" and index + 1 < len(parts): + return parts[index + 1] + return "" + + +def _resolve_ai_account_resource_id( + credential: TokenCredential, + account_name: str, + project_name: str, + subscription_id: str, +) -> str: + from azure.mgmt.resource.resources import ResourceManagementClient + + resource_client = ResourceManagementClient(credential, subscription_id) + project_resources = resource_client.resources.list( + filter="resourceType eq 'Microsoft.CognitiveServices/accounts/projects'" + ) + + project_id_segment = f"/accounts/{account_name}/projects/{project_name}".lower() + matching_projects = [ + resource for resource in project_resources if resource.id and project_id_segment in resource.id.lower() + ] + if not matching_projects: + raise RuntimeError(f"Could not locate Foundry project '{project_name}' in subscription '{subscription_id}'.") + + if not matching_projects[0].id: + raise RuntimeError("Foundry project resource ID is empty.") + resource_group_name = _extract_resource_group_name(matching_projects[0].id) + account_resources = resource_client.resources.list_by_resource_group( + resource_group_name=resource_group_name, + filter="resourceType eq 'Microsoft.CognitiveServices/accounts'", + ) + + account_matches = [resource.id for resource in account_resources if resource.name == account_name and resource.id] + if not account_matches: + raise RuntimeError( + f"Could not locate Azure AI account '{account_name}' in resource group '{resource_group_name}'." + ) + return account_matches[0] + + +def _ensure_agent_identity_rbac_with_role_id( + credential: TokenCredential, principal_id: str, scope_resource_id: str, subscription_id: str, role_id: str +) -> tuple[bool, str]: + from azure.mgmt.authorization import AuthorizationManagementClient, models as authorization_models + + authorization_client = AuthorizationManagementClient(credential, subscription_id) + role_definition_id = f"/subscriptions/{subscription_id}/providers/Microsoft.Authorization/roleDefinitions/{role_id}" + role_assignment_name = str( + uuid.uuid5( + uuid.NAMESPACE_URL, + f"{scope_resource_id}|{principal_id}|{role_definition_id}", + ) + ) + + try: + authorization_client.role_assignments.get(scope_resource_id, role_assignment_name) + print(f"Foundry User role already assigned to principal {principal_id}.") + return False, role_assignment_name + except ResourceNotFoundError: + pass + + create_parameters_kwargs = cast( + dict[str, Any], + { + "role_definition_id": role_definition_id, + "principal_id": principal_id, + "principal_type": authorization_models.PrincipalType.SERVICE_PRINCIPAL, + }, + ) + parameters = authorization_models.RoleAssignmentCreateParameters(**create_parameters_kwargs) + + authorization_client.role_assignments.create(scope_resource_id, role_assignment_name, parameters) + print(f"Assigned Foundry User role to principal {principal_id} at scope {scope_resource_id}.") + return True, role_assignment_name + + +def ensure_agent_identity_rbac( + agent: AgentVersionDetails, + credential: TokenCredential, + subscription_id: str, + foundry_project_endpoint: str, +) -> None: + """Ensure the hosted agent identity has Foundry User role on the Foundry account. + + :param agent: Agent version details containing ``instance_identity``. + :type agent: ~azure.ai.projects.models.AgentVersionDetails + :param credential: Credential used for Azure Resource Manager authorization calls. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Azure subscription ID containing the Foundry project/account. + :type subscription_id: str + :param foundry_project_endpoint: Foundry project endpoint in the format + ``https://.services.ai.azure.com/api/projects/``. + :type foundry_project_endpoint: str + :raises RuntimeError: If the agent identity principal ID is unavailable, or if the + account/project resources cannot be resolved. + :raises ~azure.core.exceptions.HttpResponseError: If role assignment creation fails + for reasons other than an existing assignment. + """ + if os.environ.get("SKIP_RBAC"): + print("Skipping RBAC setup.") + return + if not agent.instance_identity or not agent.instance_identity.principal_id: + raise RuntimeError("Agent instance_identity or principal_id is not available.") + principal_id = agent.instance_identity.principal_id + + account_name = urlparse(foundry_project_endpoint).hostname.split(".")[0] # type: ignore[union-attr] + project_name = foundry_project_endpoint.rstrip("/").split("/api/projects/")[1].split("/")[0] + scope_resource_id = _resolve_ai_account_resource_id(credential, account_name, project_name, subscription_id) + + _ensure_agent_identity_rbac_with_role_id( + credential=credential, + principal_id=principal_id, + scope_resource_id=scope_resource_id, + subscription_id=subscription_id, + role_id=AZURE_AI_USER_ROLE_DEFINITION_GUID, + ) diff --git a/sdk/ai/azure-ai-projects/samples/hosted_agents/sample_routines_with_teams_message_trigger.py b/sdk/ai/azure-ai-projects/samples/hosted_agents/sample_routines_with_teams_message_trigger.py new file mode 100644 index 000000000000..e99fbd1c8091 --- /dev/null +++ b/sdk/ai/azure-ai-projects/samples/hosted_agents/sample_routines_with_teams_message_trigger.py @@ -0,0 +1,212 @@ +# pylint: disable=line-too-long,useless-suppression +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ + +""" +DESCRIPTION: + This sample demonstrates how to create a Routine that fires when a new + Microsoft Teams channel message arrives, then record the resulting runs by + polling `list_runs(...)` using the synchronous AIProjectClient. + + The sample uploads the basic hosted-agent code from `assets/basic-agent/` + as a temporary hosted-agent version, routes the configured hosted agent + name to that version, and creates a routine configured with a + `CustomRoutineTrigger`. The trigger uses a Teams-compatible custom + connection and listens for the `on_new_channel_message` event on a specific + Teams channel. After creating the routine, post a message to the configured + channel to fire it. The sample polls the routine run history for a short + period and then deletes the routine and hosted-agent version. + + Routines are currently a preview feature. In the Python SDK, you access + these operations via `project_client.beta.routines`. + +USAGE: + python sample_routines_with_teams_message_trigger.py + + Before running the sample: + + pip install "azure-ai-projects>=2.2.0" python-dotenv + + Set these environment variables with your own values: + 1) FOUNDRY_PROJECT_ENDPOINT - The Azure AI Project endpoint, as found in the Overview + page of your Microsoft Foundry portal. + 2) FOUNDRY_MODEL_NAME - The deployment name of the AI model used by the + temporary hosted agent. + 3) FOUNDRY_HOSTED_AGENT_NAME - Optional. The hosted agent name to route to + the temporary uploaded version. Defaults to `MyHostedAgent`. + 4) TEAMS_CONNECTION_NAME - The Teams custom connection ID or name. + Defaults to `teams-conn`. + 5) TEAMS_CHANNEL_URL - A Teams channel URL like the sample URL + below. When set, the sample derives `groupId` and `channelId` from it. + 6) POLL_INTERVAL_SECONDS - Optional. Seconds to sleep between run-history polls. + Defaults to 10. + + Sample channel: + https://teams.microsoft.com/l/channel//?groupId=&tenantId= +""" + +import json +import os +import time +from urllib.parse import parse_qs, unquote, urlparse + +from dotenv import load_dotenv + +from azure.core.exceptions import ResourceNotFoundError +from azure.identity import DefaultAzureCredential + +from azure.ai.projects import AIProjectClient +from azure.ai.projects.models import ( + CodeConfiguration, + CustomRoutineTrigger, + HostedAgentDefinition, + InvokeAgentResponsesApiRoutineAction, + ProtocolVersionRecord, + RoutineRun, +) + +from hosted_agents_util import create_version_from_code, select_basic_agent_code_zip + + +def parse_teams_channel_url(channel_url: str) -> tuple[str | None, str | None]: + parsed = urlparse(channel_url) + path_parts = [part for part in parsed.path.split("/") if part] + + channel_id = None + if len(path_parts) >= 3 and path_parts[0] == "l" and path_parts[1] == "channel": + channel_id = unquote(path_parts[2]) + + query = parse_qs(parsed.query) + group_id = query.get("groupId", [None])[0] + return group_id, channel_id + + +load_dotenv() + +endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"] +agent_name = os.environ.get("FOUNDRY_HOSTED_AGENT_NAME", "MyHostedAgent") +model_name = os.environ["FOUNDRY_MODEL_NAME"] +teams_connection_name = os.environ["TEAMS_CONNECTION_NAME"] +teams_channel_url = os.environ["TEAMS_CHANNEL_URL"] +teams_group_id, teams_channel_id = parse_teams_channel_url(teams_channel_url) +poll_interval_seconds = int(os.environ.get("POLL_INTERVAL_SECONDS", "10")) +use_remote_build = os.environ.get("FOUNDRY_HOSTED_AGENT_REMOTE_BUILD", "true").strip().lower() == "true" +dependency_resolution, code_zip_stream = select_basic_agent_code_zip(True) + + +def main() -> None: + with ( + code_zip_stream as code_stream, + DefaultAzureCredential() as credential, + AIProjectClient(endpoint=endpoint, credential=credential) as project_client, + create_version_from_code( + project_client=project_client, + agent_name=agent_name, + description="Teams channel routine sample hosted agent uploaded from assets/basic-agent.", + definition=HostedAgentDefinition( + cpu="0.5", + memory="1Gi", + code_configuration=CodeConfiguration( + runtime="python_3_14", + entry_point=["python", "main.py"], + dependency_resolution=dependency_resolution, + ), + environment_variables={ + "FOUNDRY_PROJECT_ENDPOINT": endpoint, + "FOUNDRY_MODEL_NAME": model_name, + }, + protocol_versions=[ + ProtocolVersionRecord(protocol="responses", version="2.0.0"), + ProtocolVersionRecord(protocol="invocations", version="2.0.0"), + ], + ), + metadata={"enableVnextExperience": "true"}, + code=code_stream, + ), + ): + routine_name = "sample-routine-teams-channel-message" + + print(f"Preparing routine `{routine_name}` for Teams channel {teams_channel_id}.") + print(f"Using Teams channel URL: {teams_channel_url}") + print({"group_id": teams_group_id, "channel_id": teams_channel_id}) + try: + print(f"Deleting any existing routine `{routine_name}`.") + project_client.beta.routines.delete(routine_name) + print(f"Routine `{routine_name}` deleted") + except ResourceNotFoundError: + pass + + print(f"Creating routine `{routine_name}`.") + created = project_client.beta.routines.create_or_update( + routine_name, + description="Routine used by the Teams channel message trigger sample.", + enabled=True, + triggers={ + "incoming": CustomRoutineTrigger( + provider="teams", + event_name="on_new_channel_message", + parameters={ + "connection_id": teams_connection_name, + "thread_type": "channel", + "group_id": teams_group_id, + "channel_id": teams_channel_id, + }, + ) + }, + action=InvokeAgentResponsesApiRoutineAction(agent_name=agent_name), + ) + print( + f"Created routine: {created.name} enabled={created.enabled} " + f"provider=teams event_name=on_new_channel_message group_id={teams_group_id}" + ) + print("Post a new message to the configured Teams channel to fire the routine.") + print("Waiting for a routine run for up to 10 minutes...") + + try: + seen_phases: dict[str, str] = {} + final_run: RoutineRun | None = None + run_was_triggered = False + terminal_statuses = {"finished", "failed", "killed"} + + deadline = time.monotonic() + 600 + while deadline > time.monotonic(): + runs = list(project_client.beta.routines.list_runs(routine_name, limit=20, order="desc")) + for run in runs: + run_was_triggered = True + current_phase = str(run.phase) + if seen_phases.get(run.id) == current_phase: + continue + seen_phases[run.id] = current_phase + print( + f" - run_id={run.id} phase={run.phase} status={run.status} " + f"trigger_type={run.trigger_type} triggered_at={run.triggered_at} ended_at={run.ended_at}" + ) + if str(run.status).lower() in terminal_statuses: + final_run = run + + if final_run is not None: + break + time.sleep(poll_interval_seconds) + + if final_run: + print("Final run:") + print(json.dumps(final_run.as_dict(), indent=2, default=str)) + print(f"The response Id is {final_run.response_id}") + elif run_was_triggered: + print("A routine run was observed, but no terminal run state was reached within the deadline.") + else: + print("No Teams-triggered run was observed within the deadline.") + except KeyboardInterrupt: + print("Interrupted by user; cleaning up routine before exiting.") + finally: + try: + project_client.beta.routines.delete(routine_name) + print("Routine deleted") + except ResourceNotFoundError: + pass + + +if __name__ == "__main__": + main() diff --git a/sdk/ai/azure-ai-projects/samples/hosted_agents/sample_toolbox_with_reminder_preview.py b/sdk/ai/azure-ai-projects/samples/hosted_agents/sample_toolbox_with_reminder_preview.py new file mode 100644 index 000000000000..9720e0c81978 --- /dev/null +++ b/sdk/ai/azure-ai-projects/samples/hosted_agents/sample_toolbox_with_reminder_preview.py @@ -0,0 +1,183 @@ +# pylint: disable=line-too-long,useless-suppression +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ + +""" +DESCRIPTION: + Create a Toolbox version that exposes a Reminder Preview tool over a + Foundry Toolbox MCP endpoint, then upload ``assets/toolbox-agent/`` as a + REMOTE_BUILD code asset for a Hosted Agent version. The sample waits for + the new version to become active, assigns Azure AI User RBAC to the hosted + agent identity on the Foundry account, temporarily routes the Hosted Agent + endpoint to that version, sends a reminder request through the Responses + API, queries routines to find the service-created one-shot routine, and + finally restores the previous endpoint and deletes the temporary agent + version and toolbox. + + The hosted agent must already exist; create it first with: + samples/hosted_agents/sample_create_hosted_agent_from_image.py + +USAGE: + python sample_toolbox_with_reminder_preview.py + + Before running the sample: + + pip install "azure-ai-projects>=2.3.0" azure-identity azure-mgmt-authorization azure-mgmt-resource python-dotenv + + Set these environment variables with your own values: + 1) FOUNDRY_PROJECT_ENDPOINT - The Azure AI Project endpoint, as found in the + Overview page of your Microsoft Foundry portal. + 2) FOUNDRY_MODEL_NAME - The deployment name of the AI model. + 3) FOUNDRY_HOSTED_AGENT_NAME - Optional. The Hosted Agent name. Defaults to + `MyHostedAgent`. The Hosted Agent must already exist. + 4) AZURE_SUBSCRIPTION_ID - The Azure subscription ID containing the + Foundry project/account. This is used to assign Azure AI User RBAC to + the hosted agent identity. +""" + +import os +import time +from pathlib import Path + +from dotenv import load_dotenv + +from azure.core.exceptions import ResourceNotFoundError +from azure.identity import DefaultAzureCredential + +from azure.ai.projects import AIProjectClient +from azure.ai.projects.models import ( + CodeConfiguration, + CodeDependencyResolution, + HostedAgentDefinition, + ProtocolVersionRecord, + ReminderPreviewToolboxTool, +) + +from hosted_agents_util import create_version_from_code +from rbac_util import ensure_agent_identity_rbac +from util import zip_directory + +load_dotenv() + +endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"] +model_name = os.environ["FOUNDRY_MODEL_NAME"] +subscription_id = os.environ["AZURE_SUBSCRIPTION_ID"] +agent_name = os.environ.get("FOUNDRY_HOSTED_AGENT_NAME", "MyHostedAgent") + +_HOSTED_AGENT_SOURCE_DIR = Path(__file__).parent / "assets" / "toolbox-agent" + + +TOOLBOX_NAME = "toolbox_with_reminder_preview" + + +def list_routine_names(project_client: AIProjectClient) -> set[str]: + routines = list(project_client.beta.routines.list()) + return {routine.name for routine in routines if routine.name} + + +def main() -> None: + created_routine_names: set[str] = set() + with ( + DefaultAzureCredential() as credential, + AIProjectClient(endpoint=endpoint, credential=credential) as project_client, + ): + try: + project_client.toolboxes.delete(TOOLBOX_NAME) + except ResourceNotFoundError: + pass + + toolbox_version = project_client.toolboxes.create_version( + name=TOOLBOX_NAME, + description="Toolbox exposing a reminder preview tool.", + tools=[ + ReminderPreviewToolboxTool( + name="reminder", + description="Schedule a reminder to re-invoke the agent after a short delay.", + ), + ], + metadata={"enableVnextExperience": "true"}, + ) + print(f"Created toolbox: {toolbox_version.name} version={toolbox_version.version}") + + toolbox_mcp_url = f"{endpoint}/toolboxes/{TOOLBOX_NAME}/versions/{toolbox_version.version}/mcp?api-version=v1" + + zip_filename = "hosted-toolbox-mcp-reminder-preview-agent.zip" + _, _, zip_path = zip_directory(_HOSTED_AGENT_SOURCE_DIR, zip_filename) + try: + with ( + zip_path.open("rb") as code_stream, + create_version_from_code( + project_client=project_client, + agent_name=agent_name, + description="Hosted agent code for toolbox MCP reminder preview tool.", + definition=HostedAgentDefinition( + cpu="0.5", + memory="1Gi", + code_configuration=CodeConfiguration( + runtime="python_3_13", + entry_point=["python", "main.py"], + dependency_resolution=CodeDependencyResolution.REMOTE_BUILD, + ), + environment_variables={ + "FOUNDRY_PROJECT_ENDPOINT": endpoint, + "FOUNDRY_MODEL_NAME": model_name, + "MCP_SERVER_URL": toolbox_mcp_url, + }, + protocol_versions=[ + ProtocolVersionRecord(protocol="responses", version="2.0.0"), + ProtocolVersionRecord(protocol="invocations", version="2.0.0"), + ], + ), + code=code_stream, + ) as agent, + project_client.get_openai_client(agent_name=agent_name) as hosted_openai_client, + ): + + # toolbox requires the hosted agent identity to have Foundry User RBAC on the Foundry account, so assign it here + ensure_agent_identity_rbac( + agent=agent, + credential=credential, + subscription_id=subscription_id, + foundry_project_endpoint=endpoint, + ) + + routines_before = list_routine_names(project_client) + + user_input = "Use the reminder tool to remind me in 1 minute to check the coffee." + print(f"User: {user_input}") + response = hosted_openai_client.responses.create( + input=user_input, + ) + + response_text = response.output_text or "" + print("Response:") + print(response_text.encode("utf-8", errors="replace").decode("utf-8")) + + print("Routines after scheduling the reminder:") + deadline = time.monotonic() + 30 + while time.monotonic() < deadline: + routines_after = list_routine_names(project_client) + created_routine_names = routines_after - routines_before + if created_routine_names: + break + print("No new routine found yet; checking again shortly...") + time.sleep(5) + + if created_routine_names: + print("Retrieved new routine details:") + for routine_name in sorted(created_routine_names): + routine = project_client.beta.routines.get(routine_name) + print(f" - {routine.name} enabled={routine.enabled} description={routine.description!r}") + else: + print( + "No new routine was visible in project_client.beta.routines.list() after scheduling the reminder." + ) + finally: + project_client.toolboxes.delete(TOOLBOX_NAME) + print("Toolbox deleted") + + +if __name__ == "__main__": + main() diff --git a/sdk/ai/azure-ai-projects/samples/hosted_agents/sample_toolbox_with_skill.py b/sdk/ai/azure-ai-projects/samples/hosted_agents/sample_toolbox_with_skill.py index e4f029489353..6a57288454f6 100644 --- a/sdk/ai/azure-ai-projects/samples/hosted_agents/sample_toolbox_with_skill.py +++ b/sdk/ai/azure-ai-projects/samples/hosted_agents/sample_toolbox_with_skill.py @@ -6,30 +6,21 @@ """ DESCRIPTION: - Demonstrates deploying a code-based Hosted Agent that discovers and uses - skills from a Foundry Toolbox MCP endpoint via Agent Framework - `FoundryToolbox()`. - - The sample: - 1. Creates a shipping-cost skill. - 2. Creates a toolbox version that references the skill. - 3. Packages ``assets/toolbox-agent/`` source as a zip at runtime - (REMOTE_BUILD - the service resolves dependencies from requirements.txt). - 4. Deploys a new Hosted Agent version, forwarding the project endpoint, - model name, and toolbox MCP URL to the hosted code. - 5. Waits for the version to become active. - 6. Sends a query to the agent via the Responses API. - 7. Cleans up created resources (agent version, toolbox, and skill). - - The hosted agent must already exist; create it first with: - samples/hosted_agents/sample_create_hosted_agent_from_image.py + Create a shipping-cost Skill and a Toolbox version that exposes it over a + Foundry Toolbox MCP endpoint, then upload ``assets/toolbox-agent/`` as a + REMOTE_BUILD code asset for a Hosted Agent version. The sample waits for + the new version to become active, assigns Azure AI User RBAC to the hosted + agent identity on the Foundry account, temporarily routes the Hosted Agent + endpoint to that version, sends a query through the Responses API, and + finally restores the previous endpoint and deletes the temporary agent + version, toolbox, and skill. USAGE: python sample_toolbox_with_skill.py Before running the sample: - pip install "azure-ai-projects>=2.3.0" python-dotenv + pip install "azure-ai-projects>=2.3.0" azure-identity azure-mgmt-authorization azure-mgmt-resource python-dotenv Set these environment variables with your own values: 1) FOUNDRY_PROJECT_ENDPOINT - The Azure AI Project endpoint, as found in the @@ -38,16 +29,15 @@ the "Name" column in the "Models + endpoints" tab in your Foundry project. 3) FOUNDRY_HOSTED_AGENT_NAME - Optional. The Hosted Agent name. Defaults to `MyHostedAgent`. The Hosted Agent must already exist. + 4) AZURE_SUBSCRIPTION_ID - The Azure subscription ID containing the + Foundry project/account. This is used to assign Azure AI User RBAC to + the hosted agent identity. """ import os import sys from pathlib import Path -_SAMPLES_DIR = Path(__file__).resolve().parents[1] -if str(_SAMPLES_DIR) not in sys.path: - sys.path.insert(0, str(_SAMPLES_DIR)) - from dotenv import load_dotenv from azure.identity import DefaultAzureCredential @@ -60,6 +50,7 @@ ) from hosted_agents_util import create_version_from_code +from rbac_util import ensure_agent_identity_rbac from util import zip_directory from azure.core.exceptions import ResourceNotFoundError @@ -73,6 +64,7 @@ endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"] model_name = os.environ["FOUNDRY_MODEL_NAME"] +subscription_id = os.environ["AZURE_SUBSCRIPTION_ID"] agent_name = os.environ.get("FOUNDRY_HOSTED_AGENT_NAME", "MyHostedAgent") _HOSTED_AGENT_SOURCE_DIR = Path(__file__).parent / "assets" / "toolbox-agent" @@ -147,10 +139,18 @@ def main() -> None: protocol_versions=[ProtocolVersionRecord(protocol="responses", version="2.0.0")], ), code=code_stream, - ), + ) as agent, project_client.get_openai_client(agent_name=agent_name) as hosted_openai_client, ): + # toolbox requires the hosted agent identity to have Foundry User RBAC on the Foundry account, so assign it here + ensure_agent_identity_rbac( + agent=agent, + credential=credential, + subscription_id=subscription_id, + foundry_project_endpoint=endpoint, + ) + user_input = "Compute the shipping cost for a 3 kg package shipped domestically." print(f"User: {user_input}") response = hosted_openai_client.responses.create(input=user_input) diff --git a/sdk/ai/azure-ai-projects/tests/samples/test_samples.py b/sdk/ai/azure-ai-projects/tests/samples/test_samples.py index 8d84a889a14c..24a9b8c707c6 100644 --- a/sdk/ai/azure-ai-projects/tests/samples/test_samples.py +++ b/sdk/ai/azure-ai-projects/tests/samples/test_samples.py @@ -270,13 +270,6 @@ def test_chat_completions_samples(self, sample_path: str, **kwargs) -> None: "ZIP_FILE_PATH": "tests/samples/assets/basic-agent.zip", }, ), - AdditionalSampleTestDetail( - test_id="sample_toolbox_with_skill", - sample_filename="sample_toolbox_with_skill.py", - env_vars={ - "ZIP_FILE_PATH": "tests/samples/assets/toolbox-agent.zip", - }, - ), AdditionalSampleTestDetail( test_id="sample_agent_user_identity_isolation", sample_filename="sample_agent_user_identity_isolation.py", @@ -293,7 +286,7 @@ def test_chat_completions_samples(self, sample_path: str, **kwargs) -> None: get_sample_paths( "hosted_agents", samples_to_skip=[ - "sample_toolbox_with_skill.py", # Specified through AdditionalSampleTestDetail + "sample_toolbox_with_skill.py", # Skip due to RBAC assignment that cannot be recorded "sample_create_hosted_agent_from_code.py", # Specified through AdditionalSampleTestDetail "sample_agent_user_identity_isolation.py", # Specified through AdditionalSampleTestDetail "sample_session_log_stream.py", # Specified through AdditionalSampleTestDetail @@ -303,6 +296,8 @@ def test_chat_completions_samples(self, sample_path: str, **kwargs) -> None: "sample_routines_with_schedule_trigger.py", # 500 "sample_routines_with_timer_trigger.py", # Timer is used causing request response not matched "sample_routines_with_github_issue_trigger.py", # Cannot run without interact on Github + "sample_routines_with_teams_message_trigger.py", # Cannot run without live Teams event + "sample_toolbox_with_reminder_preview.py", # Skip due to RBAC assignment that cannot be recorded ], ), ) From 02145d9927e43e2e86a2c8e2cef2244999fb6523 Mon Sep 17 00:00:00 2001 From: Darren Cohen <39422044+dargilco@users.noreply.github.com> Date: Fri, 24 Jul 2026 05:55:38 -0700 Subject: [PATCH 08/15] Re-emit from latest TypeSpec and do required updates (#48216) --- sdk/ai/azure-ai-projects/api.md | 3505 +------- sdk/ai/azure-ai-projects/api.metadata.yml | 2 +- .../azure-ai-projects/apiview-properties.json | 12 +- .../azure/ai/projects/_client.py | 2 + .../azure/ai/projects/_patch.py | 4 + .../azure/ai/projects/aio/_client.py | 2 + .../azure/ai/projects/aio/_patch.py | 4 + .../ai/projects/aio/operations/_operations.py | 1329 +-- .../aio/operations/_patch_agents_async.py | 35 +- .../_patch_evaluation_rules_async.py | 20 +- .../azure/ai/projects/models/__init__.py | 20 + .../azure/ai/projects/models/_enums.py | 84 + .../azure/ai/projects/models/_models.py | 430 +- .../ai/projects/operations/_operations.py | 1324 +-- .../ai/projects/operations/_patch_agents.py | 35 +- .../operations/_patch_evaluation_rules.py | 20 +- .../azure/ai/projects/types.py | 7201 ----------------- .../sample_optimization_job_basic.py | 60 +- .../sample_optimization_job_basic_async.py | 58 +- .../sample_optimization_job_basic_polling.py | 138 + ...le_optimization_job_basic_polling_async.py | 149 + .../sample_optimization_job_cancel.py | 16 +- .../samples/agents/sample_agent_basic.py | 1 + ...generation_job_simpleqna_for_finetuning.py | 39 +- ...eration_job_simpleqna_with_agent_source.py | 38 +- ...neration_job_simpleqna_with_file_source.py | 84 +- ...ration_job_simpleqna_with_prompt_source.py | 41 +- ...et_generation_job_traces_for_evaluation.py | 92 +- ...et_generation_job_traces_for_finetuning.py | 94 +- ...rubric_evaluator_generation_all_sources.py | 109 +- ...ample_rubric_evaluator_generation_basic.py | 33 +- ...ple_rubric_evaluator_generation_iterate.py | 26 +- ...e_rubric_evaluator_generation_lifecycle.py | 58 +- .../tests/samples/test_samples.py | 24 +- sdk/ai/azure-ai-projects/tsp-location.yaml | 6 +- 35 files changed, 2781 insertions(+), 12314 deletions(-) delete mode 100644 sdk/ai/azure-ai-projects/azure/ai/projects/types.py create mode 100644 sdk/ai/azure-ai-projects/samples/agents/optimization/sample_optimization_job_basic_polling.py create mode 100644 sdk/ai/azure-ai-projects/samples/agents/optimization/sample_optimization_job_basic_polling_async.py diff --git a/sdk/ai/azure-ai-projects/api.md b/sdk/ai/azure-ai-projects/api.md index a8fbf0817f68..01bda93d3556 100644 --- a/sdk/ai/azure-ai-projects/api.md +++ b/sdk/ai/azure-ai-projects/api.md @@ -9,6 +9,7 @@ namespace azure.ai.projects deployments: DeploymentsOperations evaluation_rules: EvaluationRulesOperations indexes: IndexesOperations + toolboxes: ToolboxesOperations def __init__( self, @@ -17,6 +18,7 @@ namespace azure.ai.projects *, allow_preview: bool = False, api_version: str = ..., + polling_interval: Optional[int] = ..., **kwargs: Any ) -> None: ... @@ -49,6 +51,7 @@ namespace azure.ai.projects.aio deployments: DeploymentsOperations evaluation_rules: EvaluationRulesOperations indexes: IndexesOperations + toolboxes: ToolboxesOperations def __init__( self, @@ -57,6 +60,7 @@ namespace azure.ai.projects.aio *, allow_preview: bool = False, api_version: str = ..., + polling_interval: Optional[int] = ..., **kwargs: Any ) -> None: ... @@ -104,7 +108,7 @@ namespace azure.ai.projects.aio.operations async def create_session( self, agent_name: str, - body: CreateSessionRequest, + body: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -138,7 +142,7 @@ namespace azure.ai.projects.aio.operations async def create_version( self, agent_name: str, - body: CreateAgentVersionRequest, + body: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -184,7 +188,7 @@ namespace azure.ai.projects.aio.operations async def create_version_from_manifest( self, agent_name: str, - body: CreateAgentVersionFromManifestRequest, + body: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -373,7 +377,7 @@ namespace azure.ai.projects.aio.operations async def update_details( self, agent_name: str, - body: PatchAgentObjectRequest, + body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any @@ -409,41 +413,41 @@ namespace azure.ai.projects.aio.operations **kwargs ) -> None: ... - @distributed_trace_async - async def cancel_optimization_job( - self, - job_id: str, - **kwargs: Any - ) -> OptimizationJob: ... - @overload - async def create_optimization_job( + async def begin_create_optimization_job( self, job: OptimizationJob, *, content_type: str = "application/json", operation_id: Optional[str] = ..., **kwargs: Any - ) -> OptimizationJob: ... + ) -> AsyncLROPoller[OptimizationJobResult]: ... @overload - async def create_optimization_job( + async def begin_create_optimization_job( self, - job: OptimizationJob, + job: JSON, *, content_type: str = "application/json", operation_id: Optional[str] = ..., **kwargs: Any - ) -> OptimizationJob: ... + ) -> AsyncLROPoller[OptimizationJobResult]: ... @overload - async def create_optimization_job( + async def begin_create_optimization_job( self, job: IO[bytes], *, content_type: str = "application/json", operation_id: Optional[str] = ..., **kwargs: Any + ) -> AsyncLROPoller[OptimizationJobResult]: ... + + @distributed_trace_async + async def cancel_optimization_job( + self, + job_id: str, + **kwargs: Any ) -> OptimizationJob: ... @distributed_trace_async @@ -481,41 +485,41 @@ namespace azure.ai.projects.aio.operations **kwargs ) -> None: ... - @distributed_trace_async - async def cancel_generation_job( - self, - job_id: str, - **kwargs: Any - ) -> DataGenerationJob: ... - @overload - async def create_generation_job( + async def begin_create_generation_job( self, job: DataGenerationJob, *, content_type: str = "application/json", operation_id: Optional[str] = ..., **kwargs: Any - ) -> DataGenerationJob: ... + ) -> AsyncLROPoller[DataGenerationJobResult]: ... @overload - async def create_generation_job( + async def begin_create_generation_job( self, - job: DataGenerationJob, + job: JSON, *, content_type: str = "application/json", operation_id: Optional[str] = ..., **kwargs: Any - ) -> DataGenerationJob: ... + ) -> AsyncLROPoller[DataGenerationJobResult]: ... @overload - async def create_generation_job( + async def begin_create_generation_job( self, job: IO[bytes], *, content_type: str = "application/json", operation_id: Optional[str] = ..., **kwargs: Any + ) -> AsyncLROPoller[DataGenerationJobResult]: ... + + @distributed_trace_async + async def cancel_generation_job( + self, + job_id: str, + **kwargs: Any ) -> DataGenerationJob: ... @distributed_trace_async @@ -565,7 +569,7 @@ namespace azure.ai.projects.aio.operations async def create( self, name: str, - taxonomy: EvaluationTaxonomy, + taxonomy: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -618,7 +622,7 @@ namespace azure.ai.projects.aio.operations async def update( self, name: str, - taxonomy: EvaluationTaxonomy, + taxonomy: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -643,41 +647,41 @@ namespace azure.ai.projects.aio.operations **kwargs ) -> None: ... - @distributed_trace_async - async def cancel_generation_job( - self, - job_id: str, - **kwargs: Any - ) -> EvaluatorGenerationJob: ... - @overload - async def create_generation_job( + async def begin_create_generation_job( self, job: EvaluatorGenerationJob, *, content_type: str = "application/json", operation_id: Optional[str] = ..., **kwargs: Any - ) -> EvaluatorGenerationJob: ... + ) -> AsyncLROPoller[EvaluatorVersion]: ... @overload - async def create_generation_job( + async def begin_create_generation_job( self, - job: EvaluatorGenerationJob, + job: JSON, *, content_type: str = "application/json", operation_id: Optional[str] = ..., **kwargs: Any - ) -> EvaluatorGenerationJob: ... + ) -> AsyncLROPoller[EvaluatorVersion]: ... @overload - async def create_generation_job( + async def begin_create_generation_job( self, job: IO[bytes], *, content_type: str = "application/json", operation_id: Optional[str] = ..., **kwargs: Any + ) -> AsyncLROPoller[EvaluatorVersion]: ... + + @distributed_trace_async + async def cancel_generation_job( + self, + job_id: str, + **kwargs: Any ) -> EvaluatorGenerationJob: ... @overload @@ -694,7 +698,7 @@ namespace azure.ai.projects.aio.operations async def create_version( self, name: str, - evaluator_version: EvaluatorVersion, + evaluator_version: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -741,7 +745,7 @@ namespace azure.ai.projects.aio.operations self, name: str, version: str, - credential_request: EvaluatorCredentialRequest, + credential_request: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -818,7 +822,7 @@ namespace azure.ai.projects.aio.operations self, name: str, version: str, - pending_upload_request: PendingUploadRequest, + pending_upload_request: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -851,7 +855,7 @@ namespace azure.ai.projects.aio.operations self, name: str, version: str, - evaluator_version: EvaluatorVersion, + evaluator_version: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -889,7 +893,7 @@ namespace azure.ai.projects.aio.operations @overload async def generate( self, - insight: Insight, + insight: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -982,7 +986,7 @@ namespace azure.ai.projects.aio.operations @overload async def create( self, - body: CreateMemoryStoreRequest, + body: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -1013,7 +1017,7 @@ namespace azure.ai.projects.aio.operations async def create_memory( self, name: str, - body: CreateMemoryRequest, + body: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -1058,7 +1062,7 @@ namespace azure.ai.projects.aio.operations async def delete_scope( self, name: str, - body: DeleteScopeRequest, + body: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -1117,7 +1121,7 @@ namespace azure.ai.projects.aio.operations def list_memories( self, name: str, - body: ListMemoriesRequest, + body: JSON, *, before: Optional[str] = ..., content_type: str = "application/json", @@ -1189,7 +1193,7 @@ namespace azure.ai.projects.aio.operations async def update( self, name: str, - body: UpdateMemoryStoreRequest, + body: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -1221,7 +1225,7 @@ namespace azure.ai.projects.aio.operations self, name: str, memory_id: str, - body: UpdateMemoryRequest, + body: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -1313,7 +1317,7 @@ namespace azure.ai.projects.aio.operations self, name: str, version: str, - credential_request: ModelCredentialRequest, + credential_request: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -1356,7 +1360,7 @@ namespace azure.ai.projects.aio.operations self, name: str, version: str, - model_version: ModelVersion, + model_version: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -1389,7 +1393,7 @@ namespace azure.ai.projects.aio.operations self, name: str, version: str, - pending_upload_request: ModelPendingUploadRequest, + pending_upload_request: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -1422,7 +1426,7 @@ namespace azure.ai.projects.aio.operations self, name: str, version: str, - model_version_update: UpdateModelVersionRequest, + model_version_update: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any @@ -1480,7 +1484,7 @@ namespace azure.ai.projects.aio.operations @overload async def create( self, - red_team: RedTeam, + red_team: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -1531,7 +1535,7 @@ namespace azure.ai.projects.aio.operations async def create_or_update( self, routine_name: str, - body: CreateOrUpdateRoutineRequest, + body: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -1575,7 +1579,7 @@ namespace azure.ai.projects.aio.operations async def dispatch( self, routine_name: str, - body: DispatchRoutineAsyncRequest, + body: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -1650,7 +1654,7 @@ namespace azure.ai.projects.aio.operations async def create_or_update( self, schedule_id: str, - schedule: Schedule, + schedule: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -1731,7 +1735,7 @@ namespace azure.ai.projects.aio.operations async def create( self, name: str, - body: CreateSkillVersionRequest, + body: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -1759,7 +1763,7 @@ namespace azure.ai.projects.aio.operations async def create_from_files( self, name: str, - content: CreateSkillVersionFromFilesBody, + content: JSON, **kwargs: Any ) -> SkillVersion: ... @@ -1843,7 +1847,7 @@ namespace azure.ai.projects.aio.operations async def update( self, name: str, - body: UpdateSkillRequest, + body: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -1920,7 +1924,7 @@ namespace azure.ai.projects.aio.operations self, name: str, version: str, - dataset_version: DatasetVersion, + dataset_version: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any @@ -1987,7 +1991,7 @@ namespace azure.ai.projects.aio.operations self, name: str, version: str, - pending_upload_request: PendingUploadRequest, + pending_upload_request: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -2076,7 +2080,7 @@ namespace azure.ai.projects.aio.operations async def create_or_update( self, id: str, - evaluation_rule: EvaluationRule, + evaluation_rule: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -2141,7 +2145,7 @@ namespace azure.ai.projects.aio.operations self, name: str, version: str, - index: Index, + index: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any @@ -2219,7 +2223,7 @@ namespace azure.ai.projects.aio.operations async def create_version( self, name: str, - body: CreateToolboxVersionRequest, + body: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -2300,7 +2304,7 @@ namespace azure.ai.projects.aio.operations async def update( self, name: str, - body: UpdateToolboxRequest1, + body: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -2631,19 +2635,26 @@ namespace azure.ai.projects.models class azure.ai.projects.models.AgentIdentity(_Model): client_id: str principal_id: str + status: Optional[Union[str, AgentIdentityStatus]] @overload def __init__( self, *, client_id: str, - principal_id: str + principal_id: str, + status: Optional[Union[str, AgentIdentityStatus]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... + class azure.ai.projects.models.AgentIdentityStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ACTIVE = "active" + DISABLED = "disabled" + + class azure.ai.projects.models.AgentKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): EXTERNAL = "external" HOSTED = "hosted" @@ -2972,7 +2983,7 @@ namespace azure.ai.projects.models class azure.ai.projects.models.AzureAIBenchmarkPreviewEvalRunDataSource(TypedDict, total=False): key "input_messages": InputMessagesItemReference - key "target": Required[Union[AzureAIModelTargetParam, AzureAIAgentTargetParam, dict[str, Any]]] + key "target": Required[Union[AzureAIAgentTargetParam, AzureAIModelTargetParam, dict[str, Any]]] key "type": Required[Literal["azure_ai_benchmark_preview"]] @@ -4226,6 +4237,7 @@ namespace azure.ai.projects.models class azure.ai.projects.models.DataGenerationJobType(str, Enum, metaclass=CaseInsensitiveEnumMeta): SIMPLE_QNA = "simple_qna" + TASK_GENERATION = "task_generation" TOOL_USE = "tool_use" TRACES = "traces" @@ -5008,6 +5020,7 @@ namespace azure.ai.projects.models error: Optional[ApiError] finished_at: Optional[datetime] id: str + input_quality_warnings: Optional[list[RubricGenerationInputQualityWarning]] inputs: Optional[EvaluatorGenerationInputs] result: Optional[EvaluatorVersion] status: Union[str, JobStatus] @@ -5113,6 +5126,7 @@ namespace azure.ai.projects.models display_name: Optional[str] evaluator_type: Union[str, EvaluatorType] generation_artifacts: Optional[EvaluatorGenerationArtifacts] + generation_job_id: Optional[str] id: Optional[str] metadata: Optional[dict[str, str]] modified_at: datetime @@ -5120,6 +5134,7 @@ namespace azure.ai.projects.models supported_evaluation_levels: Optional[list[Union[str, EvaluationLevel]]] tags: Optional[dict[str, str]] version: str + warnings: Optional[list[Union[str, GenerationWarningType]]] @overload def __init__( @@ -5555,6 +5570,10 @@ namespace azure.ai.projects.models def __init__(self, mapping: Mapping[str, Any]) -> None: ... + class azure.ai.projects.models.GenerationWarningType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + INPUT_QUALITY = "input_quality" + + class azure.ai.projects.models.GitHubIssueEvent(str, Enum, metaclass=CaseInsensitiveEnumMeta): CLOSED = "closed" OPENED = "opened" @@ -6131,7 +6150,6 @@ namespace azure.ai.projects.models server_label: str server_url: Optional[str] tool_configs: Optional[dict[str, ToolConfig]] - tunnel_id: Optional[str] type: Literal[ToolType.MCP] @overload @@ -6148,8 +6166,7 @@ namespace azure.ai.projects.models server_description: Optional[str] = ..., server_label: str, server_url: Optional[str] = ..., - tool_configs: Optional[dict[str, ToolConfig]] = ..., - tunnel_id: Optional[str] = ... + tool_configs: Optional[dict[str, ToolConfig]] = ... ) -> None: ... @overload @@ -6202,7 +6219,6 @@ namespace azure.ai.projects.models server_label: str server_url: Optional[str] tool_configs: dict[str, ToolConfig] - tunnel_id: Optional[str] type: Literal[ToolboxToolType.MCP] @overload @@ -6221,8 +6237,7 @@ namespace azure.ai.projects.models server_description: Optional[str] = ..., server_label: str, server_url: Optional[str] = ..., - tool_configs: Optional[dict[str, ToolConfig]] = ..., - tunnel_id: Optional[str] = ... + tool_configs: Optional[dict[str, ToolConfig]] = ... ) -> None: ... @overload @@ -7210,6 +7225,7 @@ namespace azure.ai.projects.models eval_model: Optional[str] evaluation_level: Optional[Union[str, EvaluationLevel]] max_candidates: Optional[int] + max_stalls: Optional[int] optimization_config: Optional[dict[str, Any]] optimization_model: Optional[str] @@ -7220,6 +7236,7 @@ namespace azure.ai.projects.models eval_model: Optional[str] = ..., evaluation_level: Optional[Union[str, EvaluationLevel]] = ..., max_candidates: Optional[int] = ..., + max_stalls: Optional[int] = ..., optimization_config: Optional[dict[str, Any]] = ..., optimization_model: Optional[str] = ... ) -> None: ... @@ -7534,7 +7551,6 @@ namespace azure.ai.projects.models class azure.ai.projects.models.Reasoning(_Model): - context: Optional[Literal["auto", "current_turn", "all_turns"]] effort: Optional[Literal["none", "minimal", "low", "medium", "high", "xhigh"]] generate_summary: Optional[Literal["auto", "concise", "detailed"]] summary: Optional[Literal["auto", "concise", "detailed"]] @@ -7543,7 +7559,6 @@ namespace azure.ai.projects.models def __init__( self, *, - context: Optional[Literal[auto, current_turn, all_turns]] = ..., effort: Optional[Literal[none, minimal, low, medium, high, xhigh]] = ..., generate_summary: Optional[Literal[auto, concise, detailed]] = ..., summary: Optional[Literal[auto, concise, detailed]] = ... @@ -7631,7 +7646,7 @@ namespace azure.ai.projects.models class azure.ai.projects.models.RedTeamEvalRunDataSource(TypedDict, total=False): key "item_generation_params": Required[Any] - key "target": Required[Union[AzureAIModelTargetParam, AzureAIAgentTargetParam, dict[str, Any]]] + key "target": Required[Union[AzureAIAgentTargetParam, AzureAIModelTargetParam, dict[str, Any]]] key "type": Required[Literal["azure_ai_red_team"]] @@ -7899,6 +7914,50 @@ namespace azure.ai.projects.models def __init__(self, mapping: Mapping[str, Any]) -> None: ... + class azure.ai.projects.models.RubricGenerationInputQualityWarning(_Model): + code: Union[str, RubricGenerationInputQualityWarningCode] + message: str + severity: Union[str, RubricGenerationInputQualityWarningSeverity] + source: Union[str, RubricGenerationInputQualityWarningSource] + source_index: Optional[int] + + @overload + def __init__( + self, + *, + code: Union[str, RubricGenerationInputQualityWarningCode], + message: str, + severity: Union[str, RubricGenerationInputQualityWarningSeverity], + source: Union[str, RubricGenerationInputQualityWarningSource], + source_index: Optional[int] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.projects.models.RubricGenerationInputQualityWarningCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + EMPTY_AGENT_INSTRUCTIONS = "empty_agent_instructions" + EMPTY_DATASET_CONTENT = "empty_dataset_content" + EMPTY_PROMPT = "empty_prompt" + INSUFFICIENT_TOTAL_INPUT = "insufficient_total_input" + LOW_TRACE_COUNT = "low_trace_count" + SHORT_AGENT_INSTRUCTIONS = "short_agent_instructions" + SHORT_DATASET_CONTENT = "short_dataset_content" + SHORT_PROMPT = "short_prompt" + + + class azure.ai.projects.models.RubricGenerationInputQualityWarningSeverity(str, Enum, metaclass=CaseInsensitiveEnumMeta): + WARNING = "warning" + + + class azure.ai.projects.models.RubricGenerationInputQualityWarningSource(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AGENT = "agent" + AGGREGATE = "aggregate" + DATASET = "dataset" + PROMPT = "prompt" + + class azure.ai.projects.models.SASCredentials(BaseCredentials, discriminator='SAS'): sas_token: Optional[str] type: Literal[CredentialType.SAS] @@ -8283,10 +8342,29 @@ namespace azure.ai.projects.models class azure.ai.projects.models.TargetCompletionEvalRunDataSource(TypedDict, total=False): key "input_messages": Required[InputMessagesItemReference] key "source": Required[Union[SourceFileContent, SourceFileID]] - key "target": Required[Union[AzureAIModelTargetParam, AzureAIAgentTargetParam, dict[str, Any]]] + key "target": Required[Union[AzureAIAgentTargetParam, AzureAIModelTargetParam, dict[str, Any]]] key "type": Required[Literal["azure_ai_target_completions"]] + class azure.ai.projects.models.TaskGenerationDataGenerationJobOptions(DataGenerationJobOptions, discriminator='task_generation'): + max_samples: int + model_options: DataGenerationModelOptions + train_split: float + type: Literal[DataGenerationJobType.TASK_GENERATION] + + @overload + def __init__( + self, + *, + max_samples: int, + model_options: Optional[DataGenerationModelOptions] = ..., + train_split: Optional[float] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + class azure.ai.projects.models.TaxonomyCategory(_Model): description: Optional[str] id: str @@ -8747,6 +8825,25 @@ namespace azure.ai.projects.models def __init__(self, mapping: Mapping[str, Any]) -> None: ... + class azure.ai.projects.models.ToolSearchToolboxTool(ToolboxTool, discriminator='toolbox_search'): + description: str + name: str + tool_configs: dict[str, ToolConfig] + type: Literal[ToolboxToolType.TOOLBOX_SEARCH] + + @overload + def __init__( + self, + *, + description: Optional[str] = ..., + name: Optional[str] = ..., + tool_configs: Optional[dict[str, ToolConfig]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + class azure.ai.projects.models.ToolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): A2A_PREVIEW = "a2a_preview" APPLY_PATCH = "apply_patch" @@ -8774,6 +8871,7 @@ namespace azure.ai.projects.models SHELL = "shell" TOOLBOX_SEARCH_PREVIEW = "toolbox_search_preview" TOOL_SEARCH = "tool_search" + WEB_IQ_PREVIEW = "web_iq_preview" WEB_SEARCH = "web_search" WEB_SEARCH_PREVIEW = "web_search_preview" WORK_IQ_PREVIEW = "work_iq_preview" @@ -8910,7 +9008,9 @@ namespace azure.ai.projects.models MCP = "mcp" OPENAPI = "openapi" REMINDER_PREVIEW = "reminder_preview" + TOOLBOX_SEARCH = "toolbox_search" TOOLBOX_SEARCH_PREVIEW = "toolbox_search_preview" + WEB_IQ_PREVIEW = "web_iq_preview" WEB_SEARCH = "web_search" WORK_IQ_PREVIEW = "work_iq_preview" @@ -9184,6 +9284,54 @@ namespace azure.ai.projects.models FIXED_RATIO = "FixedRatio" + class azure.ai.projects.models.WebIQPreviewTool(Tool, discriminator='web_iq_preview'): + project_connection_id: str + require_approval: Optional[Union[MCPToolRequireApproval, str]] + server_label: Optional[str] + server_url: Optional[str] + type: Literal[ToolType.WEB_IQ_PREVIEW] + + @overload + def __init__( + self, + *, + project_connection_id: str, + require_approval: Optional[Union[MCPToolRequireApproval, str]] = ..., + server_label: Optional[str] = ..., + server_url: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.projects.models.WebIQPreviewToolboxTool(ToolboxTool, discriminator='web_iq_preview'): + description: str + name: str + project_connection_id: str + require_approval: Optional[Union[MCPToolRequireApproval, str]] + server_label: Optional[str] + server_url: Optional[str] + tool_configs: dict[str, ToolConfig] + type: Literal[ToolboxToolType.WEB_IQ_PREVIEW] + + @overload + def __init__( + self, + *, + description: Optional[str] = ..., + name: Optional[str] = ..., + project_connection_id: str, + require_approval: Optional[Union[MCPToolRequireApproval, str]] = ..., + server_label: Optional[str] = ..., + server_url: Optional[str] = ..., + tool_configs: Optional[dict[str, ToolConfig]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + class azure.ai.projects.models.WebSearchApproximateLocation(_Model): city: Optional[str] country: Optional[str] @@ -9401,7 +9549,7 @@ namespace azure.ai.projects.operations def create_session( self, agent_name: str, - body: CreateSessionRequest, + body: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -9435,7 +9583,7 @@ namespace azure.ai.projects.operations def create_version( self, agent_name: str, - body: CreateAgentVersionRequest, + body: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -9481,7 +9629,7 @@ namespace azure.ai.projects.operations def create_version_from_manifest( self, agent_name: str, - body: CreateAgentVersionFromManifestRequest, + body: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -9670,7 +9818,7 @@ namespace azure.ai.projects.operations def update_details( self, agent_name: str, - body: PatchAgentObjectRequest, + body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any @@ -9706,41 +9854,41 @@ namespace azure.ai.projects.operations **kwargs ) -> None: ... - @distributed_trace - def cancel_optimization_job( - self, - job_id: str, - **kwargs: Any - ) -> OptimizationJob: ... - @overload - def create_optimization_job( + def begin_create_optimization_job( self, job: OptimizationJob, *, content_type: str = "application/json", operation_id: Optional[str] = ..., **kwargs: Any - ) -> OptimizationJob: ... + ) -> LROPoller[OptimizationJobResult]: ... @overload - def create_optimization_job( + def begin_create_optimization_job( self, - job: OptimizationJob, + job: JSON, *, content_type: str = "application/json", operation_id: Optional[str] = ..., **kwargs: Any - ) -> OptimizationJob: ... + ) -> LROPoller[OptimizationJobResult]: ... @overload - def create_optimization_job( + def begin_create_optimization_job( self, job: IO[bytes], *, content_type: str = "application/json", operation_id: Optional[str] = ..., **kwargs: Any + ) -> LROPoller[OptimizationJobResult]: ... + + @distributed_trace + def cancel_optimization_job( + self, + job_id: str, + **kwargs: Any ) -> OptimizationJob: ... @distributed_trace @@ -9778,41 +9926,41 @@ namespace azure.ai.projects.operations **kwargs ) -> None: ... - @distributed_trace - def cancel_generation_job( - self, - job_id: str, - **kwargs: Any - ) -> DataGenerationJob: ... - @overload - def create_generation_job( + def begin_create_generation_job( self, job: DataGenerationJob, *, content_type: str = "application/json", operation_id: Optional[str] = ..., **kwargs: Any - ) -> DataGenerationJob: ... + ) -> LROPoller[DataGenerationJobResult]: ... @overload - def create_generation_job( + def begin_create_generation_job( self, - job: DataGenerationJob, + job: JSON, *, content_type: str = "application/json", operation_id: Optional[str] = ..., **kwargs: Any - ) -> DataGenerationJob: ... + ) -> LROPoller[DataGenerationJobResult]: ... @overload - def create_generation_job( + def begin_create_generation_job( self, job: IO[bytes], *, content_type: str = "application/json", operation_id: Optional[str] = ..., **kwargs: Any + ) -> LROPoller[DataGenerationJobResult]: ... + + @distributed_trace + def cancel_generation_job( + self, + job_id: str, + **kwargs: Any ) -> DataGenerationJob: ... @distributed_trace @@ -9862,7 +10010,7 @@ namespace azure.ai.projects.operations def create( self, name: str, - taxonomy: EvaluationTaxonomy, + taxonomy: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -9915,7 +10063,7 @@ namespace azure.ai.projects.operations def update( self, name: str, - taxonomy: EvaluationTaxonomy, + taxonomy: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -9940,41 +10088,41 @@ namespace azure.ai.projects.operations **kwargs ) -> None: ... - @distributed_trace - def cancel_generation_job( - self, - job_id: str, - **kwargs: Any - ) -> EvaluatorGenerationJob: ... - @overload - def create_generation_job( + def begin_create_generation_job( self, job: EvaluatorGenerationJob, *, content_type: str = "application/json", operation_id: Optional[str] = ..., **kwargs: Any - ) -> EvaluatorGenerationJob: ... + ) -> LROPoller[EvaluatorVersion]: ... @overload - def create_generation_job( + def begin_create_generation_job( self, - job: EvaluatorGenerationJob, + job: JSON, *, content_type: str = "application/json", operation_id: Optional[str] = ..., **kwargs: Any - ) -> EvaluatorGenerationJob: ... + ) -> LROPoller[EvaluatorVersion]: ... @overload - def create_generation_job( + def begin_create_generation_job( self, job: IO[bytes], *, content_type: str = "application/json", operation_id: Optional[str] = ..., **kwargs: Any + ) -> LROPoller[EvaluatorVersion]: ... + + @distributed_trace + def cancel_generation_job( + self, + job_id: str, + **kwargs: Any ) -> EvaluatorGenerationJob: ... @overload @@ -9991,7 +10139,7 @@ namespace azure.ai.projects.operations def create_version( self, name: str, - evaluator_version: EvaluatorVersion, + evaluator_version: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -10038,7 +10186,7 @@ namespace azure.ai.projects.operations self, name: str, version: str, - credential_request: EvaluatorCredentialRequest, + credential_request: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -10115,7 +10263,7 @@ namespace azure.ai.projects.operations self, name: str, version: str, - pending_upload_request: PendingUploadRequest, + pending_upload_request: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -10148,7 +10296,7 @@ namespace azure.ai.projects.operations self, name: str, version: str, - evaluator_version: EvaluatorVersion, + evaluator_version: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -10186,7 +10334,7 @@ namespace azure.ai.projects.operations @overload def generate( self, - insight: Insight, + insight: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -10279,7 +10427,7 @@ namespace azure.ai.projects.operations @overload def create( self, - body: CreateMemoryStoreRequest, + body: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -10310,7 +10458,7 @@ namespace azure.ai.projects.operations def create_memory( self, name: str, - body: CreateMemoryRequest, + body: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -10355,7 +10503,7 @@ namespace azure.ai.projects.operations def delete_scope( self, name: str, - body: DeleteScopeRequest, + body: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -10414,7 +10562,7 @@ namespace azure.ai.projects.operations def list_memories( self, name: str, - body: ListMemoriesRequest, + body: JSON, *, before: Optional[str] = ..., content_type: str = "application/json", @@ -10486,7 +10634,7 @@ namespace azure.ai.projects.operations def update( self, name: str, - body: UpdateMemoryStoreRequest, + body: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -10518,7 +10666,7 @@ namespace azure.ai.projects.operations self, name: str, memory_id: str, - body: UpdateMemoryRequest, + body: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -10612,7 +10760,7 @@ namespace azure.ai.projects.operations self, name: str, version: str, - credential_request: ModelCredentialRequest, + credential_request: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -10655,7 +10803,7 @@ namespace azure.ai.projects.operations self, name: str, version: str, - model_version: ModelVersion, + model_version: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -10688,7 +10836,7 @@ namespace azure.ai.projects.operations self, name: str, version: str, - pending_upload_request: ModelPendingUploadRequest, + pending_upload_request: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -10721,7 +10869,7 @@ namespace azure.ai.projects.operations self, name: str, version: str, - model_version_update: UpdateModelVersionRequest, + model_version_update: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any @@ -10779,7 +10927,7 @@ namespace azure.ai.projects.operations @overload def create( self, - red_team: RedTeam, + red_team: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -10830,7 +10978,7 @@ namespace azure.ai.projects.operations def create_or_update( self, routine_name: str, - body: CreateOrUpdateRoutineRequest, + body: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -10874,7 +11022,7 @@ namespace azure.ai.projects.operations def dispatch( self, routine_name: str, - body: DispatchRoutineAsyncRequest, + body: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -10949,7 +11097,7 @@ namespace azure.ai.projects.operations def create_or_update( self, schedule_id: str, - schedule: Schedule, + schedule: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -11030,7 +11178,7 @@ namespace azure.ai.projects.operations def create( self, name: str, - body: CreateSkillVersionRequest, + body: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -11058,7 +11206,7 @@ namespace azure.ai.projects.operations def create_from_files( self, name: str, - content: CreateSkillVersionFromFilesBody, + content: JSON, **kwargs: Any ) -> SkillVersion: ... @@ -11142,7 +11290,7 @@ namespace azure.ai.projects.operations def update( self, name: str, - body: UpdateSkillRequest, + body: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -11219,7 +11367,7 @@ namespace azure.ai.projects.operations self, name: str, version: str, - dataset_version: DatasetVersion, + dataset_version: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any @@ -11286,7 +11434,7 @@ namespace azure.ai.projects.operations self, name: str, version: str, - pending_upload_request: PendingUploadRequest, + pending_upload_request: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -11375,7 +11523,7 @@ namespace azure.ai.projects.operations def create_or_update( self, id: str, - evaluation_rule: EvaluationRule, + evaluation_rule: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -11440,7 +11588,7 @@ namespace azure.ai.projects.operations self, name: str, version: str, - index: Index, + index: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any @@ -11518,7 +11666,7 @@ namespace azure.ai.projects.operations def create_version( self, name: str, - body: CreateToolboxVersionRequest, + body: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -11599,7 +11747,7 @@ namespace azure.ai.projects.operations def update( self, name: str, - body: UpdateToolboxRequest1, + body: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -11639,3045 +11787,4 @@ namespace azure.ai.projects.telemetry def uninstrument(self) -> None: ... -namespace azure.ai.projects.types - - class azure.ai.projects.types.A2APreviewTool(TypedDict, total=False): - key "agent_card_path": str - key "base_url": str - key "project_connection_id": str - key "send_credentials_for_agent_card": bool - key "type": Required[Literal[ToolType.A2A_PREVIEW]] - agent_card_path: str - base_url: str - project_connection_id: str - send_credentials_for_agent_card: bool - type: Literal[ToolType.A2A_PREVIEW] - - - class azure.ai.projects.types.A2APreviewToolboxTool(TypedDict, total=False): - key "agent_card_path": str - key "base_url": str - key "description": str - key "name": str - key "project_connection_id": str - key "send_credentials_for_agent_card": bool - key "type": Required[Literal[ToolboxToolType.A2A_PREVIEW]] - agent_card_path: str - base_url: str - description: str - name: str - project_connection_id: str - send_credentials_for_agent_card: bool - tool_configs: dict[str, ToolConfig] - type: Literal[ToolboxToolType.A2A_PREVIEW] - - - class azure.ai.projects.types.A2AProtocolConfiguration(TypedDict, total=False): - - - class azure.ai.projects.types.AISearchIndexResource(TypedDict, total=False): - key "filter": str - key "index_asset_id": str - key "index_name": str - key "project_connection_id": str - key "query_type": Union[str, AzureAISearchQueryType] - key "top_k": int - filter: str - index_asset_id: str - index_name: str - project_connection_id: str - query_type: Union[str, AzureAISearchQueryType] - top_k: int - - - class azure.ai.projects.types.ActivityProtocolConfiguration(TypedDict, total=False): - key "enable_m365_public_endpoint": bool - enable_m365_public_endpoint: bool - - - class azure.ai.projects.types.AgentBlueprintReference(TypedDict, total=False): - key "blueprint_id": Required[str] - key "type": Required[Literal[AgentBlueprintReferenceType.MANAGED_AGENT_IDENTITY_BLUEPRINT]] - blueprint_id: str - type: Literal[AgentBlueprintReferenceType.MANAGED_AGENT_IDENTITY_BLUEPRINT] - - - class azure.ai.projects.types.AgentBlueprintReferenceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - MANAGED_AGENT_IDENTITY_BLUEPRINT = "ManagedAgentIdentityBlueprint" - - - class azure.ai.projects.types.AgentCard(TypedDict, total=False): - key "description": str - key "skills": Required[list[AgentCardSkill]] - key "version": Required[str] - description: str - skills: list[AgentCardSkill] - version: str - - - class azure.ai.projects.types.AgentCardSkill(TypedDict, total=False): - key "description": str - key "id": Required[str] - key "name": Required[str] - description: str - examples: list[str] - id: str - name: str - tags: list[str] - - - class azure.ai.projects.types.AgentClusterInsightRequest(TypedDict, total=False): - key "agentName": Required[str] - key "type": Required[Literal[InsightType.AGENT_CLUSTER_INSIGHT]] - agent_name: str - modelConfiguration: ForwardRef('InsightModelConfiguration', module='types') - model_configuration: InsightModelConfiguration - type: Literal[InsightType.AGENT_CLUSTER_INSIGHT] - - - class azure.ai.projects.types.AgentClusterInsightResult(TypedDict, total=False): - key "clusterInsight": Required[ClusterInsightResult] - key "type": Required[Literal[InsightType.AGENT_CLUSTER_INSIGHT]] - cluster_insight: ClusterInsightResult - type: Literal[InsightType.AGENT_CLUSTER_INSIGHT] - - - class azure.ai.projects.types.AgentDataGenerationJobSource(TypedDict, total=False): - key "agent_name": Required[str] - key "agent_version": str - key "description": str - key "type": Required[Literal[DataGenerationJobSourceType.AGENT]] - agent_name: str - agent_version: str - description: str - type: Literal[DataGenerationJobSourceType.AGENT] - - - class azure.ai.projects.types.AgentEndpointAuthorizationSchemeType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - BOT_SERVICE = "BotService" - BOT_SERVICE_RBAC = "BotServiceRbac" - BOT_SERVICE_TENANT = "BotServiceTenant" - ENTRA = "Entra" - - - class azure.ai.projects.types.AgentEndpointConfig(TypedDict, total=False): - authorization_schemes: list[AgentEndpointAuthorizationScheme] - protocol_configuration: ForwardRef('ProtocolConfiguration', module='types') - version_selector: ForwardRef('VersionSelector', module='types') - - - class azure.ai.projects.types.AgentEvaluatorGenerationJobSource(TypedDict, total=False): - key "agent_name": Required[str] - key "agent_version": str - key "description": str - key "type": Required[Literal[EvaluatorGenerationJobSourceType.AGENT]] - agent_name: str - agent_version: str - description: str - type: Literal[EvaluatorGenerationJobSourceType.AGENT] - - - class azure.ai.projects.types.AgentKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): - EXTERNAL = "external" - HOSTED = "hosted" - PROMPT = "prompt" - WORKFLOW = "workflow" - - - class azure.ai.projects.types.AgentTaxonomyInput(TypedDict, total=False): - key "riskCategories": Required[list[Union[str, RiskCategory]]] - key "target": Required[EvaluationTarget] - key "type": Required[Literal[EvaluationTaxonomyInputType.AGENT]] - risk_categories: list[Union[str, RiskCategory]] - target: EvaluationTarget - type: Literal[EvaluationTaxonomyInputType.AGENT] - - - class azure.ai.projects.types.ApiError(TypedDict, total=False): - key "code": Required[Optional[str]] - key "message": Required[str] - key "param": Optional[str] - key "type": str - additionalInfo: dict[str, Any] - additional_info: dict[str, Any] - code: str - debugInfo: dict[str, Any] - debug_info: dict[str, Any] - details: list[ApiError] - message: str - param: str - type: str - - - class azure.ai.projects.types.ApplyPatchToolParam(TypedDict, total=False): - key "type": Required[Literal[ToolType.APPLY_PATCH]] - type: Literal[ToolType.APPLY_PATCH] - - - class azure.ai.projects.types.ApproximateLocation(TypedDict, total=False): - key "city": Optional[str] - key "country": Optional[str] - key "region": Optional[str] - key "timezone": Optional[str] - key "type": Required[Literal["approximate"]] - city: str - country: str - region: str - timezone: str - type: Literal[approximate] - - - class azure.ai.projects.types.ArtifactProfile(TypedDict, total=False): - key "category": Required[Union[str, FoundryModelArtifactProfileCategory]] - category: Union[str, FoundryModelArtifactProfileCategory] - signals: list[Union[str, FoundryModelArtifactProfileSignal]] - - - class azure.ai.projects.types.AutoCodeInterpreterToolParam(TypedDict, total=False): - key "memory_limit": Optional[Union[str, ContainerMemoryLimit]] - key "type": Required[Literal["auto"]] - file_ids: list[str] - memory_limit: Union[str, ContainerMemoryLimit] - network_policy: ForwardRef('ContainerNetworkPolicyParam', module='types') - type: Literal[auto] - - - class azure.ai.projects.types.AzureAIAgentTarget(TypedDict, total=False): - key "name": Required[str] - key "type": Required[Literal["azure_ai_agent"]] - key "version": str - name: str - tool_descriptions: list[ToolDescription] - tools: list[Tool] - type: Literal[azure_ai_agent] - version: str - - - class azure.ai.projects.types.AzureAIModelTarget(TypedDict, total=False): - key "model": str - key "type": Required[Literal["azure_ai_model"]] - model: str - sampling_params: ForwardRef('ModelSamplingParams', module='types') - type: Literal[azure_ai_model] - - - class azure.ai.projects.types.AzureAISearchIndex(TypedDict, total=False): - key "connectionName": Required[str] - key "description": str - key "id": str - key "indexName": Required[str] - key "name": Required[str] - key "type": Required[Literal[IndexType.AZURE_SEARCH]] - key "version": Required[str] - connection_name: str - description: str - fieldMapping: ForwardRef('FieldMapping', module='types') - field_mapping: FieldMapping - id: str - index_name: str - name: str - tags: dict[str, str] - type: Literal[IndexType.AZURE_SEARCH] - version: str - - - class azure.ai.projects.types.AzureAISearchTool(TypedDict, total=False): - key "azure_ai_search": Required[AzureAISearchToolResource] - key "description": str - key "name": str - key "type": Required[Literal[ToolType.AZURE_AI_SEARCH]] - azure_ai_search: AzureAISearchToolResource - description: str - name: str - tool_configs: dict[str, ToolConfig] - type: Literal[ToolType.AZURE_AI_SEARCH] - - - class azure.ai.projects.types.AzureAISearchToolResource(TypedDict, total=False): - key "indexes": Required[list[AISearchIndexResource]] - indexes: list[AISearchIndexResource] - - - class azure.ai.projects.types.AzureAISearchToolboxTool(TypedDict, total=False): - key "azure_ai_search": Required[AzureAISearchToolResource] - key "description": str - key "name": str - key "type": Required[Literal[ToolboxToolType.AZURE_AI_SEARCH]] - azure_ai_search: AzureAISearchToolResource - description: str - name: str - tool_configs: dict[str, ToolConfig] - type: Literal[ToolboxToolType.AZURE_AI_SEARCH] - - - class azure.ai.projects.types.AzureFunctionBinding(TypedDict, total=False): - key "storage_queue": Required[AzureFunctionStorageQueue] - key "type": Required[Literal["storage_queue"]] - storage_queue: AzureFunctionStorageQueue - type: Literal[storage_queue] - - - class azure.ai.projects.types.AzureFunctionDefinition(TypedDict, total=False): - key "function": Required[AzureFunctionDefinitionFunction] - key "input_binding": Required[AzureFunctionBinding] - key "output_binding": Required[AzureFunctionBinding] - function: AzureFunctionDefinitionFunction - input_binding: AzureFunctionBinding - output_binding: AzureFunctionBinding - - - class azure.ai.projects.types.AzureFunctionDefinitionFunction(TypedDict, total=False): - key "description": str - key "name": Required[str] - key "parameters": Required[dict[str, Any]] - description: str - name: str - parameters: dict[str, Any] - - - class azure.ai.projects.types.AzureFunctionStorageQueue(TypedDict, total=False): - key "queue_name": Required[str] - key "queue_service_endpoint": Required[str] - queue_name: str - queue_service_endpoint: str - - - class azure.ai.projects.types.AzureFunctionTool(TypedDict, total=False): - key "azure_function": Required[AzureFunctionDefinition] - key "type": Required[Literal[ToolType.AZURE_FUNCTION]] - azure_function: AzureFunctionDefinition - tool_configs: dict[str, ToolConfig] - type: Literal[ToolType.AZURE_FUNCTION] - - - class azure.ai.projects.types.AzureOpenAIModelConfiguration(TypedDict, total=False): - key "modelDeploymentName": Required[str] - key "type": Required[Literal["AzureOpenAIModel"]] - model_deployment_name: str - type: Literal[AzureOpenAIModel] - - - class azure.ai.projects.types.BingCustomSearchConfiguration(TypedDict, total=False): - key "count": int - key "freshness": str - key "instance_name": Required[str] - key "market": str - key "project_connection_id": Required[str] - key "set_lang": str - count: int - freshness: str - instance_name: str - market: str - project_connection_id: str - set_lang: str - - - class azure.ai.projects.types.BingCustomSearchPreviewTool(TypedDict, total=False): - key "bing_custom_search_preview": Required[BingCustomSearchToolParameters] - key "type": Required[Literal[ToolType.BING_CUSTOM_SEARCH_PREVIEW]] - bing_custom_search_preview: BingCustomSearchToolParameters - type: Literal[ToolType.BING_CUSTOM_SEARCH_PREVIEW] - - - class azure.ai.projects.types.BingCustomSearchToolParameters(TypedDict, total=False): - key "search_configurations": Required[list[BingCustomSearchConfiguration]] - search_configurations: list[BingCustomSearchConfiguration] - - - class azure.ai.projects.types.BingGroundingSearchConfiguration(TypedDict, total=False): - key "count": int - key "freshness": str - key "market": str - key "project_connection_id": Required[str] - key "set_lang": str - count: int - freshness: str - market: str - project_connection_id: str - set_lang: str - - - class azure.ai.projects.types.BingGroundingSearchToolParameters(TypedDict, total=False): - key "search_configurations": Required[list[BingGroundingSearchConfiguration]] - search_configurations: list[BingGroundingSearchConfiguration] - - - class azure.ai.projects.types.BingGroundingTool(TypedDict, total=False): - key "bing_grounding": Required[BingGroundingSearchToolParameters] - key "description": str - key "name": str - key "type": Required[Literal[ToolType.BING_GROUNDING]] - bing_grounding: BingGroundingSearchToolParameters - description: str - name: str - tool_configs: dict[str, ToolConfig] - type: Literal[ToolType.BING_GROUNDING] - - - class azure.ai.projects.types.BotServiceAuthorizationScheme(TypedDict, total=False): - key "type": Required[Literal[AgentEndpointAuthorizationSchemeType.BOT_SERVICE]] - type: Literal[AgentEndpointAuthorizationSchemeType.BOT_SERVICE] - - - class azure.ai.projects.types.BotServiceRbacAuthorizationScheme(TypedDict, total=False): - key "type": Required[Literal[AgentEndpointAuthorizationSchemeType.BOT_SERVICE_RBAC]] - type: Literal[AgentEndpointAuthorizationSchemeType.BOT_SERVICE_RBAC] - - - class azure.ai.projects.types.BotServiceTenantAuthorizationScheme(TypedDict, total=False): - key "type": Required[Literal[AgentEndpointAuthorizationSchemeType.BOT_SERVICE_TENANT]] - type: Literal[AgentEndpointAuthorizationSchemeType.BOT_SERVICE_TENANT] - - - class azure.ai.projects.types.BrowserAutomationPreviewTool(TypedDict, total=False): - key "browser_automation_preview": Required[BrowserAutomationToolParameters] - key "type": Required[Literal[ToolType.BROWSER_AUTOMATION_PREVIEW]] - browser_automation_preview: BrowserAutomationToolParameters - type: Literal[ToolType.BROWSER_AUTOMATION_PREVIEW] - - - class azure.ai.projects.types.BrowserAutomationPreviewToolboxTool(TypedDict, total=False): - key "browser_automation_preview": Required[BrowserAutomationToolParameters] - key "description": str - key "name": str - key "type": Required[Literal[ToolboxToolType.BROWSER_AUTOMATION_PREVIEW]] - browser_automation_preview: BrowserAutomationToolParameters - description: str - name: str - tool_configs: dict[str, ToolConfig] - type: Literal[ToolboxToolType.BROWSER_AUTOMATION_PREVIEW] - - - class azure.ai.projects.types.BrowserAutomationToolConnectionParameters(TypedDict, total=False): - key "project_connection_id": Required[str] - project_connection_id: str - - - class azure.ai.projects.types.BrowserAutomationToolParameters(TypedDict, total=False): - key "connection": Required[BrowserAutomationToolConnectionParameters] - connection: BrowserAutomationToolConnectionParameters - - - class azure.ai.projects.types.CaptureStructuredOutputsTool(TypedDict, total=False): - key "description": str - key "name": str - key "outputs": Required[StructuredOutputDefinition] - key "type": Required[Literal[ToolType.CAPTURE_STRUCTURED_OUTPUTS]] - description: str - name: str - outputs: StructuredOutputDefinition - tool_configs: dict[str, ToolConfig] - type: Literal[ToolType.CAPTURE_STRUCTURED_OUTPUTS] - - - class azure.ai.projects.types.ChartCoordinate(TypedDict, total=False): - key "size": Required[int] - key "x": Required[int] - key "y": Required[int] - size: int - x: int - y: int - - - class azure.ai.projects.types.ClusterInsightResult(TypedDict, total=False): - key "clusters": Required[list[InsightCluster]] - key "summary": Required[InsightSummary] - clusters: list[InsightCluster] - coordinates: dict[str, ChartCoordinate] - summary: InsightSummary - - - class azure.ai.projects.types.ClusterTokenUsage(TypedDict, total=False): - key "inputTokenUsage": Required[int] - key "outputTokenUsage": Required[int] - key "totalTokenUsage": Required[int] - input_token_usage: int - output_token_usage: int - total_token_usage: int - - - class azure.ai.projects.types.CodeBasedEvaluatorDefinition(TypedDict, total=False): - key "blob_uri": str - key "code_text": str - key "entry_point": str - key "image_tag": str - key "type": Required[Literal[EvaluatorDefinitionType.CODE]] - blob_uri: str - code_text: str - data_schema: dict[str, Any] - entry_point: str - image_tag: str - init_parameters: dict[str, Any] - metrics: dict[str, EvaluatorMetric] - type: Literal[EvaluatorDefinitionType.CODE] - - - class azure.ai.projects.types.CodeConfiguration(TypedDict, total=False): - key "content_hash": str - key "dependency_resolution": Required[Union[str, CodeDependencyResolution]] - key "entry_point": Required[list[str]] - key "runtime": Required[str] - content_hash: str - dependency_resolution: Union[str, CodeDependencyResolution] - entry_point: list[str] - runtime: str - - - class azure.ai.projects.types.CodeInterpreterTool(TypedDict, total=False): - key "container": Union[str, AutoCodeInterpreterToolParam] - key "description": str - key "name": str - key "type": Required[Literal[ToolType.CODE_INTERPRETER]] - container: Union[str, AutoCodeInterpreterToolParam] - description: str - name: str - tool_configs: dict[str, ToolConfig] - type: Literal[ToolType.CODE_INTERPRETER] - - - class azure.ai.projects.types.CodeInterpreterToolboxTool(TypedDict, total=False): - key "container": Union[str, AutoCodeInterpreterToolParam] - key "description": str - key "name": str - key "type": Required[Literal[ToolboxToolType.CODE_INTERPRETER]] - container: Union[str, AutoCodeInterpreterToolParam] - description: str - name: str - tool_configs: dict[str, ToolConfig] - type: Literal[ToolboxToolType.CODE_INTERPRETER] - - - class azure.ai.projects.types.ComparisonFilter(TypedDict, total=False): - key "key": Required[str] - key "type": Required[Literal["eq", "ne", "gt", "gte", "lt", "lte", "in", "nin"]] - key "value": Required[Union[str, float, bool, list[Union[str, float]]]] - key: str - type: Literal[eq, ne, gt, gte, lt, lte, in, nin] - value: Union[str, float, bool, list[Union[str, float]]] - - - class azure.ai.projects.types.CompoundFilter(TypedDict, total=False): - key "filters": Required[list[Union[ComparisonFilter, Any]]] - key "type": Required[Literal["and", "or"]] - filters: list[Union[ComparisonFilter, Any]] - type: Literal[and, or] - - - class azure.ai.projects.types.ComputerTool(TypedDict, total=False): - key "type": Required[Literal[ToolType.COMPUTER]] - type: Literal[ToolType.COMPUTER] - - - class azure.ai.projects.types.ComputerUsePreviewTool(TypedDict, total=False): - key "display_height": Required[int] - key "display_width": Required[int] - key "environment": Required[Union[str, ComputerEnvironment]] - key "type": Required[Literal[ToolType.COMPUTER_USE_PREVIEW]] - display_height: int - display_width: int - environment: Union[str, ComputerEnvironment] - type: Literal[ToolType.COMPUTER_USE_PREVIEW] - - - class azure.ai.projects.types.ContainerAutoParam(TypedDict, total=False): - key "memory_limit": Optional[Union[str, ContainerMemoryLimit]] - key "type": Required[Literal[FunctionShellToolParamEnvironmentType.CONTAINER_AUTO]] - file_ids: list[str] - memory_limit: Union[str, ContainerMemoryLimit] - network_policy: ForwardRef('ContainerNetworkPolicyParam', module='types') - skills: list[ContainerSkill] - type: Literal[FunctionShellToolParamEnvironmentType.CONTAINER_AUTO] - - - class azure.ai.projects.types.ContainerConfiguration(TypedDict, total=False): - key "image": Required[str] - image: str - - - class azure.ai.projects.types.ContainerNetworkPolicyAllowlistParam(TypedDict, total=False): - key "allowed_domains": Required[list[str]] - key "type": Required[Literal[ContainerNetworkPolicyParamType.ALLOWLIST]] - allowed_domains: list[str] - domain_secrets: list[ContainerNetworkPolicyDomainSecretParam] - type: Literal[ContainerNetworkPolicyParamType.ALLOWLIST] - - - class azure.ai.projects.types.ContainerNetworkPolicyDisabledParam(TypedDict, total=False): - key "type": Required[Literal[ContainerNetworkPolicyParamType.DISABLED]] - type: Literal[ContainerNetworkPolicyParamType.DISABLED] - - - class azure.ai.projects.types.ContainerNetworkPolicyDomainSecretParam(TypedDict, total=False): - key "domain": Required[str] - key "name": Required[str] - key "value": Required[str] - domain: str - name: str - value: str - - - class azure.ai.projects.types.ContainerNetworkPolicyParamType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - ALLOWLIST = "allowlist" - DISABLED = "disabled" - - - class azure.ai.projects.types.ContainerSkillType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - INLINE = "inline" - SKILL_REFERENCE = "skill_reference" - - - class azure.ai.projects.types.ContinuousEvaluationRuleAction(TypedDict, total=False): - key "evalId": Required[str] - key "maxHourlyRuns": int - key "samplingRate": float - key "type": Required[Literal[EvaluationRuleActionType.CONTINUOUS_EVALUATION]] - eval_id: str - max_hourly_runs: int - sampling_rate: float - type: Literal[EvaluationRuleActionType.CONTINUOUS_EVALUATION] - - - class azure.ai.projects.types.CosmosDBIndex(TypedDict, total=False): - key "connectionName": Required[str] - key "containerName": Required[str] - key "databaseName": Required[str] - key "description": str - key "embeddingConfiguration": Required[EmbeddingConfiguration] - key "fieldMapping": Required[FieldMapping] - key "id": str - key "name": Required[str] - key "type": Required[Literal[IndexType.COSMOS_DB]] - key "version": Required[str] - connection_name: str - container_name: str - database_name: str - description: str - embedding_configuration: EmbeddingConfiguration - field_mapping: FieldMapping - id: str - name: str - tags: dict[str, str] - type: Literal[IndexType.COSMOS_DB] - version: str - - - class azure.ai.projects.types.CreateAgentVersionFromManifestRequest(TypedDict, total=False): - key "description": str - key "manifest_id": Required[str] - key "parameter_values": Required[dict[str, Any]] - description: str - manifest_id: str - metadata: dict[str, str] - parameter_values: dict[str, Any] - - - class azure.ai.projects.types.CreateAgentVersionRequest(TypedDict, total=False): - key "definition": Required[AgentDefinition] - key "description": str - key "draft": bool - blueprint_reference: ForwardRef('AgentBlueprintReference', module='types') - definition: AgentDefinition - description: str - draft: bool - metadata: dict[str, str] - - - class azure.ai.projects.types.CreateMemoryRequest(TypedDict, total=False): - key "content": Required[str] - key "kind": Required[Union[str, MemoryItemKind]] - key "scope": Required[str] - content: str - kind: Union[str, MemoryItemKind] - scope: str - - - class azure.ai.projects.types.CreateMemoryStoreRequest(TypedDict, total=False): - key "definition": Required[MemoryStoreDefinition] - key "description": str - key "name": Required[str] - definition: MemoryStoreDefinition - description: str - metadata: dict[str, str] - name: str - - - class azure.ai.projects.types.CreateOrUpdateRoutineRequest(TypedDict, total=False): - key "description": str - key "enabled": bool - action: ForwardRef('RoutineAction', module='types') - description: str - enabled: bool - triggers: dict[str, RoutineTrigger] - - - class azure.ai.projects.types.CreateSessionRequest(TypedDict, total=False): - key "agent_session_id": str - key "version_indicator": Required[VersionIndicator] - agent_session_id: str - version_indicator: VersionIndicator - - - class azure.ai.projects.types.CreateSkillVersionFromFilesBody(TypedDict, total=False): - key "default": bool - key "files": Required[list[Union[str, bytes, IO[str], IO[bytes], tuple[Optional[str], Union[str, bytes, IO[str], IO[bytes]]], tuple[Optional[str], Union[str, bytes, IO[str], IO[bytes]], Optional[str]]]]] - default: bool - files: list[FileType] - - - class azure.ai.projects.types.CreateSkillVersionRequest(TypedDict, total=False): - key "default": bool - default: bool - inline_content: ForwardRef('SkillInlineContent', module='types') - - - class azure.ai.projects.types.CreateToolboxVersionRequest(TypedDict, total=False): - key "description": str - key "tools": Required[list[ToolboxTool]] - description: str - metadata: dict[str, str] - policies: ForwardRef('ToolboxPolicies', module='types') - skills: list[ToolboxSkill] - tools: list[ToolboxTool] - - - class azure.ai.projects.types.CronTrigger(TypedDict, total=False): - key "endTime": str - key "expression": Required[str] - key "startTime": str - key "timeZone": str - key "type": Required[Literal[TriggerType.CRON]] - end_time: str - expression: str - start_time: str - time_zone: str - type: Literal[TriggerType.CRON] - - - class azure.ai.projects.types.CustomGrammarFormatParam(TypedDict, total=False): - key "definition": Required[str] - key "syntax": Required[Union[str, GrammarSyntax1]] - key "type": Required[Literal[CustomToolParamFormatType.GRAMMAR]] - definition: str - syntax: Union[str, GrammarSyntax1] - type: Literal[CustomToolParamFormatType.GRAMMAR] - - - class azure.ai.projects.types.CustomRoutineTrigger(TypedDict, total=False): - key "event_name": str - key "parameters": Required[dict[str, Any]] - key "provider": Required[str] - key "type": Required[Literal[RoutineTriggerType.CUSTOM]] - event_name: str - parameters: dict[str, Any] - provider: str - type: Literal[RoutineTriggerType.CUSTOM] - - - class azure.ai.projects.types.CustomTextFormatParam(TypedDict, total=False): - key "type": Required[Literal[CustomToolParamFormatType.TEXT]] - type: Literal[CustomToolParamFormatType.TEXT] - - - class azure.ai.projects.types.CustomToolParam(TypedDict, total=False): - key "defer_loading": bool - key "description": str - key "name": Required[str] - key "type": Required[Literal[ToolType.CUSTOM]] - defer_loading: bool - description: str - format: ForwardRef('CustomToolParamFormat', module='types') - name: str - type: Literal[ToolType.CUSTOM] - - - class azure.ai.projects.types.CustomToolParamFormatType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - GRAMMAR = "grammar" - TEXT = "text" - - - class azure.ai.projects.types.DailyRecurrenceSchedule(TypedDict, total=False): - key "hours": Required[list[int]] - key "type": Required[Literal[RecurrenceType.DAILY]] - hours: list[int] - type: Literal[RecurrenceType.DAILY] - - - class azure.ai.projects.types.DataGenerationJob(TypedDict, total=False): - key "created_at": Required[int] - key "finished_at": int - key "id": Required[str] - key "status": Required[Union[str, JobStatus]] - created_at: int - error: ForwardRef('ApiError', module='types') - finished_at: int - id: str - inputs: ForwardRef('DataGenerationJobInputs', module='types') - result: ForwardRef('DataGenerationJobResult', module='types') - status: Union[str, JobStatus] - - - class azure.ai.projects.types.DataGenerationJobInputs(TypedDict, total=False): - key "name": Required[str] - key "options": Required[DataGenerationJobOptions] - key "scenario": Required[Union[str, DataGenerationJobScenario]] - key "sources": Required[list[DataGenerationJobSource]] - name: str - options: DataGenerationJobOptions - output_options: ForwardRef('DataGenerationJobOutputOptions', module='types') - scenario: Union[str, DataGenerationJobScenario] - sources: list[DataGenerationJobSource] - - - class azure.ai.projects.types.DataGenerationJobOutputOptions(TypedDict, total=False): - key "description": str - key "name": str - description: str - name: str - tags: dict[str, str] - - - class azure.ai.projects.types.DataGenerationJobOutputType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DATASET = "dataset" - FILE = "file" - - - class azure.ai.projects.types.DataGenerationJobResult(TypedDict, total=False): - key "generated_samples": Required[int] - generated_samples: int - outputs: list[DataGenerationJobOutput] - token_usage: ForwardRef('DataGenerationTokenUsage', module='types') - - - class azure.ai.projects.types.DataGenerationJobSourceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - AGENT = "agent" - FILE = "file" - PROMPT = "prompt" - TRACES = "traces" - - - class azure.ai.projects.types.DataGenerationJobType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - SIMPLE_QNA = "simple_qna" - TOOL_USE = "tool_use" - TRACES = "traces" - - - class azure.ai.projects.types.DataGenerationModelOptions(TypedDict, total=False): - key "model": Required[str] - model: str - - - class azure.ai.projects.types.DataGenerationTokenUsage(TypedDict, total=False): - key "completion_tokens": Required[int] - key "prompt_tokens": Required[int] - key "total_tokens": Required[int] - completion_tokens: int - prompt_tokens: int - total_tokens: int - - - class azure.ai.projects.types.DatasetDataGenerationJobOutput(TypedDict, total=False): - key "description": str - key "id": str - key "name": str - key "type": Required[Literal[DataGenerationJobOutputType.DATASET]] - key "version": str - description: str - id: str - name: str - tags: dict[str, str] - type: Literal[DataGenerationJobOutputType.DATASET] - version: str - - - class azure.ai.projects.types.DatasetEvaluatorGenerationJobSource(TypedDict, total=False): - key "description": str - key "name": Required[str] - key "type": Required[Literal[EvaluatorGenerationJobSourceType.DATASET]] - key "version": str - description: str - name: str - type: Literal[EvaluatorGenerationJobSourceType.DATASET] - version: str - - - class azure.ai.projects.types.DatasetReference(TypedDict, total=False): - key "name": Required[str] - key "version": Required[str] - name: str - version: str - - - class azure.ai.projects.types.DatasetType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - URI_FILE = "uri_file" - URI_FOLDER = "uri_folder" - - - class azure.ai.projects.types.DeleteScopeRequest(TypedDict, total=False): - key "scope": Required[str] - scope: str - - - class azure.ai.projects.types.Dimension(TypedDict, total=False): - key "always_applicable": bool - key "description": Required[str] - key "id": Required[str] - key "weight": Required[int] - always_applicable: bool - description: str - id: str - weight: int - - - class azure.ai.projects.types.DispatchRoutineAsyncRequest(TypedDict, total=False): - payload: ForwardRef('RoutineDispatchPayload', module='types') - - - class azure.ai.projects.types.EmbeddingConfiguration(TypedDict, total=False): - key "embeddingField": Required[str] - key "modelDeploymentName": Required[str] - embedding_field: str - model_deployment_name: str - - - class azure.ai.projects.types.EmptyModelParam(TypedDict, total=False): - - - class azure.ai.projects.types.EndpointBasedEvaluatorDefinition(TypedDict, total=False): - key "connection_name": Required[str] - key "type": Required[Literal[EvaluatorDefinitionType.ENDPOINT]] - connection_name: str - data_schema: dict[str, Any] - init_parameters: dict[str, Any] - metrics: dict[str, EvaluatorMetric] - type: Literal[EvaluatorDefinitionType.ENDPOINT] - - - class azure.ai.projects.types.EntraAuthorizationScheme(TypedDict, total=False): - key "type": Required[Literal[AgentEndpointAuthorizationSchemeType.ENTRA]] - type: Literal[AgentEndpointAuthorizationSchemeType.ENTRA] - - - class azure.ai.projects.types.EvalResult(TypedDict, total=False): - key "name": Required[str] - key "passed": Required[bool] - key "score": Required[float] - key "type": Required[str] - name: str - passed: bool - score: float - type: str - - - class azure.ai.projects.types.EvalRunResultCompareItem(TypedDict, total=False): - key "deltaEstimate": Required[float] - key "pValue": Required[float] - key "treatmentEffect": Required[Union[str, TreatmentEffectType]] - key "treatmentRunId": Required[str] - key "treatmentRunSummary": Required[EvalRunResultSummary] - delta_estimate: float - p_value: float - treatment_effect: Union[str, TreatmentEffectType] - treatment_run_id: str - treatment_run_summary: EvalRunResultSummary - - - class azure.ai.projects.types.EvalRunResultComparison(TypedDict, total=False): - key "baselineRunSummary": Required[EvalRunResultSummary] - key "compareItems": Required[list[EvalRunResultCompareItem]] - key "evaluator": Required[str] - key "metric": Required[str] - key "testingCriteria": Required[str] - baseline_run_summary: EvalRunResultSummary - compare_items: list[EvalRunResultCompareItem] - evaluator: str - metric: str - testing_criteria: str - - - class azure.ai.projects.types.EvalRunResultSummary(TypedDict, total=False): - key "average": Required[float] - key "runId": Required[str] - key "sampleCount": Required[int] - key "standardDeviation": Required[float] - average: float - run_id: str - sample_count: int - standard_deviation: float - - - class azure.ai.projects.types.EvaluationComparisonInsightRequest(TypedDict, total=False): - key "baselineRunId": Required[str] - key "evalId": Required[str] - key "treatmentRunIds": Required[list[str]] - key "type": Required[Literal[InsightType.EVALUATION_COMPARISON]] - baseline_run_id: str - eval_id: str - treatment_run_ids: list[str] - type: Literal[InsightType.EVALUATION_COMPARISON] - - - class azure.ai.projects.types.EvaluationComparisonInsightResult(TypedDict, total=False): - key "comparisons": Required[list[EvalRunResultComparison]] - key "method": Required[str] - key "type": Required[Literal[InsightType.EVALUATION_COMPARISON]] - comparisons: list[EvalRunResultComparison] - method: str - type: Literal[InsightType.EVALUATION_COMPARISON] - - - class azure.ai.projects.types.EvaluationResultSample(TypedDict, total=False): - key "correlationInfo": Required[dict[str, Any]] - key "evaluationResult": Required[EvalResult] - key "features": Required[dict[str, Any]] - key "id": Required[str] - key "type": Required[Literal[SampleType.EVALUATION_RESULT_SAMPLE]] - correlation_info: dict[str, Any] - evaluation_result: EvalResult - features: dict[str, Any] - id: str - type: Literal[SampleType.EVALUATION_RESULT_SAMPLE] - - - class azure.ai.projects.types.EvaluationRule(TypedDict, total=False): - key "action": Required[EvaluationRuleAction] - key "description": str - key "displayName": str - key "enabled": Required[bool] - key "eventType": Required[Union[str, EvaluationRuleEventType]] - key "id": Required[str] - key "systemData": Required[dict[str, str]] - action: EvaluationRuleAction - description: str - display_name: str - enabled: bool - event_type: Union[str, EvaluationRuleEventType] - filter: ForwardRef('EvaluationRuleFilter', module='types') - id: str - system_data: dict[str, str] - - - class azure.ai.projects.types.EvaluationRuleActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - CONTINUOUS_EVALUATION = "continuousEvaluation" - HUMAN_EVALUATION_PREVIEW = "humanEvaluationPreview" - - - class azure.ai.projects.types.EvaluationRuleFilter(TypedDict, total=False): - key "agentName": Required[str] - agent_name: str - - - class azure.ai.projects.types.EvaluationRunClusterInsightRequest(TypedDict, total=False): - key "evalId": Required[str] - key "runIds": Required[list[str]] - key "type": Required[Literal[InsightType.EVALUATION_RUN_CLUSTER_INSIGHT]] - eval_id: str - modelConfiguration: ForwardRef('InsightModelConfiguration', module='types') - model_configuration: InsightModelConfiguration - run_ids: list[str] - type: Literal[InsightType.EVALUATION_RUN_CLUSTER_INSIGHT] - - - class azure.ai.projects.types.EvaluationRunClusterInsightResult(TypedDict, total=False): - key "clusterInsight": Required[ClusterInsightResult] - key "type": Required[Literal[InsightType.EVALUATION_RUN_CLUSTER_INSIGHT]] - cluster_insight: ClusterInsightResult - type: Literal[InsightType.EVALUATION_RUN_CLUSTER_INSIGHT] - - - class azure.ai.projects.types.EvaluationScheduleTask(TypedDict, total=False): - key "evalId": Required[str] - key "evalRun": Required[dict[str, Any]] - key "type": Required[Literal[ScheduleTaskType.EVALUATION]] - configuration: dict[str, str] - eval_id: str - eval_run: dict[str, Any] - type: Literal[ScheduleTaskType.EVALUATION] - - - class azure.ai.projects.types.EvaluationTaxonomy(TypedDict, total=False): - key "description": str - key "id": str - key "name": Required[str] - key "taxonomyInput": Required[EvaluationTaxonomyInput] - key "version": Required[str] - description: str - id: str - name: str - properties: dict[str, str] - tags: dict[str, str] - taxonomyCategories: list[TaxonomyCategory] - taxonomy_categories: list[TaxonomyCategory] - taxonomy_input: EvaluationTaxonomyInput - version: str - - - class azure.ai.projects.types.EvaluationTaxonomyInput(TypedDict, total=False): - key "riskCategories": Required[list[Union[str, RiskCategory]]] - key "target": Required[EvaluationTarget] - key "type": Required[Literal[EvaluationTaxonomyInputType.AGENT]] - risk_categories: list[Union[str, RiskCategory]] - target: EvaluationTarget - type: Literal[EvaluationTaxonomyInputType.AGENT] - - - class azure.ai.projects.types.EvaluationTaxonomyInputType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - AGENT = "agent" - POLICY = "policy" - - - class azure.ai.projects.types.EvaluatorCredentialRequest(TypedDict, total=False): - key "blob_uri": Required[str] - blob_uri: str - - - class azure.ai.projects.types.EvaluatorDefinitionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - CODE = "code" - ENDPOINT = "endpoint" - OPENAI_GRADERS = "openai_graders" - PROMPT = "prompt" - PROMPT_AND_CODE = "prompt_and_code" - RUBRIC = "rubric" - SERVICE = "service" - - - class azure.ai.projects.types.EvaluatorGenerationArtifacts(TypedDict, total=False): - key "dataset": Required[DatasetReference] - key "kinds": Required[list[str]] - dataset: DatasetReference - kinds: list[str] - - - class azure.ai.projects.types.EvaluatorGenerationInputs(TypedDict, total=False): - key "evaluator_description": str - key "evaluator_display_name": str - key "evaluator_name": Required[str] - key "model": Required[str] - key "sources": Required[list[EvaluatorGenerationJobSource]] - evaluator_description: str - evaluator_display_name: str - evaluator_name: str - model: str - sources: list[EvaluatorGenerationJobSource] - - - class azure.ai.projects.types.EvaluatorGenerationJob(TypedDict, total=False): - key "created_at": Required[int] - key "finished_at": int - key "id": Required[str] - key "status": Required[Union[str, JobStatus]] - created_at: int - error: ForwardRef('ApiError', module='types') - finished_at: int - id: str - inputs: ForwardRef('EvaluatorGenerationInputs', module='types') - result: ForwardRef('EvaluatorVersion', module='types') - status: Union[str, JobStatus] - usage: ForwardRef('EvaluatorGenerationTokenUsage', module='types') - - - class azure.ai.projects.types.EvaluatorGenerationJobSourceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - AGENT = "agent" - DATASET = "dataset" - PROMPT = "prompt" - TRACES = "traces" - - - class azure.ai.projects.types.EvaluatorGenerationTokenUsage(TypedDict, total=False): - key "input_tokens": Required[int] - key "output_tokens": Required[int] - key "total_tokens": Required[int] - input_tokens: int - output_tokens: int - total_tokens: int - - - class azure.ai.projects.types.EvaluatorMetric(TypedDict, total=False): - key "desirable_direction": Union[str, EvaluatorMetricDirection] - key "is_primary": bool - key "max_value": float - key "min_value": float - key "threshold": float - key "type": Union[str, EvaluatorMetricType] - desirable_direction: Union[str, EvaluatorMetricDirection] - is_primary: bool - max_value: float - min_value: float - threshold: float - type: Union[str, EvaluatorMetricType] - - - class azure.ai.projects.types.EvaluatorVersion(TypedDict, total=False): - key "categories": Required[list[Union[str, EvaluatorCategory]]] - key "created_at": Required[str] - key "created_by": Required[str] - key "definition": Required[EvaluatorDefinition] - key "description": str - key "display_name": str - key "evaluator_type": Required[Union[str, EvaluatorType]] - key "id": str - key "modified_at": Required[str] - key "name": Required[str] - key "version": Required[str] - categories: list[Union[str, EvaluatorCategory]] - created_at: str - created_by: str - definition: EvaluatorDefinition - description: str - display_name: str - evaluator_type: Union[str, EvaluatorType] - generation_artifacts: ForwardRef('EvaluatorGenerationArtifacts', module='types') - id: str - metadata: dict[str, str] - modified_at: str - name: str - supported_evaluation_levels: list[Union[str, EvaluationLevel]] - tags: dict[str, str] - version: str - - - class azure.ai.projects.types.ExternalAgentDefinition(TypedDict, total=False): - key "kind": Required[Literal[AgentKind.EXTERNAL]] - key "otel_agent_id": str - kind: Literal[AgentKind.EXTERNAL] - otel_agent_id: str - rai_config: ForwardRef('RaiConfig', module='types') - - - class azure.ai.projects.types.FabricDataAgentToolParameters(TypedDict, total=False): - project_connections: list[ToolProjectConnection] - - - class azure.ai.projects.types.FabricIQPreviewTool(TypedDict, total=False): - key "project_connection_id": Required[str] - key "require_approval": Optional[Union[MCPToolRequireApproval, str]] - key "server_label": str - key "server_url": str - key "type": Required[Literal[ToolType.FABRIC_IQ_PREVIEW]] - project_connection_id: str - require_approval: Union[MCPToolRequireApproval, str] - server_label: str - server_url: str - type: Literal[ToolType.FABRIC_IQ_PREVIEW] - - - class azure.ai.projects.types.FabricIQPreviewToolboxTool(TypedDict, total=False): - key "description": str - key "name": str - key "project_connection_id": Required[str] - key "require_approval": Optional[Union[MCPToolRequireApproval, str]] - key "server_label": str - key "server_url": str - key "type": Required[Literal[ToolboxToolType.FABRIC_IQ_PREVIEW]] - description: str - name: str - project_connection_id: str - require_approval: Union[MCPToolRequireApproval, str] - server_label: str - server_url: str - tool_configs: dict[str, ToolConfig] - type: Literal[ToolboxToolType.FABRIC_IQ_PREVIEW] - - - class azure.ai.projects.types.FieldMapping(TypedDict, total=False): - key "contentFields": Required[list[str]] - key "filepathField": str - key "titleField": str - key "urlField": str - content_fields: list[str] - filepath_field: str - metadataFields: list[str] - metadata_fields: list[str] - title_field: str - url_field: str - vectorFields: list[str] - vector_fields: list[str] - - - class azure.ai.projects.types.FileDataGenerationJobOutput(TypedDict, total=False): - key "filename": Required[str] - key "id": Required[str] - key "type": Required[Literal[DataGenerationJobOutputType.FILE]] - filename: str - id: str - type: Literal[DataGenerationJobOutputType.FILE] - - - class azure.ai.projects.types.FileDataGenerationJobSource(TypedDict, total=False): - key "description": str - key "id": Required[str] - key "type": Required[Literal[DataGenerationJobSourceType.FILE]] - description: str - id: str - type: Literal[DataGenerationJobSourceType.FILE] - - - class azure.ai.projects.types.FileDatasetVersion(TypedDict, total=False): - key "connectionName": str - key "dataUri": Required[str] - key "description": str - key "id": str - key "isReference": bool - key "name": Required[str] - key "type": Required[Literal[DatasetType.URI_FILE]] - key "version": Required[str] - connection_name: str - data_uri: str - description: str - id: str - is_reference: bool - name: str - tags: dict[str, str] - type: Literal[DatasetType.URI_FILE] - version: str - - - class azure.ai.projects.types.FileSearchTool(TypedDict, total=False): - key "description": str - key "filters": Optional[Filters] - key "max_num_results": int - key "name": str - key "type": Required[Literal[ToolType.FILE_SEARCH]] - key "vector_store_ids": Required[list[str]] - description: str - filters: Filters - max_num_results: int - name: str - ranking_options: ForwardRef('RankingOptions', module='types') - tool_configs: dict[str, ToolConfig] - type: Literal[ToolType.FILE_SEARCH] - vector_store_ids: list[str] - - - class azure.ai.projects.types.FileSearchToolboxTool(TypedDict, total=False): - key "description": str - key "filters": Optional[Filters] - key "max_num_results": int - key "name": str - key "type": Required[Literal[ToolboxToolType.FILE_SEARCH]] - description: str - filters: Filters - max_num_results: int - name: str - ranking_options: ForwardRef('RankingOptions', module='types') - tool_configs: dict[str, ToolConfig] - type: Literal[ToolboxToolType.FILE_SEARCH] - vector_store_ids: list[str] - - - class azure.ai.projects.types.FixedRatioVersionSelectionRule(TypedDict, total=False): - key "agent_version": Required[str] - key "traffic_percentage": Required[int] - key "type": Required[Literal[VersionSelectorType.FIXED_RATIO]] - agent_version: str - traffic_percentage: int - type: Literal[VersionSelectorType.FIXED_RATIO] - - - class azure.ai.projects.types.FolderDatasetVersion(TypedDict, total=False): - key "connectionName": str - key "dataUri": Required[str] - key "description": str - key "id": str - key "isReference": bool - key "name": Required[str] - key "type": Required[Literal[DatasetType.URI_FOLDER]] - key "version": Required[str] - connection_name: str - data_uri: str - description: str - id: str - is_reference: bool - name: str - tags: dict[str, str] - type: Literal[DatasetType.URI_FOLDER] - version: str - - - class azure.ai.projects.types.FoundryModelWarning(TypedDict, total=False): - key "code": Union[str, FoundryModelWarningCode] - key "message": str - code: Union[str, FoundryModelWarningCode] - message: str - - - class azure.ai.projects.types.FunctionShellToolParam(TypedDict, total=False): - key "description": str - key "environment": Optional[FunctionShellToolParamEnvironment] - key "name": str - key "type": Required[Literal[ToolType.SHELL]] - description: str - environment: FunctionShellToolParamEnvironment - name: str - tool_configs: dict[str, ToolConfig] - type: Literal[ToolType.SHELL] - - - class azure.ai.projects.types.FunctionShellToolParamEnvironmentContainerReferenceParam(TypedDict, total=False): - key "container_id": Required[str] - key "type": Required[Literal[FunctionShellToolParamEnvironmentType.CONTAINER_REFERENCE]] - container_id: str - type: Literal[FunctionShellToolParamEnvironmentType.CONTAINER_REFERENCE] - - - class azure.ai.projects.types.FunctionShellToolParamEnvironmentLocalEnvironmentParam(TypedDict, total=False): - key "type": Required[Literal[FunctionShellToolParamEnvironmentType.LOCAL]] - skills: list[LocalSkillParam] - type: Literal[FunctionShellToolParamEnvironmentType.LOCAL] - - - class azure.ai.projects.types.FunctionShellToolParamEnvironmentType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - CONTAINER_AUTO = "container_auto" - CONTAINER_REFERENCE = "container_reference" - LOCAL = "local" - - - class azure.ai.projects.types.FunctionTool(TypedDict, total=False): - key "defer_loading": bool - key "description": Optional[str] - key "name": Required[str] - key "parameters": Required[Optional[dict[str, Any]]] - key "strict": Required[Optional[bool]] - key "type": Required[Literal[ToolType.FUNCTION]] - defer_loading: bool - description: str - name: str - parameters: dict[str, Any] - strict: bool - type: Literal[ToolType.FUNCTION] - - - class azure.ai.projects.types.FunctionToolParam(TypedDict, total=False): - key "defer_loading": bool - key "description": Optional[str] - key "name": Required[str] - key "parameters": Optional[EmptyModelParam] - key "strict": Optional[bool] - key "type": Required[Literal["function"]] - defer_loading: bool - description: str - name: str - parameters: EmptyModelParam - strict: bool - type: Literal[function] - - - class azure.ai.projects.types.GitHubIssueRoutineTrigger(TypedDict, total=False): - key "connection_id": Required[str] - key "issue_event": Required[Union[str, GitHubIssueEvent]] - key "owner": Required[str] - key "repository": Required[str] - key "type": Required[Literal[RoutineTriggerType.GITHUB_ISSUE]] - connection_id: str - issue_event: Union[str, GitHubIssueEvent] - owner: str - repository: str - type: Literal[RoutineTriggerType.GITHUB_ISSUE] - - - class azure.ai.projects.types.HeaderTelemetryEndpointAuth(TypedDict, total=False): - key "header_name": Required[str] - key "secret_id": Required[str] - key "secret_key": Required[str] - key "type": Required[Literal[TelemetryEndpointAuthType.HEADER]] - header_name: str - secret_id: str - secret_key: str - type: Literal[TelemetryEndpointAuthType.HEADER] - - - class azure.ai.projects.types.HostedAgentDefinition(TypedDict, total=False): - key "cpu": Required[str] - key "kind": Required[Literal[AgentKind.HOSTED]] - key "memory": Required[str] - code_configuration: ForwardRef('CodeConfiguration', module='types') - container_configuration: ForwardRef('ContainerConfiguration', module='types') - cpu: str - environment_variables: dict[str, str] - kind: Literal[AgentKind.HOSTED] - memory: str - protocol_versions: list[ProtocolVersionRecord] - rai_config: ForwardRef('RaiConfig', module='types') - telemetry_config: ForwardRef('TelemetryConfig', module='types') - - - class azure.ai.projects.types.HourlyRecurrenceSchedule(TypedDict, total=False): - key "type": Required[Literal[RecurrenceType.HOURLY]] - type: Literal[RecurrenceType.HOURLY] - - - class azure.ai.projects.types.HumanEvaluationPreviewRuleAction(TypedDict, total=False): - key "templateId": Required[str] - key "type": Required[Literal[EvaluationRuleActionType.HUMAN_EVALUATION_PREVIEW]] - template_id: str - type: Literal[EvaluationRuleActionType.HUMAN_EVALUATION_PREVIEW] - - - class azure.ai.projects.types.HybridSearchOptions(TypedDict, total=False): - key "embedding_weight": Required[float] - key "text_weight": Required[float] - embedding_weight: float - text_weight: float - - - class azure.ai.projects.types.ImageGenTool(TypedDict, total=False): - key "action": Union[str, ImageGenAction] - key "background": Literal["transparent", "opaque", "auto"] - key "description": str - key "input_fidelity": Optional[Union[str, InputFidelity]] - key "model": Union[Literal["gpt-image-1"], Literal["gpt-image-1-mini"], Literal["gpt-image-5"], str] - key "moderation": Literal["auto", "low"] - key "name": str - key "output_compression": int - key "output_format": Literal["png", "webp", "jpeg"] - key "partial_images": int - key "quality": Literal["low", "medium", "high", "auto"] - key "size": Union[Literal["1024x1024"], Literal["1024x1536"], Literal["1536x1024"], Literal["auto"], str] - key "type": Required[Literal[ToolType.IMAGE_GENERATION]] - action: Union[str, ImageGenAction] - background: Literal[transparent, opaque, auto] - description: str - input_fidelity: Union[str, InputFidelity] - input_image_mask: ForwardRef('ImageGenToolInputImageMask', module='types') - model: Union[Literal[gpt-image-1], Literal[gpt-image-1-mini], Literal[gpt-image-5], str] - moderation: Literal[auto, low] - name: str - output_compression: int - output_format: Literal[png, webp, jpeg] - partial_images: int - quality: Literal[low, medium, high, auto] - size: Union[Literal[1024x1024], Literal[1024x1536], Literal[1536x1024], Literal[auto], str] - tool_configs: dict[str, ToolConfig] - type: Literal[ToolType.IMAGE_GENERATION] - - - class azure.ai.projects.types.ImageGenToolInputImageMask(TypedDict, total=False): - key "file_id": str - key "image_url": str - file_id: str - image_url: str - - - class azure.ai.projects.types.IndexType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - AZURE_SEARCH = "AzureSearch" - COSMOS_DB = "CosmosDBNoSqlVectorStore" - MANAGED_AZURE_SEARCH = "ManagedAzureSearch" - - - class azure.ai.projects.types.InlineSkillParam(TypedDict, total=False): - key "description": Required[str] - key "name": Required[str] - key "source": Required[InlineSkillSourceParam] - key "type": Required[Literal[ContainerSkillType.INLINE]] - description: str - name: str - source: InlineSkillSourceParam - type: Literal[ContainerSkillType.INLINE] - - - class azure.ai.projects.types.InlineSkillSourceParam(TypedDict, total=False): - key "data": Required[str] - key "media_type": Required[Literal["application/zip"]] - key "type": Required[Literal["base64"]] - data: str - media_type: Literal[application/zip] - type: Literal[base64] - - - class azure.ai.projects.types.Insight(TypedDict, total=False): - key "displayName": Required[str] - key "id": Required[str] - key "metadata": Required[InsightsMetadata] - key "request": Required[InsightRequest] - key "state": Required[Union[str, OperationState]] - display_name: str - insight_id: str - metadata: InsightsMetadata - request: InsightRequest - result: ForwardRef('InsightResult', module='types') - state: Union[str, OperationState] - - - class azure.ai.projects.types.InsightCluster(TypedDict, total=False): - key "description": Required[str] - key "id": Required[str] - key "label": Required[str] - key "suggestion": Required[str] - key "suggestionTitle": Required[str] - key "weight": Required[int] - description: str - id: str - label: str - samples: list[InsightSample] - subClusters: list[InsightCluster] - sub_clusters: list[InsightCluster] - suggestion: str - suggestion_title: str - weight: int - - - class azure.ai.projects.types.InsightModelConfiguration(TypedDict, total=False): - key "modelDeploymentName": Required[str] - model_deployment_name: str - - - class azure.ai.projects.types.InsightSample(TypedDict, total=False): - key "correlationInfo": Required[dict[str, Any]] - key "evaluationResult": Required[EvalResult] - key "features": Required[dict[str, Any]] - key "id": Required[str] - key "type": Required[Literal[SampleType.EVALUATION_RESULT_SAMPLE]] - correlation_info: dict[str, Any] - evaluation_result: EvalResult - features: dict[str, Any] - id: str - type: Literal[SampleType.EVALUATION_RESULT_SAMPLE] - - - class azure.ai.projects.types.InsightScheduleTask(TypedDict, total=False): - key "insight": Required[Insight] - key "type": Required[Literal[ScheduleTaskType.INSIGHT]] - configuration: dict[str, str] - insight: Insight - type: Literal[ScheduleTaskType.INSIGHT] - - - class azure.ai.projects.types.InsightSummary(TypedDict, total=False): - key "method": Required[str] - key "sampleCount": Required[int] - key "uniqueClusterCount": Required[int] - key "uniqueSubclusterCount": Required[int] - key "usage": Required[ClusterTokenUsage] - method: str - sample_count: int - unique_cluster_count: int - unique_subcluster_count: int - usage: ClusterTokenUsage - - - class azure.ai.projects.types.InsightType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - AGENT_CLUSTER_INSIGHT = "AgentClusterInsight" - EVALUATION_COMPARISON = "EvaluationComparison" - EVALUATION_RUN_CLUSTER_INSIGHT = "EvaluationRunClusterInsight" - - - class azure.ai.projects.types.InsightsMetadata(TypedDict, total=False): - key "completedAt": str - key "createdAt": Required[str] - completed_at: str - created_at: str - - - class azure.ai.projects.types.InvocationsProtocolConfiguration(TypedDict, total=False): - - - class azure.ai.projects.types.InvocationsWsProtocolConfiguration(TypedDict, total=False): - - - class azure.ai.projects.types.InvokeAgentInvocationsApiDispatchPayload(TypedDict, total=False): - key "input": Required[Any] - key "type": Required[Literal[RoutineDispatchPayloadType.INVOKE_AGENT_INVOCATIONS_API]] - input: Any - type: Literal[RoutineDispatchPayloadType.INVOKE_AGENT_INVOCATIONS_API] - - - class azure.ai.projects.types.InvokeAgentInvocationsApiRoutineAction(TypedDict, total=False): - key "agent_endpoint_id": str - key "agent_name": str - key "input": Any - key "session_id": str - key "type": Required[Literal[RoutineActionType.INVOKE_AGENT_INVOCATIONS_API]] - agent_endpoint_id: str - agent_name: str - input: Any - session_id: str - type: Literal[RoutineActionType.INVOKE_AGENT_INVOCATIONS_API] - - - class azure.ai.projects.types.InvokeAgentResponsesApiDispatchPayload(TypedDict, total=False): - key "input": Required[Any] - key "type": Required[Literal[RoutineDispatchPayloadType.INVOKE_AGENT_RESPONSES_API]] - input: Any - type: Literal[RoutineDispatchPayloadType.INVOKE_AGENT_RESPONSES_API] - - - class azure.ai.projects.types.InvokeAgentResponsesApiRoutineAction(TypedDict, total=False): - key "agent_endpoint_id": str - key "agent_name": str - key "conversation": str - key "input": Any - key "type": Required[Literal[RoutineActionType.INVOKE_AGENT_RESPONSES_API]] - agent_endpoint_id: str - agent_name: str - conversation: str - input: Any - type: Literal[RoutineActionType.INVOKE_AGENT_RESPONSES_API] - - - class azure.ai.projects.types.ListMemoriesRequest(TypedDict, total=False): - key "scope": Required[str] - scope: str - - - class azure.ai.projects.types.LocalShellToolParam(TypedDict, total=False): - key "description": str - key "name": str - key "type": Required[Literal[ToolType.LOCAL_SHELL]] - description: str - name: str - tool_configs: dict[str, ToolConfig] - type: Literal[ToolType.LOCAL_SHELL] - - - class azure.ai.projects.types.LocalSkillParam(TypedDict, total=False): - key "description": Required[str] - key "name": Required[str] - key "path": Required[str] - description: str - name: str - path: str - - - class azure.ai.projects.types.LoraConfig(TypedDict, total=False): - key "alpha": int - key "dropout": float - key "rank": int - alpha: int - dropout: float - rank: int - targetModules: list[str] - target_modules: list[str] - - - class azure.ai.projects.types.MCPTool(TypedDict, total=False): - key "allowed_tools": Optional[Union[list[str], MCPToolFilter]] - key "authorization": str - key "connector_id": Literal["connector_dropbox", "connector_gmail", "connector_googlecalendar", "connector_googledrive", "connector_microsoftteams", "connector_outlookcalendar", "connector_outlookemail", "connector_sharepoint"] - key "defer_loading": bool - key "headers": Optional[dict[str, str]] - key "project_connection_id": str - key "require_approval": Optional[Union[MCPToolRequireApproval, Literal["always"], Literal["never"]]] - key "server_description": str - key "server_label": Required[str] - key "server_url": str - key "tunnel_id": str - key "type": Required[Literal[ToolType.MCP]] - allowed_tools: Union[list[str], MCPToolFilter] - authorization: str - connector_id: Literal[connector_dropbox, connector_gmail, connector_googlecalendar, connector_googledrive, connector_microsoftteams, - defer_loading: bool - headers: dict[str, str] - project_connection_id: str - require_approval: Union[MCPToolRequireApproval, Literal[always], Literal[never]] - server_description: str - server_label: str - server_url: str - tool_configs: dict[str, ToolConfig] - tunnel_id: str - type: Literal[ToolType.MCP] - - - class azure.ai.projects.types.MCPToolFilter(TypedDict, total=False): - key "read_only": bool - read_only: bool - tool_names: list[str] - - - class azure.ai.projects.types.MCPToolRequireApproval(TypedDict, total=False): - always: ForwardRef('MCPToolFilter', module='types') - never: ForwardRef('MCPToolFilter', module='types') - - - class azure.ai.projects.types.MCPToolboxTool(TypedDict, total=False): - key "allowed_tools": Optional[Union[list[str], MCPToolFilter]] - key "authorization": str - key "connector_id": Literal["connector_dropbox", "connector_gmail", "connector_googlecalendar", "connector_googledrive", "connector_microsoftteams", "connector_outlookcalendar", "connector_outlookemail", "connector_sharepoint"] - key "defer_loading": bool - key "description": str - key "headers": Optional[dict[str, str]] - key "name": str - key "project_connection_id": str - key "require_approval": Optional[Union[MCPToolRequireApproval, Literal["always"], Literal["never"]]] - key "server_description": str - key "server_label": Required[str] - key "server_url": str - key "tunnel_id": str - key "type": Required[Literal[ToolboxToolType.MCP]] - allowed_tools: Union[list[str], MCPToolFilter] - authorization: str - connector_id: Literal[connector_dropbox, connector_gmail, connector_googlecalendar, connector_googledrive, connector_microsoftteams, - defer_loading: bool - description: str - headers: dict[str, str] - name: str - project_connection_id: str - require_approval: Union[MCPToolRequireApproval, Literal[always], Literal[never]] - server_description: str - server_label: str - server_url: str - tool_configs: dict[str, ToolConfig] - tunnel_id: str - type: Literal[ToolboxToolType.MCP] - - - class azure.ai.projects.types.ManagedAgentIdentityBlueprintReference(TypedDict, total=False): - key "blueprint_id": Required[str] - key "type": Required[Literal[AgentBlueprintReferenceType.MANAGED_AGENT_IDENTITY_BLUEPRINT]] - blueprint_id: str - type: Literal[AgentBlueprintReferenceType.MANAGED_AGENT_IDENTITY_BLUEPRINT] - - - class azure.ai.projects.types.ManagedAzureAISearchIndex(TypedDict, total=False): - key "description": str - key "id": str - key "name": Required[str] - key "type": Required[Literal[IndexType.MANAGED_AZURE_SEARCH]] - key "vectorStoreId": Required[str] - key "version": Required[str] - description: str - id: str - name: str - tags: dict[str, str] - type: Literal[IndexType.MANAGED_AZURE_SEARCH] - vector_store_id: str - version: str - - - class azure.ai.projects.types.McpProtocolConfiguration(TypedDict, total=False): - - - class azure.ai.projects.types.MemorySearchOptions(TypedDict, total=False): - key "max_memories": int - max_memories: int - - - class azure.ai.projects.types.MemorySearchPreviewTool(TypedDict, total=False): - key "memory_store_name": Required[str] - key "scope": Required[str] - key "type": Required[Literal[ToolType.MEMORY_SEARCH_PREVIEW]] - key "update_delay": int - memory_store_name: str - scope: str - search_options: ForwardRef('MemorySearchOptions', module='types') - type: Literal[ToolType.MEMORY_SEARCH_PREVIEW] - update_delay: int - - - class azure.ai.projects.types.MemoryStoreDefaultDefinition(TypedDict, total=False): - key "chat_model": Required[str] - key "embedding_model": Required[str] - key "kind": Required[Literal[MemoryStoreKind.DEFAULT]] - chat_model: str - embedding_model: str - kind: Literal[MemoryStoreKind.DEFAULT] - options: ForwardRef('MemoryStoreDefaultOptions', module='types') - - - class azure.ai.projects.types.MemoryStoreDefaultOptions(TypedDict, total=False): - key "chat_summary_enabled": Required[bool] - key "default_ttl_seconds": str - key "procedural_memory_enabled": bool - key "user_profile_details": str - key "user_profile_enabled": Required[bool] - chat_summary_enabled: bool - default_ttl_seconds: str - procedural_memory_enabled: bool - user_profile_details: str - user_profile_enabled: bool - - - class azure.ai.projects.types.MemoryStoreDefinition(TypedDict, total=False): - key "chat_model": Required[str] - key "embedding_model": Required[str] - key "kind": Required[Literal[MemoryStoreKind.DEFAULT]] - chat_model: str - embedding_model: str - kind: Literal[MemoryStoreKind.DEFAULT] - options: ForwardRef('MemoryStoreDefaultOptions', module='types') - - - class azure.ai.projects.types.MemoryStoreKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DEFAULT = "default" - - - class azure.ai.projects.types.MicrosoftFabricPreviewTool(TypedDict, total=False): - key "fabric_dataagent_preview": Required[FabricDataAgentToolParameters] - key "type": Required[Literal[ToolType.FABRIC_DATAAGENT_PREVIEW]] - fabric_dataagent_preview: FabricDataAgentToolParameters - type: Literal[ToolType.FABRIC_DATAAGENT_PREVIEW] - - - class azure.ai.projects.types.ModelCredentialRequest(TypedDict, total=False): - key "blobUri": Required[str] - blob_uri: str - - - class azure.ai.projects.types.ModelPendingUploadRequest(TypedDict, total=False): - key "connectionName": str - key "pendingUploadId": str - key "pendingUploadType": Required[Literal[PendingUploadType.TEMPORARY_BLOB_REFERENCE]] - connection_name: str - pending_upload_id: str - pending_upload_type: Literal[PendingUploadType.TEMPORARY_BLOB_REFERENCE] - - - class azure.ai.projects.types.ModelSamplingParams(TypedDict, total=False): - key "max_completion_tokens": int - key "seed": int - key "temperature": float - key "top_p": float - max_completion_tokens: int - seed: int - temperature: float - top_p: float - - - class azure.ai.projects.types.ModelSourceData(TypedDict, total=False): - key "jobId": str - key "sourceType": Union[str, FoundryModelSourceType] - job_id: str - source_type: Union[str, FoundryModelSourceType] - - - class azure.ai.projects.types.ModelVersion(TypedDict, total=False): - key "baseModel": str - key "blobUri": Required[str] - key "description": str - key "id": str - key "name": Required[str] - key "version": Required[str] - key "weightType": Union[str, FoundryModelWeightType] - artifactProfile: ForwardRef('ArtifactProfile', module='types') - artifact_profile: ArtifactProfile - base_model: str - blob_uri: str - description: str - id: str - loraConfig: ForwardRef('LoraConfig', module='types') - lora_config: LoraConfig - name: str - source: ForwardRef('ModelSourceData', module='types') - tags: dict[str, str] - version: str - warnings: list[FoundryModelWarning] - weight_type: Union[str, FoundryModelWeightType] - - - class azure.ai.projects.types.MonthlyRecurrenceSchedule(TypedDict, total=False): - key "daysOfMonth": Required[list[int]] - key "type": Required[Literal[RecurrenceType.MONTHLY]] - days_of_month: list[int] - type: Literal[RecurrenceType.MONTHLY] - - - class azure.ai.projects.types.NamespaceToolParam(TypedDict, total=False): - key "description": Required[str] - key "name": Required[str] - key "tools": Required[list[Union[FunctionToolParam, CustomToolParam]]] - key "type": Required[Literal[ToolType.NAMESPACE]] - description: str - name: str - tools: list[Union[FunctionToolParam, CustomToolParam]] - type: Literal[ToolType.NAMESPACE] - - - class azure.ai.projects.types.OneTimeTrigger(TypedDict, total=False): - key "timeZone": str - key "triggerAt": Required[str] - key "type": Required[Literal[TriggerType.ONE_TIME]] - time_zone: str - trigger_at: str - type: Literal[TriggerType.ONE_TIME] - - - class azure.ai.projects.types.OpenApiAnonymousAuthDetails(TypedDict, total=False): - key "type": Required[Literal[OpenApiAuthType.ANONYMOUS]] - type: Literal[OpenApiAuthType.ANONYMOUS] - - - class azure.ai.projects.types.OpenApiAuthType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - ANONYMOUS = "anonymous" - MANAGED_IDENTITY = "managed_identity" - PROJECT_CONNECTION = "project_connection" - - - class azure.ai.projects.types.OpenApiFunctionDefinition(TypedDict, total=False): - key "auth": Required[OpenApiAuthDetails] - key "description": str - key "name": Required[str] - key "spec": Required[dict[str, Any]] - auth: OpenApiAuthDetails - default_params: list[str] - description: str - functions: list[OpenApiFunctionDefinitionFunction] - name: str - spec: dict[str, Any] - - - class azure.ai.projects.types.OpenApiFunctionDefinitionFunction(TypedDict, total=False): - key "description": str - key "name": Required[str] - key "parameters": Required[dict[str, Any]] - description: str - name: str - parameters: dict[str, Any] - - - class azure.ai.projects.types.OpenApiManagedAuthDetails(TypedDict, total=False): - key "security_scheme": Required[OpenApiManagedSecurityScheme] - key "type": Required[Literal[OpenApiAuthType.MANAGED_IDENTITY]] - security_scheme: OpenApiManagedSecurityScheme - type: Literal[OpenApiAuthType.MANAGED_IDENTITY] - - - class azure.ai.projects.types.OpenApiManagedSecurityScheme(TypedDict, total=False): - key "audience": Required[str] - audience: str - - - class azure.ai.projects.types.OpenApiProjectConnectionAuthDetails(TypedDict, total=False): - key "security_scheme": Required[OpenApiProjectConnectionSecurityScheme] - key "type": Required[Literal[OpenApiAuthType.PROJECT_CONNECTION]] - security_scheme: OpenApiProjectConnectionSecurityScheme - type: Literal[OpenApiAuthType.PROJECT_CONNECTION] - - - class azure.ai.projects.types.OpenApiProjectConnectionSecurityScheme(TypedDict, total=False): - key "project_connection_id": Required[str] - project_connection_id: str - - - class azure.ai.projects.types.OpenApiTool(TypedDict, total=False): - key "openapi": Required[OpenApiFunctionDefinition] - key "type": Required[Literal[ToolType.OPENAPI]] - openapi: OpenApiFunctionDefinition - tool_configs: dict[str, ToolConfig] - type: Literal[ToolType.OPENAPI] - - - class azure.ai.projects.types.OpenApiToolboxTool(TypedDict, total=False): - key "description": str - key "name": str - key "openapi": Required[OpenApiFunctionDefinition] - key "type": Required[Literal[ToolboxToolType.OPENAPI]] - description: str - name: str - openapi: OpenApiFunctionDefinition - tool_configs: dict[str, ToolConfig] - type: Literal[ToolboxToolType.OPENAPI] - - - class azure.ai.projects.types.OptimizationAgentIdentifier(TypedDict, total=False): - key "agent_name": Required[str] - key "agent_version": str - agent_name: str - agent_version: str - - - class azure.ai.projects.types.OptimizationCandidate(TypedDict, total=False): - key "avg_score": Required[float] - key "avg_tokens": Required[float] - key "candidate_id": str - key "eval_id": str - key "eval_run_id": str - key "name": Required[str] - avg_score: float - avg_tokens: float - candidate_id: str - eval_id: str - eval_run_id: str - mutations: dict[str, Any] - name: str - promotion: ForwardRef('PromotionInfo', module='types') - - - class azure.ai.projects.types.OptimizationDatasetCriterion(TypedDict, total=False): - key "instruction": Required[str] - key "name": Required[str] - instruction: str - name: str - - - class azure.ai.projects.types.OptimizationDatasetInputType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - INLINE = "inline" - REFERENCE = "reference" - - - class azure.ai.projects.types.OptimizationDatasetItem(TypedDict, total=False): - key "desired_num_turns": int - key "ground_truth": str - key "query": str - criteria: list[OptimizationDatasetCriterion] - desired_num_turns: int - ground_truth: str - query: str - - - class azure.ai.projects.types.OptimizationEvaluatorRef(TypedDict, total=False): - key "name": Required[str] - key "version": str - name: str - version: str - - - class azure.ai.projects.types.OptimizationInlineDatasetInput(TypedDict, total=False): - key "items": Required[list[OptimizationDatasetItem]] - key "type": Required[Literal[OptimizationDatasetInputType.INLINE]] - dataset_items: list[OptimizationDatasetItem] - type: Literal[OptimizationDatasetInputType.INLINE] - - - class azure.ai.projects.types.OptimizationJob(TypedDict, total=False): - key "created_at": Required[int] - key "id": Required[str] - key "status": Required[Union[str, JobStatus]] - key "updated_at": Required[int] - created_at: int - error: ForwardRef('ApiError', module='types') - id: str - inputs: ForwardRef('OptimizationJobInputs', module='types') - progress: ForwardRef('OptimizationJobProgress', module='types') - result: ForwardRef('OptimizationJobResult', module='types') - status: Union[str, JobStatus] - updated_at: int - warnings: list[str] - - - class azure.ai.projects.types.OptimizationJobInputs(TypedDict, total=False): - key "agent": Required[OptimizationAgentIdentifier] - key "evaluators": Required[list[OptimizationEvaluatorRef]] - key "train_dataset": Required[OptimizationDatasetInput] - agent: OptimizationAgentIdentifier - evaluators: list[OptimizationEvaluatorRef] - options: ForwardRef('OptimizationOptions', module='types') - train_dataset: OptimizationDatasetInput - validation_dataset: ForwardRef('OptimizationDatasetInput', module='types') - - - class azure.ai.projects.types.OptimizationJobProgress(TypedDict, total=False): - key "best_score": Required[float] - key "candidates_completed": Required[int] - key "elapsed_seconds": Required[float] - best_score: float - candidates_completed: int - elapsed_seconds: float - - - class azure.ai.projects.types.OptimizationJobResult(TypedDict, total=False): - key "baseline": str - key "best": str - baseline: str - best: str - candidates: list[OptimizationCandidate] - - - class azure.ai.projects.types.OptimizationOptions(TypedDict, total=False): - key "eval_model": str - key "evaluation_level": Union[str, EvaluationLevel] - key "max_candidates": int - key "optimization_model": str - eval_model: str - evaluation_level: Union[str, EvaluationLevel] - max_candidates: int - optimization_config: dict[str, Any] - optimization_model: str - - - class azure.ai.projects.types.OptimizationReferenceDatasetInput(TypedDict, total=False): - key "name": Required[str] - key "type": Required[Literal[OptimizationDatasetInputType.REFERENCE]] - key "version": str - name: str - type: Literal[OptimizationDatasetInputType.REFERENCE] - version: str - - - class azure.ai.projects.types.OtlpTelemetryEndpoint(TypedDict, total=False): - key "data": Required[list[Union[str, TelemetryDataKind]]] - key "endpoint": Required[str] - key "kind": Required[Literal[TelemetryEndpointKind.OTLP]] - key "protocol": Required[Union[str, TelemetryTransportProtocol]] - auth: ForwardRef('TelemetryEndpointAuth', module='types') - data: list[Union[str, TelemetryDataKind]] - endpoint: str - kind: Literal[TelemetryEndpointKind.OTLP] - protocol: Union[str, TelemetryTransportProtocol] - - - class azure.ai.projects.types.PatchAgentObjectRequest(TypedDict, total=False): - agent_card: ForwardRef('AgentCard', module='types') - agent_endpoint: ForwardRef('AgentEndpointConfig', module='types') - - - class azure.ai.projects.types.PendingUploadRequest(TypedDict, total=False): - key "connectionName": str - key "pendingUploadId": str - key "pendingUploadType": Required[Literal[PendingUploadType.BLOB_REFERENCE]] - connection_name: str - pending_upload_id: str - pending_upload_type: Literal[PendingUploadType.BLOB_REFERENCE] - - - class azure.ai.projects.types.PendingUploadType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - BLOB_REFERENCE = "BlobReference" - NONE = "None" - TEMPORARY_BLOB_REFERENCE = "TemporaryBlobReference" - - - class azure.ai.projects.types.PromotionInfo(TypedDict, total=False): - key "agent_name": Required[str] - key "agent_version": Required[str] - key "promoted_at": Required[int] - agent_name: str - agent_version: str - promoted_at: int - - - class azure.ai.projects.types.PromptAgentDefinition(TypedDict, total=False): - key "instructions": Optional[str] - key "kind": Required[Literal[AgentKind.PROMPT]] - key "model": Required[str] - key "reasoning": Optional[Reasoning] - key "temperature": Optional[float] - key "tool_choice": Union[str, ToolChoiceParam] - key "top_p": Optional[float] - instructions: str - kind: Literal[AgentKind.PROMPT] - model: str - rai_config: ForwardRef('RaiConfig', module='types') - reasoning: Reasoning - structured_inputs: dict[str, StructuredInputDefinition] - temperature: float - text: ForwardRef('PromptAgentDefinitionTextOptions', module='types') - tool_choice: Union[str, ToolChoiceParam] - tools: list[Tool] - top_p: float - - - class azure.ai.projects.types.PromptAgentDefinitionTextOptions(TypedDict, total=False): - format: ForwardRef('TextResponseFormat', module='types') - - - class azure.ai.projects.types.PromptBasedEvaluatorDefinition(TypedDict, total=False): - key "prompt_text": Required[str] - key "type": Required[Literal[EvaluatorDefinitionType.PROMPT]] - data_schema: dict[str, Any] - init_parameters: dict[str, Any] - metrics: dict[str, EvaluatorMetric] - prompt_text: str - type: Literal[EvaluatorDefinitionType.PROMPT] - - - class azure.ai.projects.types.PromptDataGenerationJobSource(TypedDict, total=False): - key "description": str - key "prompt": Required[str] - key "type": Required[Literal[DataGenerationJobSourceType.PROMPT]] - description: str - prompt: str - type: Literal[DataGenerationJobSourceType.PROMPT] - - - class azure.ai.projects.types.PromptEvaluatorGenerationJobSource(TypedDict, total=False): - key "description": str - key "prompt": Required[str] - key "type": Required[Literal[EvaluatorGenerationJobSourceType.PROMPT]] - description: str - prompt: str - type: Literal[EvaluatorGenerationJobSourceType.PROMPT] - - - class azure.ai.projects.types.ProtocolConfiguration(TypedDict, total=False): - a2a: ForwardRef('A2AProtocolConfiguration', module='types') - activity: ForwardRef('ActivityProtocolConfiguration', module='types') - invocations: ForwardRef('InvocationsProtocolConfiguration', module='types') - invocations_ws: ForwardRef('InvocationsWsProtocolConfiguration', module='types') - mcp: ForwardRef('McpProtocolConfiguration', module='types') - responses: ForwardRef('ResponsesProtocolConfiguration', module='types') - - - class azure.ai.projects.types.ProtocolVersionRecord(TypedDict, total=False): - key "protocol": Required[Union[str, AgentEndpointProtocol]] - key "version": Required[str] - protocol: Union[str, AgentEndpointProtocol] - version: str - - - class azure.ai.projects.types.RaiConfig(TypedDict, total=False): - key "rai_policy_name": Required[str] - rai_policy_name: str - - - class azure.ai.projects.types.RankingOptions(TypedDict, total=False): - key "ranker": Union[str, RankerVersionType] - key "score_threshold": float - hybrid_search: ForwardRef('HybridSearchOptions', module='types') - ranker: Union[str, RankerVersionType] - score_threshold: float - - - class azure.ai.projects.types.Reasoning(TypedDict, total=False): - key "context": Optional[Literal["auto", "current_turn", "all_turns"]] - key "effort": Optional[Literal["none", "minimal", "low", "medium", "high", "xhigh"]] - key "generate_summary": Optional[Literal["auto", "concise", "detailed"]] - key "summary": Optional[Literal["auto", "concise", "detailed"]] - context: Literal[auto, current_turn, all_turns] - effort: Literal[none, minimal, low, medium, high, xhigh] - generate_summary: Literal[auto, concise, detailed] - summary: Literal[auto, concise, detailed] - - - class azure.ai.projects.types.RecurrenceTrigger(TypedDict, total=False): - key "endTime": str - key "interval": Required[int] - key "schedule": Required[RecurrenceSchedule] - key "startTime": str - key "timeZone": str - key "type": Required[Literal[TriggerType.RECURRENCE]] - end_time: str - interval: int - schedule: RecurrenceSchedule - start_time: str - time_zone: str - type: Literal[TriggerType.RECURRENCE] - - - class azure.ai.projects.types.RecurrenceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DAILY = "Daily" - HOURLY = "Hourly" - MONTHLY = "Monthly" - WEEKLY = "Weekly" - - - class azure.ai.projects.types.RedTeam(TypedDict, total=False): - key "applicationScenario": str - key "displayName": str - key "id": Required[str] - key "numTurns": int - key "simulationOnly": bool - key "status": str - key "target": Required[RedTeamTargetConfig] - application_scenario: str - attackStrategies: list[Union[str, AttackStrategy]] - attack_strategies: list[Union[str, AttackStrategy]] - display_name: str - name: str - num_turns: int - properties: dict[str, str] - riskCategories: list[Union[str, RiskCategory]] - risk_categories: list[Union[str, RiskCategory]] - simulation_only: bool - status: str - tags: dict[str, str] - target: RedTeamTargetConfig - - - class azure.ai.projects.types.RedTeamTargetConfig(TypedDict, total=False): - key "modelDeploymentName": Required[str] - key "type": Required[Literal["AzureOpenAIModel"]] - model_deployment_name: str - type: Literal[AzureOpenAIModel] - - - class azure.ai.projects.types.ReminderPreviewToolboxTool(TypedDict, total=False): - key "description": str - key "name": str - key "type": Required[Literal[ToolboxToolType.REMINDER_PREVIEW]] - description: str - name: str - tool_configs: dict[str, ToolConfig] - type: Literal[ToolboxToolType.REMINDER_PREVIEW] - - - class azure.ai.projects.types.ResponsesProtocolConfiguration(TypedDict, total=False): - - - class azure.ai.projects.types.RoutineActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - INVOKE_AGENT_INVOCATIONS_API = "invoke_agent_invocations_api" - INVOKE_AGENT_RESPONSES_API = "invoke_agent_responses_api" - - - class azure.ai.projects.types.RoutineDispatchPayloadType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - INVOKE_AGENT_INVOCATIONS_API = "invoke_agent_invocations_api" - INVOKE_AGENT_RESPONSES_API = "invoke_agent_responses_api" - - - class azure.ai.projects.types.RoutineTriggerType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - CUSTOM = "custom" - GITHUB_ISSUE = "github_issue" - SCHEDULE = "schedule" - TIMER = "timer" - - - class azure.ai.projects.types.RubricBasedEvaluatorDefinition(TypedDict, total=False): - key "dimensions": Required[list[Dimension]] - key "pass_threshold": float - key "type": Required[Literal[EvaluatorDefinitionType.RUBRIC]] - data_schema: dict[str, Any] - dimensions: list[Dimension] - init_parameters: dict[str, Any] - metrics: dict[str, EvaluatorMetric] - pass_threshold: float - type: Literal[EvaluatorDefinitionType.RUBRIC] - - - class azure.ai.projects.types.SampleType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - EVALUATION_RESULT_SAMPLE = "EvaluationResultSample" - - - class azure.ai.projects.types.Schedule(TypedDict, total=False): - key "description": str - key "displayName": str - key "enabled": Required[bool] - key "id": Required[str] - key "provisioningStatus": Union[str, ScheduleProvisioningStatus] - key "systemData": Required[dict[str, str]] - key "task": Required[ScheduleTask] - key "trigger": Required[Trigger] - description: str - display_name: str - enabled: bool - properties: dict[str, str] - provisioning_status: Union[str, ScheduleProvisioningStatus] - schedule_id: str - system_data: dict[str, str] - tags: dict[str, str] - task: ScheduleTask - trigger: Trigger - - - class azure.ai.projects.types.ScheduleRoutineTrigger(TypedDict, total=False): - key "cron_expression": Required[str] - key "time_zone": Required[str] - key "type": Required[Literal[RoutineTriggerType.SCHEDULE]] - cron_expression: str - time_zone: str - type: Literal[RoutineTriggerType.SCHEDULE] - - - class azure.ai.projects.types.ScheduleTaskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - EVALUATION = "Evaluation" - INSIGHT = "Insight" - - - class azure.ai.projects.types.SearchMemoriesRequest(TypedDict, total=False): - key "previous_search_id": str - key "scope": Required[str] - items: list[dict[str, Any]] - options: ForwardRef('MemorySearchOptions', module='types') - previous_search_id: str - scope: str - - - class azure.ai.projects.types.SharepointGroundingToolParameters(TypedDict, total=False): - project_connections: list[ToolProjectConnection] - - - class azure.ai.projects.types.SharepointPreviewTool(TypedDict, total=False): - key "sharepoint_grounding_preview": Required[SharepointGroundingToolParameters] - key "type": Required[Literal[ToolType.SHAREPOINT_GROUNDING_PREVIEW]] - sharepoint_grounding_preview: SharepointGroundingToolParameters - type: Literal[ToolType.SHAREPOINT_GROUNDING_PREVIEW] - - - class azure.ai.projects.types.SimpleQnADataGenerationJobOptions(TypedDict, total=False): - key "max_samples": Required[int] - key "train_split": float - key "type": Required[Literal[DataGenerationJobType.SIMPLE_QNA]] - max_samples: int - model_options: ForwardRef('DataGenerationModelOptions', module='types') - question_types: list[Union[str, SimpleQnAFineTuningQuestionType]] - train_split: float - type: Literal[DataGenerationJobType.SIMPLE_QNA] - - - class azure.ai.projects.types.SkillInlineContent(TypedDict, total=False): - key "compatibility": str - key "description": Required[str] - key "instructions": Required[str] - key "license": str - allowed_tools: list[str] - compatibility: str - description: str - instructions: str - license: str - metadata: dict[str, str] - - - class azure.ai.projects.types.SkillReferenceParam(TypedDict, total=False): - key "skill_id": Required[str] - key "type": Required[Literal[ContainerSkillType.SKILL_REFERENCE]] - key "version": str - skill_id: str - type: Literal[ContainerSkillType.SKILL_REFERENCE] - version: str - - - class azure.ai.projects.types.SpecificApplyPatchParam(TypedDict, total=False): - key "type": Required[Literal[ToolChoiceParamType.APPLY_PATCH]] - type: Literal[ToolChoiceParamType.APPLY_PATCH] - - - class azure.ai.projects.types.SpecificFunctionShellParam(TypedDict, total=False): - key "type": Required[Literal[ToolChoiceParamType.SHELL]] - type: Literal[ToolChoiceParamType.SHELL] - - - class azure.ai.projects.types.StructuredInputDefinition(TypedDict, total=False): - key "default_value": Any - key "description": str - key "required": bool - default_value: Any - description: str - required: bool - schema: dict[str, Any] - - - class azure.ai.projects.types.StructuredOutputDefinition(TypedDict, total=False): - key "description": Required[str] - key "name": Required[str] - key "schema": Required[dict[str, Any]] - key "strict": Required[Optional[bool]] - description: str - name: str - schema: dict[str, Any] - strict: bool - - - class azure.ai.projects.types.TaxonomyCategory(TypedDict, total=False): - key "description": str - key "id": Required[str] - key "name": Required[str] - key "riskCategory": Required[Union[str, RiskCategory]] - key "subCategories": Required[list[TaxonomySubCategory]] - description: str - id: str - name: str - properties: dict[str, str] - risk_category: Union[str, RiskCategory] - sub_categories: list[TaxonomySubCategory] - - - class azure.ai.projects.types.TaxonomySubCategory(TypedDict, total=False): - key "description": str - key "enabled": Required[bool] - key "id": Required[str] - key "name": Required[str] - description: str - enabled: bool - id: str - name: str - properties: dict[str, str] - - - class azure.ai.projects.types.TelemetryConfig(TypedDict, total=False): - key "endpoints": Required[list[TelemetryEndpoint]] - endpoints: list[TelemetryEndpoint] - - - class azure.ai.projects.types.TelemetryEndpoint(TypedDict, total=False): - key "data": Required[list[Union[str, TelemetryDataKind]]] - key "endpoint": Required[str] - key "kind": Required[Literal[TelemetryEndpointKind.OTLP]] - key "protocol": Required[Union[str, TelemetryTransportProtocol]] - auth: ForwardRef('TelemetryEndpointAuth', module='types') - data: list[Union[str, TelemetryDataKind]] - endpoint: str - kind: Literal[TelemetryEndpointKind.OTLP] - protocol: Union[str, TelemetryTransportProtocol] - - - class azure.ai.projects.types.TelemetryEndpointAuth(TypedDict, total=False): - key "header_name": Required[str] - key "secret_id": Required[str] - key "secret_key": Required[str] - key "type": Required[Literal[TelemetryEndpointAuthType.HEADER]] - header_name: str - secret_id: str - secret_key: str - type: Literal[TelemetryEndpointAuthType.HEADER] - - - class azure.ai.projects.types.TelemetryEndpointAuthType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - HEADER = "header" - - - class azure.ai.projects.types.TelemetryEndpointKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): - OTLP = "OTLP" - - - class azure.ai.projects.types.TextResponseFormatConfigurationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - JSON_OBJECT = "json_object" - JSON_SCHEMA = "json_schema" - TEXT = "text" - - - class azure.ai.projects.types.TextResponseFormatJsonObject(TypedDict, total=False): - key "type": Required[Literal[TextResponseFormatConfigurationType.JSON_OBJECT]] - type: Literal[TextResponseFormatConfigurationType.JSON_OBJECT] - - - class azure.ai.projects.types.TextResponseFormatJsonSchema(TypedDict, total=False): - key "description": str - key "name": Required[str] - key "schema": Required[dict[str, Any]] - key "strict": Optional[bool] - key "type": Required[Literal[TextResponseFormatConfigurationType.JSON_SCHEMA]] - description: str - name: str - schema: dict[str, Any] - strict: bool - type: Literal[TextResponseFormatConfigurationType.JSON_SCHEMA] - - - class azure.ai.projects.types.TextResponseFormatText(TypedDict, total=False): - key "type": Required[Literal[TextResponseFormatConfigurationType.TEXT]] - type: Literal[TextResponseFormatConfigurationType.TEXT] - - - class azure.ai.projects.types.TimerRoutineTrigger(TypedDict, total=False): - key "at": int - key "type": Required[Literal[RoutineTriggerType.TIMER]] - at: int - type: Literal[RoutineTriggerType.TIMER] - - - class azure.ai.projects.types.ToolChoiceAllowed(TypedDict, total=False): - key "mode": Required[Literal["auto", "required"]] - key "tools": Required[list[dict[str, Any]]] - key "type": Required[Literal[ToolChoiceParamType.ALLOWED_TOOLS]] - mode: Literal[auto, required] - tools: list[dict[str, Any]] - type: Literal[ToolChoiceParamType.ALLOWED_TOOLS] - - - class azure.ai.projects.types.ToolChoiceCodeInterpreter(TypedDict, total=False): - key "type": Required[Literal[ToolChoiceParamType.CODE_INTERPRETER]] - type: Literal[ToolChoiceParamType.CODE_INTERPRETER] - - - class azure.ai.projects.types.ToolChoiceComputer(TypedDict, total=False): - key "type": Required[Literal[ToolChoiceParamType.COMPUTER]] - type: Literal[ToolChoiceParamType.COMPUTER] - - - class azure.ai.projects.types.ToolChoiceComputerUse(TypedDict, total=False): - key "type": Required[Literal[ToolChoiceParamType.COMPUTER_USE]] - type: Literal[ToolChoiceParamType.COMPUTER_USE] - - - class azure.ai.projects.types.ToolChoiceComputerUsePreview(TypedDict, total=False): - key "type": Required[Literal[ToolChoiceParamType.COMPUTER_USE_PREVIEW]] - type: Literal[ToolChoiceParamType.COMPUTER_USE_PREVIEW] - - - class azure.ai.projects.types.ToolChoiceCustom(TypedDict, total=False): - key "name": Required[str] - key "type": Required[Literal[ToolChoiceParamType.CUSTOM]] - name: str - type: Literal[ToolChoiceParamType.CUSTOM] - - - class azure.ai.projects.types.ToolChoiceFileSearch(TypedDict, total=False): - key "type": Required[Literal[ToolChoiceParamType.FILE_SEARCH]] - type: Literal[ToolChoiceParamType.FILE_SEARCH] - - - class azure.ai.projects.types.ToolChoiceFunction(TypedDict, total=False): - key "name": Required[str] - key "type": Required[Literal[ToolChoiceParamType.FUNCTION]] - name: str - type: Literal[ToolChoiceParamType.FUNCTION] - - - class azure.ai.projects.types.ToolChoiceImageGeneration(TypedDict, total=False): - key "type": Required[Literal[ToolChoiceParamType.IMAGE_GENERATION]] - type: Literal[ToolChoiceParamType.IMAGE_GENERATION] - - - class azure.ai.projects.types.ToolChoiceMCP(TypedDict, total=False): - key "name": Optional[str] - key "server_label": Required[str] - key "type": Required[Literal[ToolChoiceParamType.MCP]] - name: str - server_label: str - type: Literal[ToolChoiceParamType.MCP] - - - class azure.ai.projects.types.ToolChoiceParamType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - ALLOWED_TOOLS = "allowed_tools" - APPLY_PATCH = "apply_patch" - CODE_INTERPRETER = "code_interpreter" - COMPUTER = "computer" - COMPUTER_USE = "computer_use" - COMPUTER_USE_PREVIEW = "computer_use_preview" - CUSTOM = "custom" - FILE_SEARCH = "file_search" - FUNCTION = "function" - IMAGE_GENERATION = "image_generation" - MCP = "mcp" - SHELL = "shell" - WEB_SEARCH_PREVIEW = "web_search_preview" - WEB_SEARCH_PREVIEW_2025_03_11 = "web_search_preview_2025_03_11" - - - class azure.ai.projects.types.ToolChoiceWebSearchPreview(TypedDict, total=False): - key "type": Required[Literal[ToolChoiceParamType.WEB_SEARCH_PREVIEW]] - type: Literal[ToolChoiceParamType.WEB_SEARCH_PREVIEW] - - - class azure.ai.projects.types.ToolChoiceWebSearchPreview20250311(TypedDict, total=False): - key "type": Required[Literal[ToolChoiceParamType.WEB_SEARCH_PREVIEW_2025_03_11]] - type: Literal[ToolChoiceParamType.WEB_SEARCH_PREVIEW_2025_03_11] - - - class azure.ai.projects.types.ToolConfig(TypedDict, total=False): - key "additional_search_text": str - key "pin": bool - additional_search_text: str - pin: bool - - - class azure.ai.projects.types.ToolDescription(TypedDict, total=False): - key "description": str - key "name": str - description: str - name: str - - - class azure.ai.projects.types.ToolProjectConnection(TypedDict, total=False): - key "project_connection_id": Required[str] - project_connection_id: str - - - class azure.ai.projects.types.ToolSearchToolParam(TypedDict, total=False): - key "description": Optional[str] - key "execution": Union[str, ToolSearchExecutionType] - key "parameters": Optional[EmptyModelParam] - key "type": Required[Literal[ToolType.TOOL_SEARCH]] - description: str - execution: Union[str, ToolSearchExecutionType] - parameters: EmptyModelParam - type: Literal[ToolType.TOOL_SEARCH] - - - class azure.ai.projects.types.ToolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - A2A_PREVIEW = "a2a_preview" - APPLY_PATCH = "apply_patch" - AZURE_AI_SEARCH = "azure_ai_search" - AZURE_FUNCTION = "azure_function" - BING_CUSTOM_SEARCH_PREVIEW = "bing_custom_search_preview" - BING_GROUNDING = "bing_grounding" - BROWSER_AUTOMATION_PREVIEW = "browser_automation_preview" - CAPTURE_STRUCTURED_OUTPUTS = "capture_structured_outputs" - CODE_INTERPRETER = "code_interpreter" - COMPUTER = "computer" - COMPUTER_USE_PREVIEW = "computer_use_preview" - CUSTOM = "custom" - FABRIC_DATAAGENT_PREVIEW = "fabric_dataagent_preview" - FABRIC_IQ_PREVIEW = "fabric_iq_preview" - FILE_SEARCH = "file_search" - FUNCTION = "function" - IMAGE_GENERATION = "image_generation" - LOCAL_SHELL = "local_shell" - MCP = "mcp" - MEMORY_SEARCH_PREVIEW = "memory_search_preview" - NAMESPACE = "namespace" - OPENAPI = "openapi" - SHAREPOINT_GROUNDING_PREVIEW = "sharepoint_grounding_preview" - SHELL = "shell" - TOOLBOX_SEARCH_PREVIEW = "toolbox_search_preview" - TOOL_SEARCH = "tool_search" - WEB_SEARCH = "web_search" - WEB_SEARCH_PREVIEW = "web_search_preview" - WORK_IQ_PREVIEW = "work_iq_preview" - - - class azure.ai.projects.types.ToolUseFineTuningDataGenerationJobOptions(TypedDict, total=False): - key "max_samples": Required[int] - key "train_split": float - key "type": Required[Literal[DataGenerationJobType.TOOL_USE]] - max_samples: int - model_options: ForwardRef('DataGenerationModelOptions', module='types') - train_split: float - type: Literal[DataGenerationJobType.TOOL_USE] - - - class azure.ai.projects.types.ToolboxPolicies(TypedDict, total=False): - rai_config: ForwardRef('RaiConfig', module='types') - - - class azure.ai.projects.types.ToolboxSearchPreviewToolboxTool(TypedDict, total=False): - key "description": str - key "name": str - key "type": Required[Literal[ToolboxToolType.TOOLBOX_SEARCH_PREVIEW]] - description: str - name: str - tool_configs: dict[str, ToolConfig] - type: Literal[ToolboxToolType.TOOLBOX_SEARCH_PREVIEW] - - - class azure.ai.projects.types.ToolboxSkill(TypedDict, total=False): - key "name": Required[str] - key "type": Required[Literal["skill_reference"]] - key "version": str - name: str - type: Literal[skill_reference] - version: str - - - class azure.ai.projects.types.ToolboxSkillReference(TypedDict, total=False): - key "name": Required[str] - key "type": Required[Literal["skill_reference"]] - key "version": str - name: str - type: Literal[skill_reference] - version: str - - - class azure.ai.projects.types.ToolboxToolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - A2A_PREVIEW = "a2a_preview" - AZURE_AI_SEARCH = "azure_ai_search" - BROWSER_AUTOMATION_PREVIEW = "browser_automation_preview" - CODE_INTERPRETER = "code_interpreter" - FABRIC_IQ_PREVIEW = "fabric_iq_preview" - FILE_SEARCH = "file_search" - MCP = "mcp" - OPENAPI = "openapi" - REMINDER_PREVIEW = "reminder_preview" - TOOLBOX_SEARCH_PREVIEW = "toolbox_search_preview" - WEB_SEARCH = "web_search" - WORK_IQ_PREVIEW = "work_iq_preview" - - - class azure.ai.projects.types.TracesDataGenerationJobOptions(TypedDict, total=False): - key "max_samples": Required[int] - key "train_split": float - key "type": Required[Literal[DataGenerationJobType.TRACES]] - max_samples: int - model_options: ForwardRef('DataGenerationModelOptions', module='types') - train_split: float - type: Literal[DataGenerationJobType.TRACES] - - - class azure.ai.projects.types.TracesDataGenerationJobSource(TypedDict, total=False): - key "agent_id": str - key "agent_name": str - key "agent_version": str - key "description": str - key "end_time": int - key "start_time": Required[int] - key "type": Required[Literal[DataGenerationJobSourceType.TRACES]] - agent_id: str - agent_name: str - agent_version: str - description: str - end_time: int - start_time: int - type: Literal[DataGenerationJobSourceType.TRACES] - - - class azure.ai.projects.types.TracesEvaluatorGenerationJobSource(TypedDict, total=False): - key "agent_id": str - key "agent_name": str - key "agent_version": str - key "description": str - key "end_time": int - key "start_time": Required[int] - key "type": Required[Literal[EvaluatorGenerationJobSourceType.TRACES]] - agent_id: str - agent_name: str - agent_version: str - description: str - end_time: int - start_time: int - type: Literal[EvaluatorGenerationJobSourceType.TRACES] - - - class azure.ai.projects.types.TriggerType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - CRON = "Cron" - ONE_TIME = "OneTime" - RECURRENCE = "Recurrence" - - - class azure.ai.projects.types.UpdateMemoriesRequest(TypedDict, total=False): - key "previous_update_id": str - key "scope": Required[str] - key "update_delay": int - items: list[dict[str, Any]] - items_property: list[dict[str, Any]] - previous_update_id: str - scope: str - update_delay: int - - - class azure.ai.projects.types.UpdateMemoryRequest(TypedDict, total=False): - key "content": Required[str] - content: str - - - class azure.ai.projects.types.UpdateMemoryStoreRequest(TypedDict, total=False): - key "description": str - description: str - metadata: dict[str, str] - - - class azure.ai.projects.types.UpdateModelVersionRequest(TypedDict, total=False): - key "description": str - description: str - tags: dict[str, str] - - - class azure.ai.projects.types.UpdateSkillRequest(TypedDict, total=False): - key "default_version": Required[str] - default_version: str - - - class azure.ai.projects.types.UpdateToolboxRequest(TypedDict, total=False): - key "default_version": Required[str] - default_version: str - - - class azure.ai.projects.types.UpdateToolboxRequest1(TypedDict, total=False): - key "default_version": Required[str] - default_version: str - - - class azure.ai.projects.types.VersionIndicator(TypedDict, total=False): - key "agent_version": Required[str] - key "type": Required[Literal[VersionIndicatorType.VERSION_REF]] - agent_version: str - type: Literal[VersionIndicatorType.VERSION_REF] - - - class azure.ai.projects.types.VersionIndicatorType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - VERSION_REF = "version_ref" - - - class azure.ai.projects.types.VersionRefIndicator(TypedDict, total=False): - key "agent_version": Required[str] - key "type": Required[Literal[VersionIndicatorType.VERSION_REF]] - agent_version: str - type: Literal[VersionIndicatorType.VERSION_REF] - - - class azure.ai.projects.types.VersionSelectionRule(TypedDict, total=False): - key "agent_version": Required[str] - key "traffic_percentage": Required[int] - key "type": Required[Literal[VersionSelectorType.FIXED_RATIO]] - agent_version: str - traffic_percentage: int - type: Literal[VersionSelectorType.FIXED_RATIO] - - - class azure.ai.projects.types.VersionSelector(TypedDict, total=False): - key "version_selection_rules": Required[list[VersionSelectionRule]] - version_selection_rules: list[VersionSelectionRule] - - - class azure.ai.projects.types.VersionSelectorType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - FIXED_RATIO = "FixedRatio" - - - class azure.ai.projects.types.WebSearchApproximateLocation(TypedDict, total=False): - key "city": Optional[str] - key "country": Optional[str] - key "region": Optional[str] - key "timezone": Optional[str] - key "type": Required[Literal["approximate"]] - city: str - country: str - region: str - timezone: str - type: Literal[approximate] - - - class azure.ai.projects.types.WebSearchConfiguration(TypedDict, total=False): - key "instance_name": Required[str] - key "project_connection_id": Required[str] - instance_name: str - project_connection_id: str - - - class azure.ai.projects.types.WebSearchPreviewTool(TypedDict, total=False): - key "search_context_size": Union[str, SearchContextSize] - key "type": Required[Literal[ToolType.WEB_SEARCH_PREVIEW]] - key "user_location": Optional[ApproximateLocation] - search_content_types: list[Union[str, SearchContentType]] - search_context_size: Union[str, SearchContextSize] - type: Literal[ToolType.WEB_SEARCH_PREVIEW] - user_location: ApproximateLocation - - - class azure.ai.projects.types.WebSearchTool(TypedDict, total=False): - key "description": str - key "filters": Optional[WebSearchToolFilters] - key "name": str - key "search_context_size": Literal["low", "medium", "high"] - key "type": Required[Literal[ToolType.WEB_SEARCH]] - key "user_location": Optional[WebSearchApproximateLocation] - custom_search_configuration: ForwardRef('WebSearchConfiguration', module='types') - description: str - filters: WebSearchToolFilters - name: str - search_context_size: Literal[low, medium, high] - tool_configs: dict[str, ToolConfig] - type: Literal[ToolType.WEB_SEARCH] - user_location: WebSearchApproximateLocation - - - class azure.ai.projects.types.WebSearchToolFilters(TypedDict, total=False): - key "allowed_domains": Optional[list[str]] - allowed_domains: list[str] - - - class azure.ai.projects.types.WebSearchToolboxTool(TypedDict, total=False): - key "description": str - key "filters": Optional[WebSearchToolFilters] - key "name": str - key "search_context_size": Literal["low", "medium", "high"] - key "type": Required[Literal[ToolboxToolType.WEB_SEARCH]] - key "user_location": Optional[WebSearchApproximateLocation] - custom_search_configuration: ForwardRef('WebSearchConfiguration', module='types') - description: str - filters: WebSearchToolFilters - name: str - search_context_size: Literal[low, medium, high] - tool_configs: dict[str, ToolConfig] - type: Literal[ToolboxToolType.WEB_SEARCH] - user_location: WebSearchApproximateLocation - - - class azure.ai.projects.types.WeeklyRecurrenceSchedule(TypedDict, total=False): - key "daysOfWeek": Required[list[Union[str, DayOfWeek]]] - key "type": Required[Literal[RecurrenceType.WEEKLY]] - days_of_week: list[Union[str, DayOfWeek]] - type: Literal[RecurrenceType.WEEKLY] - - - class azure.ai.projects.types.WorkIQPreviewTool(TypedDict, total=False): - key "project_connection_id": Required[str] - key "type": Required[Literal[ToolType.WORK_IQ_PREVIEW]] - project_connection_id: str - type: Literal[ToolType.WORK_IQ_PREVIEW] - - - class azure.ai.projects.types.WorkIQPreviewToolboxTool(TypedDict, total=False): - key "description": str - key "name": str - key "project_connection_id": Required[str] - key "type": Required[Literal[ToolboxToolType.WORK_IQ_PREVIEW]] - description: str - name: str - project_connection_id: str - tool_configs: dict[str, ToolConfig] - type: Literal[ToolboxToolType.WORK_IQ_PREVIEW] - - - class azure.ai.projects.types.WorkflowAgentDefinition(TypedDict, total=False): - key "kind": Required[Literal[AgentKind.WORKFLOW]] - key "workflow": str - kind: Literal[AgentKind.WORKFLOW] - rai_config: ForwardRef('RaiConfig', module='types') - workflow: str - - ``` \ No newline at end of file diff --git a/sdk/ai/azure-ai-projects/api.metadata.yml b/sdk/ai/azure-ai-projects/api.metadata.yml index ecf741853bfd..047d86b69bba 100644 --- a/sdk/ai/azure-ai-projects/api.metadata.yml +++ b/sdk/ai/azure-ai-projects/api.metadata.yml @@ -1,3 +1,3 @@ -apiMdSha256: 3b0b5cd93d04002c38a81fda60b2db38f473ca7b36af2d6e7f94041e567eedb3 +apiMdSha256: 3950b76f4807ef00493f4ea3962013957e0e8992ceec25c0e98ea377561d7fca parserVersion: 0.3.30 pythonVersion: 3.14.3 diff --git a/sdk/ai/azure-ai-projects/apiview-properties.json b/sdk/ai/azure-ai-projects/apiview-properties.json index d38b13b2aa23..5f676a90bffa 100644 --- a/sdk/ai/azure-ai-projects/apiview-properties.json +++ b/sdk/ai/azure-ai-projects/apiview-properties.json @@ -286,6 +286,7 @@ "azure.ai.projects.models.Routine": "Azure.AI.Projects.Routine", "azure.ai.projects.models.RoutineRun": "Azure.AI.Projects.RoutineRun", "azure.ai.projects.models.RubricBasedEvaluatorDefinition": "Azure.AI.Projects.RubricBasedEvaluatorDefinition", + "azure.ai.projects.models.RubricGenerationInputQualityWarning": "Azure.AI.Projects.RubricGenerationInputQualityWarning", "azure.ai.projects.models.SASCredentials": "Azure.AI.Projects.SASCredentials", "azure.ai.projects.models.Schedule": "Azure.AI.Projects.Schedule", "azure.ai.projects.models.ScheduleRoutineTrigger": "Azure.AI.Projects.ScheduleRoutineTrigger", @@ -305,6 +306,7 @@ "azure.ai.projects.models.SpecificFunctionShellParam": "OpenAI.SpecificFunctionShellParam", "azure.ai.projects.models.StructuredInputDefinition": "Azure.AI.Projects.StructuredInputDefinition", "azure.ai.projects.models.StructuredOutputDefinition": "Azure.AI.Projects.StructuredOutputDefinition", + "azure.ai.projects.models.TaskGenerationDataGenerationJobOptions": "Azure.AI.Projects.TaskGenerationDataGenerationJobOptions", "azure.ai.projects.models.TaxonomyCategory": "Azure.AI.Projects.TaxonomyCategory", "azure.ai.projects.models.TaxonomySubCategory": "Azure.AI.Projects.TaxonomySubCategory", "azure.ai.projects.models.TelemetryConfig": "Azure.AI.Projects.TelemetryConfig", @@ -334,6 +336,7 @@ "azure.ai.projects.models.ToolConfig": "Azure.AI.Projects.ToolConfig", "azure.ai.projects.models.ToolDescription": "Azure.AI.Projects.ToolDescription", "azure.ai.projects.models.ToolProjectConnection": "Azure.AI.Projects.ToolProjectConnection", + "azure.ai.projects.models.ToolSearchToolboxTool": "Azure.AI.Projects.ToolSearchToolboxTool", "azure.ai.projects.models.ToolSearchToolParam": "OpenAI.ToolSearchToolParam", "azure.ai.projects.models.ToolUseFineTuningDataGenerationJobOptions": "Azure.AI.Projects.ToolUseFineTuningDataGenerationJobOptions", "azure.ai.projects.models.TracesDataGenerationJobOptions": "Azure.AI.Projects.TracesDataGenerationJobOptions", @@ -345,6 +348,8 @@ "azure.ai.projects.models.VersionIndicator": "Azure.AI.Projects.VersionIndicator", "azure.ai.projects.models.VersionRefIndicator": "Azure.AI.Projects.VersionRefIndicator", "azure.ai.projects.models.VersionSelector": "Azure.AI.Projects.VersionSelector", + "azure.ai.projects.models.WebIQPreviewTool": "Azure.AI.Projects.WebIQPreviewTool", + "azure.ai.projects.models.WebIQPreviewToolboxTool": "Azure.AI.Projects.WebIQPreviewToolboxTool", "azure.ai.projects.models.WebSearchApproximateLocation": "OpenAI.WebSearchApproximateLocation", "azure.ai.projects.models.WebSearchConfiguration": "Azure.AI.Projects.WebSearchConfiguration", "azure.ai.projects.models.WebSearchPreviewTool": "OpenAI.WebSearchPreviewTool", @@ -379,9 +384,13 @@ "azure.ai.projects.models.EvaluatorDefinitionType": "Azure.AI.Projects.EvaluatorDefinitionType", "azure.ai.projects.models.EvaluatorMetricType": "Azure.AI.Projects.EvaluatorMetricType", "azure.ai.projects.models.EvaluatorMetricDirection": "Azure.AI.Projects.EvaluatorMetricDirection", + "azure.ai.projects.models.GenerationWarningType": "Azure.AI.Projects.GenerationWarningType", "azure.ai.projects.models.PendingUploadType": "Azure.AI.Projects.PendingUploadType", "azure.ai.projects.models.EvaluatorGenerationJobSourceType": "Azure.AI.Projects.EvaluatorGenerationJobSourceType", "azure.ai.projects.models.JobStatus": "Azure.AI.Projects.JobStatus", + "azure.ai.projects.models.RubricGenerationInputQualityWarningCode": "Azure.AI.Projects.RubricGenerationInputQualityWarningCode", + "azure.ai.projects.models.RubricGenerationInputQualityWarningSeverity": "Azure.AI.Projects.RubricGenerationInputQualityWarningSeverity", + "azure.ai.projects.models.RubricGenerationInputQualityWarningSource": "Azure.AI.Projects.RubricGenerationInputQualityWarningSource", "azure.ai.projects.models.PageOrder": "Azure.AI.Projects.PageOrder", "azure.ai.projects.models.OperationState": "Azure.Core.Foundations.OperationState", "azure.ai.projects.models.InsightType": "Azure.AI.Projects.InsightType", @@ -426,6 +435,7 @@ "azure.ai.projects.models.ToolChoiceParamType": "OpenAI.ToolChoiceParamType", "azure.ai.projects.models.TextResponseFormatConfigurationType": "OpenAI.TextResponseFormatConfigurationType", "azure.ai.projects.models.AgentVersionStatus": "Azure.AI.Projects.AgentVersionStatus", + "azure.ai.projects.models.AgentIdentityStatus": "Azure.AI.Projects.AgentIdentityStatus", "azure.ai.projects.models.AgentBlueprintReferenceType": "Azure.AI.Projects.AgentBlueprintReferenceType", "azure.ai.projects.models.VersionSelectorType": "Azure.AI.Projects.VersionSelectorType", "azure.ai.projects.models.AgentEndpointAuthorizationSchemeType": "Azure.AI.Projects.AgentEndpointAuthorizationSchemeType", @@ -540,5 +550,5 @@ "azure.ai.projects.operations.ToolboxesOperations.delete_version": "Azure.AI.Projects.Toolboxes.deleteToolboxVersion", "azure.ai.projects.aio.operations.ToolboxesOperations.delete_version": "Azure.AI.Projects.Toolboxes.deleteToolboxVersion" }, - "CrossLanguageVersion": "a25984f23931" + "CrossLanguageVersion": "b8e732af7c5e" } \ No newline at end of file diff --git a/sdk/ai/azure-ai-projects/azure/ai/projects/_client.py b/sdk/ai/azure-ai-projects/azure/ai/projects/_client.py index 508fbc18d9cd..60c172ebfdd2 100644 --- a/sdk/ai/azure-ai-projects/azure/ai/projects/_client.py +++ b/sdk/ai/azure-ai-projects/azure/ai/projects/_client.py @@ -70,6 +70,8 @@ class AIProjectClient: # pylint: disable=too-many-instance-attributes None. Default value is None. If not set, the operation's default API version will be used. Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. """ def __init__( diff --git a/sdk/ai/azure-ai-projects/azure/ai/projects/_patch.py b/sdk/ai/azure-ai-projects/azure/ai/projects/_patch.py index f1f15152e708..9796a5679697 100644 --- a/sdk/ai/azure-ai-projects/azure/ai/projects/_patch.py +++ b/sdk/ai/azure-ai-projects/azure/ai/projects/_patch.py @@ -114,6 +114,8 @@ class AIProjectClient(AIProjectClientGenerated): # pylint: disable=too-many-ins :vartype deployments: azure.ai.projects.operations.DeploymentsOperations :ivar indexes: IndexesOperations operations :vartype indexes: azure.ai.projects.operations.IndexesOperations + :ivar toolboxes: ToolboxesOperations operations + :vartype toolboxes: azure.ai.projects.operations.ToolboxesOperations :param endpoint: Foundry Project endpoint in the form "https://{ai-services-account-name}.services.ai.azure.com/api/projects/{project-name}". If you only have one Project in your Foundry Hub, or to target the default Project in your Hub, use @@ -134,6 +136,8 @@ class AIProjectClient(AIProjectClientGenerated): # pylint: disable=too-many-ins :keyword api_version: The API version to use for this operation. Known values are "v1". Default value is "v1". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. """ def __init__( diff --git a/sdk/ai/azure-ai-projects/azure/ai/projects/aio/_client.py b/sdk/ai/azure-ai-projects/azure/ai/projects/aio/_client.py index c195fb690de2..967ac1cf48d2 100644 --- a/sdk/ai/azure-ai-projects/azure/ai/projects/aio/_client.py +++ b/sdk/ai/azure-ai-projects/azure/ai/projects/aio/_client.py @@ -70,6 +70,8 @@ class AIProjectClient: # pylint: disable=too-many-instance-attributes None. Default value is None. If not set, the operation's default API version will be used. Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. """ def __init__( diff --git a/sdk/ai/azure-ai-projects/azure/ai/projects/aio/_patch.py b/sdk/ai/azure-ai-projects/azure/ai/projects/aio/_patch.py index c338b00b8bf8..ce80d545efa5 100644 --- a/sdk/ai/azure-ai-projects/azure/ai/projects/aio/_patch.py +++ b/sdk/ai/azure-ai-projects/azure/ai/projects/aio/_patch.py @@ -45,6 +45,8 @@ class AIProjectClient(AIProjectClientGenerated): # pylint: disable=too-many-ins :ivar deployments: DeploymentsOperations operations :vartype deployments: azure.ai.projects.aio.operations.DeploymentsOperations :ivar indexes: IndexesOperations operations + :ivar toolboxes: ToolboxesOperations operations + :vartype toolboxes: azure.ai.projects.aio.operations.ToolboxesOperations :vartype indexes: azure.ai.projects.aio.operations.IndexesOperations :param endpoint: Foundry Project endpoint in the form "https://{ai-services-account-name}.services.ai.azure.com/api/projects/{project-name}". If you @@ -66,6 +68,8 @@ class AIProjectClient(AIProjectClientGenerated): # pylint: disable=too-many-ins :keyword api_version: The API version to use for this operation. Known values are "v1". Default value is "v1". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. """ def __init__( diff --git a/sdk/ai/azure-ai-projects/azure/ai/projects/aio/operations/_operations.py b/sdk/ai/azure-ai-projects/azure/ai/projects/aio/operations/_operations.py index 37bce51261e6..fc836a471ebe 100644 --- a/sdk/ai/azure-ai-projects/azure/ai/projects/aio/operations/_operations.py +++ b/sdk/ai/azure-ai-projects/azure/ai/projects/aio/operations/_operations.py @@ -32,7 +32,7 @@ from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict -from ... import models as _models, types as _types +from ... import models as _models from ..._utils.model_base import Model as _Model, SdkJSONEncoder, _deserialize, _failsafe_deserialize from ..._utils.serialization import Deserializer, Serializer from ..._utils.utils import prepare_multipart_form_data @@ -522,12 +522,7 @@ async def create_version( @overload async def create_version( - self, - agent_name: str, - body: _types.CreateAgentVersionRequest, - *, - content_type: str = "application/json", - **kwargs: Any + self, agent_name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.AgentVersionDetails: """Create an agent version. @@ -541,7 +536,7 @@ async def create_version( * Must not exceed 63 characters. Required. :type agent_name: str :param body: Required. - :type body: ~azure.ai.projects.types.CreateAgentVersionRequest + :type body: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -579,7 +574,7 @@ async def create_version( async def create_version( self, agent_name: str, - body: Union[JSON, _types.CreateAgentVersionRequest, IO[bytes]] = _Unset, + body: Union[JSON, IO[bytes]] = _Unset, *, definition: _models.AgentDefinition = _Unset, metadata: Optional[dict[str, str]] = None, @@ -599,9 +594,8 @@ async def create_version( * Can contain hyphens in the middle * Must not exceed 63 characters. Required. :type agent_name: str - :param body: Is one of the following types: JSON, CreateAgentVersionRequest, IO[bytes] - Required. - :type body: JSON or ~azure.ai.projects.types.CreateAgentVersionRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword definition: The agent definition. This can be a workflow, hosted agent, or a simple agent definition. Required. :paramtype definition: ~azure.ai.projects.models.AgentDefinition @@ -748,12 +742,7 @@ async def create_version_from_manifest( @overload async def create_version_from_manifest( - self, - agent_name: str, - body: _types.CreateAgentVersionFromManifestRequest, - *, - content_type: str = "application/json", - **kwargs: Any + self, agent_name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.AgentVersionDetails: """Create an agent version from manifest. @@ -767,7 +756,7 @@ async def create_version_from_manifest( * Must not exceed 63 characters. Required. :type agent_name: str :param body: Required. - :type body: ~azure.ai.projects.types.CreateAgentVersionFromManifestRequest + :type body: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -805,7 +794,7 @@ async def create_version_from_manifest( async def create_version_from_manifest( self, agent_name: str, - body: Union[JSON, _types.CreateAgentVersionFromManifestRequest, IO[bytes]] = _Unset, + body: Union[JSON, IO[bytes]] = _Unset, *, manifest_id: str = _Unset, parameter_values: dict[str, Any] = _Unset, @@ -824,9 +813,8 @@ async def create_version_from_manifest( * Can contain hyphens in the middle * Must not exceed 63 characters. Required. :type agent_name: str - :param body: Is one of the following types: JSON, CreateAgentVersionFromManifestRequest, - IO[bytes] Required. - :type body: JSON or ~azure.ai.projects.types.CreateAgentVersionFromManifestRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword manifest_id: The manifest ID to import the agent version from. Required. :paramtype manifest_id: str :keyword parameter_values: The inputs to the manifest that will result in a fully materialized @@ -1205,12 +1193,7 @@ async def update_details( @overload async def update_details( - self, - agent_name: str, - body: _types.PatchAgentObjectRequest, - *, - content_type: str = "application/merge-patch+json", - **kwargs: Any + self, agent_name: str, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> _models.AgentDetails: """Update an agent endpoint. @@ -1219,7 +1202,7 @@ async def update_details( :param agent_name: The name of the agent to retrieve. Required. :type agent_name: str :param body: Required. - :type body: ~azure.ai.projects.types.PatchAgentObjectRequest + :type body: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/merge-patch+json". :paramtype content_type: str @@ -1252,7 +1235,7 @@ async def update_details( async def update_details( self, agent_name: str, - body: Union[JSON, _types.PatchAgentObjectRequest, IO[bytes]] = _Unset, + body: Union[JSON, IO[bytes]] = _Unset, *, agent_endpoint: Optional[_models.AgentEndpointConfig] = None, agent_card: Optional[_models.AgentCard] = None, @@ -1264,8 +1247,8 @@ async def update_details( :param agent_name: The name of the agent to retrieve. Required. :type agent_name: str - :param body: Is one of the following types: JSON, PatchAgentObjectRequest, IO[bytes] Required. - :type body: JSON or ~azure.ai.projects.types.PatchAgentObjectRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword agent_endpoint: The endpoint configuration for the agent. Default value is None. :paramtype agent_endpoint: ~azure.ai.projects.models.AgentEndpointConfig :keyword agent_card: Optional agent card for the agent. Default value is None. @@ -1353,19 +1336,14 @@ async def _create_version_from_code( ) -> _models.AgentVersionDetails: ... @overload async def _create_version_from_code( - self, - agent_name: str, - content: _types._CreateAgentVersionFromCodeContent, - *, - code_zip_sha256: str, - **kwargs: Any + self, agent_name: str, content: JSON, *, code_zip_sha256: str, **kwargs: Any ) -> _models.AgentVersionDetails: ... @distributed_trace_async async def _create_version_from_code( self, agent_name: str, - content: Union[_models._models._CreateAgentVersionFromCodeContent, _types._CreateAgentVersionFromCodeContent], + content: Union[_models._models._CreateAgentVersionFromCodeContent, JSON], *, code_zip_sha256: str, **kwargs: Any @@ -1384,9 +1362,9 @@ async def _create_version_from_code( * Can contain hyphens in the middle * Must not exceed 63 characters. Required. :type agent_name: str - :param content: Is one of the following types: _CreateAgentVersionFromCodeContent Required. - :type content: ~azure.ai.projects.models._models._CreateAgentVersionFromCodeContent or - ~azure.ai.projects.types._CreateAgentVersionFromCodeContent + :param content: The content multipart request content. Is either a + _CreateAgentVersionFromCodeContent type or a JSON type. Required. + :type content: ~azure.ai.projects.models._models._CreateAgentVersionFromCodeContent or JSON :keyword code_zip_sha256: SHA-256 hex digest of the uploaded code zip. Used for change detection (dedup) and integrity verification. Required. :paramtype code_zip_sha256: str @@ -1683,12 +1661,7 @@ async def create_session( @overload async def create_session( - self, - agent_name: str, - body: _types.CreateSessionRequest, - *, - content_type: str = "application/json", - **kwargs: Any + self, agent_name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.AgentSessionResource: """Create a session. @@ -1699,7 +1672,7 @@ async def create_session( :param agent_name: The name of the agent to create a session for. Required. :type agent_name: str :param body: Required. - :type body: ~azure.ai.projects.types.CreateSessionRequest + :type body: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1734,7 +1707,7 @@ async def create_session( async def create_session( self, agent_name: str, - body: Union[JSON, _types.CreateSessionRequest, IO[bytes]] = _Unset, + body: Union[JSON, IO[bytes]] = _Unset, *, version_indicator: _models.VersionIndicator = _Unset, agent_session_id: Optional[str] = None, @@ -1748,8 +1721,8 @@ async def create_session( :param agent_name: The name of the agent to create a session for. Required. :type agent_name: str - :param body: Is one of the following types: JSON, CreateSessionRequest, IO[bytes] Required. - :type body: JSON or ~azure.ai.projects.types.CreateSessionRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword version_indicator: Determines which agent version backs the session. Required. :paramtype version_indicator: ~azure.ai.projects.models.VersionIndicator :keyword agent_session_id: Optional caller-provided session ID. If specified, it must be unique @@ -2701,7 +2674,7 @@ async def create_or_update( @overload async def create_or_update( - self, id: str, evaluation_rule: _types.EvaluationRule, *, content_type: str = "application/json", **kwargs: Any + self, id: str, evaluation_rule: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.EvaluationRule: """Create or update an evaluation rule. @@ -2710,7 +2683,7 @@ async def create_or_update( :param id: Unique identifier for the evaluation rule. Required. :type id: str :param evaluation_rule: Evaluation rule resource. Required. - :type evaluation_rule: ~azure.ai.projects.types.EvaluationRule + :type evaluation_rule: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -2741,7 +2714,7 @@ async def create_or_update( @distributed_trace_async async def create_or_update( - self, id: str, evaluation_rule: Union[_models.EvaluationRule, _types.EvaluationRule, IO[bytes]], **kwargs: Any + self, id: str, evaluation_rule: Union[_models.EvaluationRule, JSON, IO[bytes]], **kwargs: Any ) -> _models.EvaluationRule: """Create or update an evaluation rule. @@ -2749,10 +2722,9 @@ async def create_or_update( :param id: Unique identifier for the evaluation rule. Required. :type id: str - :param evaluation_rule: Evaluation rule resource. Is either a EvaluationRule type or a - IO[bytes] type. Required. - :type evaluation_rule: ~azure.ai.projects.models.EvaluationRule or - ~azure.ai.projects.types.EvaluationRule or IO[bytes] + :param evaluation_rule: Evaluation rule resource. Is one of the following types: + EvaluationRule, JSON, IO[bytes] Required. + :type evaluation_rule: ~azure.ai.projects.models.EvaluationRule or JSON or IO[bytes] :return: EvaluationRule. The EvaluationRule is compatible with MutableMapping :rtype: ~azure.ai.projects.models.EvaluationRule :raises ~azure.core.exceptions.HttpResponseError: @@ -3542,7 +3514,7 @@ async def create_or_update( self, name: str, version: str, - dataset_version: _types.DatasetVersion, + dataset_version: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any @@ -3556,7 +3528,7 @@ async def create_or_update( :param version: The specific version id of the DatasetVersion to create or update. Required. :type version: str :param dataset_version: The DatasetVersion to create or update. Required. - :type dataset_version: ~azure.ai.projects.types.DatasetVersion + :type dataset_version: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/merge-patch+json". :paramtype content_type: str @@ -3595,11 +3567,7 @@ async def create_or_update( @distributed_trace_async async def create_or_update( - self, - name: str, - version: str, - dataset_version: Union[_models.DatasetVersion, _types.DatasetVersion, IO[bytes]], - **kwargs: Any + self, name: str, version: str, dataset_version: Union[_models.DatasetVersion, JSON, IO[bytes]], **kwargs: Any ) -> _models.DatasetVersion: """Create or update a version. @@ -3609,10 +3577,9 @@ async def create_or_update( :type name: str :param version: The specific version id of the DatasetVersion to create or update. Required. :type version: str - :param dataset_version: The DatasetVersion to create or update. Is either a DatasetVersion type - or a IO[bytes] type. Required. - :type dataset_version: ~azure.ai.projects.models.DatasetVersion or - ~azure.ai.projects.types.DatasetVersion or IO[bytes] + :param dataset_version: The DatasetVersion to create or update. Is one of the following types: + DatasetVersion, JSON, IO[bytes] Required. + :type dataset_version: ~azure.ai.projects.models.DatasetVersion or JSON or IO[bytes] :return: DatasetVersion. The DatasetVersion is compatible with MutableMapping :rtype: ~azure.ai.projects.models.DatasetVersion :raises ~azure.core.exceptions.HttpResponseError: @@ -3712,7 +3679,7 @@ async def pending_upload( self, name: str, version: str, - pending_upload_request: _types.PendingUploadRequest, + pending_upload_request: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -3726,7 +3693,7 @@ async def pending_upload( :param version: The specific version id of the DatasetVersion to operate on. Required. :type version: str :param pending_upload_request: The pending upload request parameters. Required. - :type pending_upload_request: ~azure.ai.projects.types.PendingUploadRequest + :type pending_upload_request: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -3768,7 +3735,7 @@ async def pending_upload( self, name: str, version: str, - pending_upload_request: Union[_models.PendingUploadRequest, _types.PendingUploadRequest, IO[bytes]], + pending_upload_request: Union[_models.PendingUploadRequest, JSON, IO[bytes]], **kwargs: Any ) -> _models.PendingUploadResponse: """Start a pending upload. @@ -3779,10 +3746,10 @@ async def pending_upload( :type name: str :param version: The specific version id of the DatasetVersion to operate on. Required. :type version: str - :param pending_upload_request: The pending upload request parameters. Is either a - PendingUploadRequest type or a IO[bytes] type. Required. - :type pending_upload_request: ~azure.ai.projects.models.PendingUploadRequest or - ~azure.ai.projects.types.PendingUploadRequest or IO[bytes] + :param pending_upload_request: The pending upload request parameters. Is one of the following + types: PendingUploadRequest, JSON, IO[bytes] Required. + :type pending_upload_request: ~azure.ai.projects.models.PendingUploadRequest or JSON or + IO[bytes] :return: PendingUploadResponse. The PendingUploadResponse is compatible with MutableMapping :rtype: ~azure.ai.projects.models.PendingUploadResponse :raises ~azure.core.exceptions.HttpResponseError: @@ -3853,7 +3820,7 @@ async def pending_upload( async def get_credentials(self, name: str, version: str, **kwargs: Any) -> _models.DatasetCredential: """Get dataset credentials. - Gets the SAS credential to access the storage account associated with a Dataset version. + Retrieves the SAS credential to access the storage account associated with a dataset version. :param name: The name of the resource. Required. :type name: str @@ -3937,7 +3904,7 @@ def __init__(self, *args, **kwargs) -> None: async def get(self, name: str, **kwargs: Any) -> _models.Deployment: """Get a deployment. - Gets a deployed model. + Retrieves a deployed model. :param name: Name of the deployment. Required. :type name: str @@ -4462,13 +4429,7 @@ async def create_or_update( @overload async def create_or_update( - self, - name: str, - version: str, - index: _types.Index, - *, - content_type: str = "application/merge-patch+json", - **kwargs: Any + self, name: str, version: str, index: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> _models.Index: """Create or update a version. @@ -4479,7 +4440,7 @@ async def create_or_update( :param version: The specific version id of the Index to create or update. Required. :type version: str :param index: The Index to create or update. Required. - :type index: ~azure.ai.projects.types.Index + :type index: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/merge-patch+json". :paramtype content_type: str @@ -4518,7 +4479,7 @@ async def create_or_update( @distributed_trace_async async def create_or_update( - self, name: str, version: str, index: Union[_models.Index, _types.Index, IO[bytes]], **kwargs: Any + self, name: str, version: str, index: Union[_models.Index, JSON, IO[bytes]], **kwargs: Any ) -> _models.Index: """Create or update a version. @@ -4528,9 +4489,9 @@ async def create_or_update( :type name: str :param version: The specific version id of the Index to create or update. Required. :type version: str - :param index: The Index to create or update. Is either a Index type or a IO[bytes] type. - Required. - :type index: ~azure.ai.projects.models.Index or ~azure.ai.projects.types.Index or IO[bytes] + :param index: The Index to create or update. Is one of the following types: Index, JSON, + IO[bytes] Required. + :type index: ~azure.ai.projects.models.Index or JSON or IO[bytes] :return: Index. The Index is compatible with MutableMapping :rtype: ~azure.ai.projects.models.Index :raises ~azure.core.exceptions.HttpResponseError: @@ -4658,12 +4619,7 @@ async def create_version( @overload async def create_version( - self, - name: str, - body: _types.CreateToolboxVersionRequest, - *, - content_type: str = "application/json", - **kwargs: Any + self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.ToolboxVersionObject: """Create a new version of a toolbox. @@ -4673,7 +4629,7 @@ async def create_version( Required. :type name: str :param body: Required. - :type body: ~azure.ai.projects.types.CreateToolboxVersionRequest + :type body: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -4707,7 +4663,7 @@ async def create_version( async def create_version( self, name: str, - body: Union[JSON, _types.CreateToolboxVersionRequest, IO[bytes]] = _Unset, + body: Union[JSON, IO[bytes]] = _Unset, *, tools: List[_models.ToolboxTool] = _Unset, description: Optional[str] = None, @@ -4723,9 +4679,8 @@ async def create_version( :param name: The name of the toolbox. If the toolbox does not exist, it will be created. Required. :type name: str - :param body: Is one of the following types: JSON, CreateToolboxVersionRequest, IO[bytes] - Required. - :type body: JSON or ~azure.ai.projects.types.CreateToolboxVersionRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword tools: The list of tools to include in this version. Required. :paramtype tools: list[~azure.ai.projects.models.ToolboxTool] :keyword description: A human-readable description of the toolbox. Default value is None. @@ -5167,7 +5122,7 @@ async def update( @overload async def update( - self, name: str, body: _types.UpdateToolboxRequest1, *, content_type: str = "application/json", **kwargs: Any + self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.ToolboxObject: """Update a toolbox to point to a specific version. @@ -5176,7 +5131,7 @@ async def update( :param name: The name of the toolbox to update. Required. :type name: str :param body: Required. - :type body: ~azure.ai.projects.types.UpdateToolboxRequest1 + :type body: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -5207,12 +5162,7 @@ async def update( @distributed_trace_async async def update( - self, - name: str, - body: Union[JSON, _types.UpdateToolboxRequest1, IO[bytes]] = _Unset, - *, - default_version: str = _Unset, - **kwargs: Any + self, name: str, body: Union[JSON, IO[bytes]] = _Unset, *, default_version: str = _Unset, **kwargs: Any ) -> _models.ToolboxObject: """Update a toolbox to point to a specific version. @@ -5220,8 +5170,8 @@ async def update( :param name: The name of the toolbox to update. Required. :type name: str - :param body: Is one of the following types: JSON, UpdateToolboxRequest1, IO[bytes] Required. - :type body: JSON or ~azure.ai.projects.types.UpdateToolboxRequest1 or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword default_version: The version identifier that the toolbox should point to. When set, the toolbox's default version will resolve to this version instead of the latest. Required. :paramtype default_version: str @@ -5662,7 +5612,7 @@ async def create( @overload async def create( - self, name: str, taxonomy: _types.EvaluationTaxonomy, *, content_type: str = "application/json", **kwargs: Any + self, name: str, taxonomy: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.EvaluationTaxonomy: """Create an evaluation taxonomy. @@ -5671,7 +5621,7 @@ async def create( :param name: The name of the evaluation taxonomy. Required. :type name: str :param taxonomy: The evaluation taxonomy. Required. - :type taxonomy: ~azure.ai.projects.types.EvaluationTaxonomy + :type taxonomy: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -5702,10 +5652,7 @@ async def create( @distributed_trace_async async def create( - self, - name: str, - taxonomy: Union[_models.EvaluationTaxonomy, _types.EvaluationTaxonomy, IO[bytes]], - **kwargs: Any + self, name: str, taxonomy: Union[_models.EvaluationTaxonomy, JSON, IO[bytes]], **kwargs: Any ) -> _models.EvaluationTaxonomy: """Create an evaluation taxonomy. @@ -5713,10 +5660,9 @@ async def create( :param name: The name of the evaluation taxonomy. Required. :type name: str - :param taxonomy: The evaluation taxonomy. Is either a EvaluationTaxonomy type or a IO[bytes] - type. Required. - :type taxonomy: ~azure.ai.projects.models.EvaluationTaxonomy or - ~azure.ai.projects.types.EvaluationTaxonomy or IO[bytes] + :param taxonomy: The evaluation taxonomy. Is one of the following types: EvaluationTaxonomy, + JSON, IO[bytes] Required. + :type taxonomy: ~azure.ai.projects.models.EvaluationTaxonomy or JSON or IO[bytes] :return: EvaluationTaxonomy. The EvaluationTaxonomy is compatible with MutableMapping :rtype: ~azure.ai.projects.models.EvaluationTaxonomy :raises ~azure.core.exceptions.HttpResponseError: @@ -5788,7 +5734,7 @@ async def update( ) -> _models.EvaluationTaxonomy: """Update an evaluation taxonomy. - Update an evaluation taxonomy. + Modifies the specified evaluation taxonomy with the provided changes. :param name: The name of the evaluation taxonomy. Required. :type name: str @@ -5804,16 +5750,16 @@ async def update( @overload async def update( - self, name: str, taxonomy: _types.EvaluationTaxonomy, *, content_type: str = "application/json", **kwargs: Any + self, name: str, taxonomy: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.EvaluationTaxonomy: """Update an evaluation taxonomy. - Update an evaluation taxonomy. + Modifies the specified evaluation taxonomy with the provided changes. :param name: The name of the evaluation taxonomy. Required. :type name: str :param taxonomy: The evaluation taxonomy. Required. - :type taxonomy: ~azure.ai.projects.types.EvaluationTaxonomy + :type taxonomy: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -5828,7 +5774,7 @@ async def update( ) -> _models.EvaluationTaxonomy: """Update an evaluation taxonomy. - Update an evaluation taxonomy. + Modifies the specified evaluation taxonomy with the provided changes. :param name: The name of the evaluation taxonomy. Required. :type name: str @@ -5844,21 +5790,17 @@ async def update( @distributed_trace_async async def update( - self, - name: str, - taxonomy: Union[_models.EvaluationTaxonomy, _types.EvaluationTaxonomy, IO[bytes]], - **kwargs: Any + self, name: str, taxonomy: Union[_models.EvaluationTaxonomy, JSON, IO[bytes]], **kwargs: Any ) -> _models.EvaluationTaxonomy: """Update an evaluation taxonomy. - Update an evaluation taxonomy. + Modifies the specified evaluation taxonomy with the provided changes. :param name: The name of the evaluation taxonomy. Required. :type name: str - :param taxonomy: The evaluation taxonomy. Is either a EvaluationTaxonomy type or a IO[bytes] - type. Required. - :type taxonomy: ~azure.ai.projects.models.EvaluationTaxonomy or - ~azure.ai.projects.types.EvaluationTaxonomy or IO[bytes] + :param taxonomy: The evaluation taxonomy. Is one of the following types: EvaluationTaxonomy, + JSON, IO[bytes] Required. + :type taxonomy: ~azure.ai.projects.models.EvaluationTaxonomy or JSON or IO[bytes] :return: EvaluationTaxonomy. The EvaluationTaxonomy is compatible with MutableMapping :rtype: ~azure.ai.projects.models.EvaluationTaxonomy :raises ~azure.core.exceptions.HttpResponseError: @@ -6302,12 +6244,7 @@ async def create_version( @overload async def create_version( - self, - name: str, - evaluator_version: _types.EvaluatorVersion, - *, - content_type: str = "application/json", - **kwargs: Any + self, name: str, evaluator_version: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.EvaluatorVersion: """Create an evaluator version. @@ -6316,7 +6253,7 @@ async def create_version( :param name: The name of the resource. Required. :type name: str :param evaluator_version: Required. - :type evaluator_version: ~azure.ai.projects.types.EvaluatorVersion + :type evaluator_version: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -6347,10 +6284,7 @@ async def create_version( @distributed_trace_async async def create_version( - self, - name: str, - evaluator_version: Union[_models.EvaluatorVersion, _types.EvaluatorVersion, IO[bytes]], - **kwargs: Any + self, name: str, evaluator_version: Union[_models.EvaluatorVersion, JSON, IO[bytes]], **kwargs: Any ) -> _models.EvaluatorVersion: """Create an evaluator version. @@ -6358,9 +6292,9 @@ async def create_version( :param name: The name of the resource. Required. :type name: str - :param evaluator_version: Is either a EvaluatorVersion type or a IO[bytes] type. Required. - :type evaluator_version: ~azure.ai.projects.models.EvaluatorVersion or - ~azure.ai.projects.types.EvaluatorVersion or IO[bytes] + :param evaluator_version: Is one of the following types: EvaluatorVersion, JSON, IO[bytes] + Required. + :type evaluator_version: ~azure.ai.projects.models.EvaluatorVersion or JSON or IO[bytes] :return: EvaluatorVersion. The EvaluatorVersion is compatible with MutableMapping :rtype: ~azure.ai.projects.models.EvaluatorVersion :raises ~azure.core.exceptions.HttpResponseError: @@ -6456,13 +6390,7 @@ async def update_version( @overload async def update_version( - self, - name: str, - version: str, - evaluator_version: _types.EvaluatorVersion, - *, - content_type: str = "application/json", - **kwargs: Any + self, name: str, version: str, evaluator_version: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.EvaluatorVersion: """Update an evaluator version. @@ -6473,7 +6401,7 @@ async def update_version( :param version: The version of the EvaluatorVersion to update. Required. :type version: str :param evaluator_version: Evaluator resource. Required. - :type evaluator_version: ~azure.ai.projects.types.EvaluatorVersion + :type evaluator_version: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -6515,7 +6443,7 @@ async def update_version( self, name: str, version: str, - evaluator_version: Union[_models.EvaluatorVersion, _types.EvaluatorVersion, IO[bytes]], + evaluator_version: Union[_models.EvaluatorVersion, JSON, IO[bytes]], **kwargs: Any ) -> _models.EvaluatorVersion: """Update an evaluator version. @@ -6526,10 +6454,9 @@ async def update_version( :type name: str :param version: The version of the EvaluatorVersion to update. Required. :type version: str - :param evaluator_version: Evaluator resource. Is either a EvaluatorVersion type or a IO[bytes] - type. Required. - :type evaluator_version: ~azure.ai.projects.models.EvaluatorVersion or - ~azure.ai.projects.types.EvaluatorVersion or IO[bytes] + :param evaluator_version: Evaluator resource. Is one of the following types: EvaluatorVersion, + JSON, IO[bytes] Required. + :type evaluator_version: ~azure.ai.projects.models.EvaluatorVersion or JSON or IO[bytes] :return: EvaluatorVersion. The EvaluatorVersion is compatible with MutableMapping :rtype: ~azure.ai.projects.models.EvaluatorVersion :raises ~azure.core.exceptions.HttpResponseError: @@ -6611,7 +6538,7 @@ async def pending_upload( Initiates a new pending upload or retrieves an existing one for the specified evaluator version. - :param name: Required. + :param name: The name path parameter. Required. :type name: str :param version: The specific version id of the EvaluatorVersion to operate on. Required. :type version: str @@ -6630,7 +6557,7 @@ async def pending_upload( self, name: str, version: str, - pending_upload_request: _types.PendingUploadRequest, + pending_upload_request: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -6640,12 +6567,12 @@ async def pending_upload( Initiates a new pending upload or retrieves an existing one for the specified evaluator version. - :param name: Required. + :param name: The name path parameter. Required. :type name: str :param version: The specific version id of the EvaluatorVersion to operate on. Required. :type version: str :param pending_upload_request: The pending upload request parameters. Required. - :type pending_upload_request: ~azure.ai.projects.types.PendingUploadRequest + :type pending_upload_request: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -6669,7 +6596,7 @@ async def pending_upload( Initiates a new pending upload or retrieves an existing one for the specified evaluator version. - :param name: Required. + :param name: The name path parameter. Required. :type name: str :param version: The specific version id of the EvaluatorVersion to operate on. Required. :type version: str @@ -6688,7 +6615,7 @@ async def pending_upload( self, name: str, version: str, - pending_upload_request: Union[_models.PendingUploadRequest, _types.PendingUploadRequest, IO[bytes]], + pending_upload_request: Union[_models.PendingUploadRequest, JSON, IO[bytes]], **kwargs: Any ) -> _models.PendingUploadResponse: """Start a pending upload. @@ -6696,14 +6623,14 @@ async def pending_upload( Initiates a new pending upload or retrieves an existing one for the specified evaluator version. - :param name: Required. + :param name: The name path parameter. Required. :type name: str :param version: The specific version id of the EvaluatorVersion to operate on. Required. :type version: str - :param pending_upload_request: The pending upload request parameters. Is either a - PendingUploadRequest type or a IO[bytes] type. Required. - :type pending_upload_request: ~azure.ai.projects.models.PendingUploadRequest or - ~azure.ai.projects.types.PendingUploadRequest or IO[bytes] + :param pending_upload_request: The pending upload request parameters. Is one of the following + types: PendingUploadRequest, JSON, IO[bytes] Required. + :type pending_upload_request: ~azure.ai.projects.models.PendingUploadRequest or JSON or + IO[bytes] :return: PendingUploadResponse. The PendingUploadResponse is compatible with MutableMapping :rtype: ~azure.ai.projects.models.PendingUploadResponse :raises ~azure.core.exceptions.HttpResponseError: @@ -6789,7 +6716,7 @@ async def get_credentials( Retrieves SAS credentials for accessing the storage account associated with the specified evaluator version. - :param name: Required. + :param name: The name path parameter. Required. :type name: str :param version: The specific version id of the EvaluatorVersion to operate on. Required. :type version: str @@ -6808,7 +6735,7 @@ async def get_credentials( self, name: str, version: str, - credential_request: _types.EvaluatorCredentialRequest, + credential_request: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -6818,12 +6745,12 @@ async def get_credentials( Retrieves SAS credentials for accessing the storage account associated with the specified evaluator version. - :param name: Required. + :param name: The name path parameter. Required. :type name: str :param version: The specific version id of the EvaluatorVersion to operate on. Required. :type version: str :param credential_request: The credential request parameters. Required. - :type credential_request: ~azure.ai.projects.types.EvaluatorCredentialRequest + :type credential_request: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -6847,7 +6774,7 @@ async def get_credentials( Retrieves SAS credentials for accessing the storage account associated with the specified evaluator version. - :param name: Required. + :param name: The name path parameter. Required. :type name: str :param version: The specific version id of the EvaluatorVersion to operate on. Required. :type version: str @@ -6866,7 +6793,7 @@ async def get_credentials( self, name: str, version: str, - credential_request: Union[_models.EvaluatorCredentialRequest, _types.EvaluatorCredentialRequest, IO[bytes]], + credential_request: Union[_models.EvaluatorCredentialRequest, JSON, IO[bytes]], **kwargs: Any ) -> _models.DatasetCredential: """Get evaluator credentials. @@ -6874,14 +6801,14 @@ async def get_credentials( Retrieves SAS credentials for accessing the storage account associated with the specified evaluator version. - :param name: Required. + :param name: The name path parameter. Required. :type name: str :param version: The specific version id of the EvaluatorVersion to operate on. Required. :type version: str - :param credential_request: The credential request parameters. Is either a - EvaluatorCredentialRequest type or a IO[bytes] type. Required. - :type credential_request: ~azure.ai.projects.models.EvaluatorCredentialRequest or - ~azure.ai.projects.types.EvaluatorCredentialRequest or IO[bytes] + :param credential_request: The credential request parameters. Is one of the following types: + EvaluatorCredentialRequest, JSON, IO[bytes] Required. + :type credential_request: ~azure.ai.projects.models.EvaluatorCredentialRequest or JSON or + IO[bytes] :return: DatasetCredential. The DatasetCredential is compatible with MutableMapping :rtype: ~azure.ai.projects.models.DatasetCredential :raises ~azure.core.exceptions.HttpResponseError: @@ -6952,15 +6879,87 @@ async def get_credentials( return deserialized # type: ignore + async def _create_generation_job_initial( + self, + job: Union[_models.EvaluatorGenerationJob, JSON, IO[bytes]], + *, + operation_id: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(job, (IOBase, bytes)): + _content = job + else: + _content = json.dumps(job, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_beta_evaluators_create_generation_job_request( + operation_id=operation_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ApiErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + @overload - async def create_generation_job( + async def begin_create_generation_job( self, job: _models.EvaluatorGenerationJob, *, operation_id: Optional[str] = None, content_type: str = "application/json", **kwargs: Any - ) -> _models.EvaluatorGenerationJob: + ) -> AsyncLROPoller[_models.EvaluatorVersion]: """Create an evaluator generation job. Creates an evaluator generation job. The service generates rubric-based evaluator definitions @@ -6974,47 +6973,44 @@ async def create_generation_job( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: EvaluatorGenerationJob. The EvaluatorGenerationJob is compatible with MutableMapping - :rtype: ~azure.ai.projects.models.EvaluatorGenerationJob + :return: An instance of AsyncLROPoller that returns EvaluatorVersion. The EvaluatorVersion is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.ai.projects.models.EvaluatorVersion] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def create_generation_job( - self, - job: _types.EvaluatorGenerationJob, - *, - operation_id: Optional[str] = None, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.EvaluatorGenerationJob: + async def begin_create_generation_job( + self, job: JSON, *, operation_id: Optional[str] = None, content_type: str = "application/json", **kwargs: Any + ) -> AsyncLROPoller[_models.EvaluatorVersion]: """Create an evaluator generation job. Creates an evaluator generation job. The service generates rubric-based evaluator definitions from the provided source materials asynchronously. :param job: The job to create. Required. - :type job: ~azure.ai.projects.types.EvaluatorGenerationJob + :type job: JSON :keyword operation_id: Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. Default value is None. :paramtype operation_id: str :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: EvaluatorGenerationJob. The EvaluatorGenerationJob is compatible with MutableMapping - :rtype: ~azure.ai.projects.models.EvaluatorGenerationJob + :return: An instance of AsyncLROPoller that returns EvaluatorVersion. The EvaluatorVersion is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.ai.projects.models.EvaluatorVersion] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def create_generation_job( + async def begin_create_generation_job( self, job: IO[bytes], *, operation_id: Optional[str] = None, content_type: str = "application/json", **kwargs: Any - ) -> _models.EvaluatorGenerationJob: + ) -> AsyncLROPoller[_models.EvaluatorVersion]: """Create an evaluator generation job. Creates an evaluator generation job. The service generates rubric-based evaluator definitions @@ -7028,103 +7024,93 @@ async def create_generation_job( :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: EvaluatorGenerationJob. The EvaluatorGenerationJob is compatible with MutableMapping - :rtype: ~azure.ai.projects.models.EvaluatorGenerationJob + :return: An instance of AsyncLROPoller that returns EvaluatorVersion. The EvaluatorVersion is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.ai.projects.models.EvaluatorVersion] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async - async def create_generation_job( + async def begin_create_generation_job( self, - job: Union[_models.EvaluatorGenerationJob, _types.EvaluatorGenerationJob, IO[bytes]], + job: Union[_models.EvaluatorGenerationJob, JSON, IO[bytes]], *, operation_id: Optional[str] = None, **kwargs: Any - ) -> _models.EvaluatorGenerationJob: + ) -> AsyncLROPoller[_models.EvaluatorVersion]: """Create an evaluator generation job. Creates an evaluator generation job. The service generates rubric-based evaluator definitions from the provided source materials asynchronously. - :param job: The job to create. Is either a EvaluatorGenerationJob type or a IO[bytes] type. - Required. - :type job: ~azure.ai.projects.models.EvaluatorGenerationJob or - ~azure.ai.projects.types.EvaluatorGenerationJob or IO[bytes] + :param job: The job to create. Is one of the following types: EvaluatorGenerationJob, JSON, + IO[bytes] Required. + :type job: ~azure.ai.projects.models.EvaluatorGenerationJob or JSON or IO[bytes] :keyword operation_id: Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. Default value is None. :paramtype operation_id: str - :return: EvaluatorGenerationJob. The EvaluatorGenerationJob is compatible with MutableMapping - :rtype: ~azure.ai.projects.models.EvaluatorGenerationJob + :return: An instance of AsyncLROPoller that returns EvaluatorVersion. The EvaluatorVersion is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.ai.projects.models.EvaluatorVersion] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.EvaluatorGenerationJob] = kwargs.pop("cls", None) + cls: ClsType[_models.EvaluatorVersion] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_generation_job_initial( + job=job, + operation_id=operation_id, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) - content_type = content_type or "application/json" - _content = None - if isinstance(job, (IOBase, bytes)): - _content = job - else: - _content = json.dumps(job, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Operation-Location"] = self._deserialize( + "str", response.headers.get("Operation-Location") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = _deserialize(_models.EvaluatorVersion, response.json().get("result", {})) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized - _request = build_beta_evaluators_create_generation_job_request( - operation_id=operation_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) path_format_arguments = { "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - if response.status_code not in [201]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ApiErrorResponse, - response, + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: - deserialized = _deserialize(_models.EvaluatorGenerationJob, response.json()) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.EvaluatorVersion].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.EvaluatorVersion]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace_async async def get_generation_job(self, job_id: str, **kwargs: Any) -> _models.EvaluatorGenerationJob: @@ -7452,7 +7438,7 @@ async def generate( @overload async def generate( - self, insight: _types.Insight, *, content_type: str = "application/json", **kwargs: Any + self, insight: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.Insight: """Generate insights. @@ -7460,7 +7446,7 @@ async def generate( :param insight: Complete evaluation configuration including data source, evaluators, and result settings. Required. - :type insight: ~azure.ai.projects.types.Insight + :type insight: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -7489,17 +7475,14 @@ async def generate( """ @distributed_trace_async - async def generate( - self, insight: Union[_models.Insight, _types.Insight, IO[bytes]], **kwargs: Any - ) -> _models.Insight: + async def generate(self, insight: Union[_models.Insight, JSON, IO[bytes]], **kwargs: Any) -> _models.Insight: """Generate insights. Generates an insights report from the provided evaluation configuration. :param insight: Complete evaluation configuration including data source, evaluators, and result - settings. Is either a Insight type or a IO[bytes] type. Required. - :type insight: ~azure.ai.projects.models.Insight or ~azure.ai.projects.types.Insight or - IO[bytes] + settings. Is one of the following types: Insight, JSON, IO[bytes] Required. + :type insight: ~azure.ai.projects.models.Insight or JSON or IO[bytes] :return: Insight. The Insight is compatible with MutableMapping :rtype: ~azure.ai.projects.models.Insight :raises ~azure.core.exceptions.HttpResponseError: @@ -7813,14 +7796,14 @@ async def create( @overload async def create( - self, body: _types.CreateMemoryStoreRequest, *, content_type: str = "application/json", **kwargs: Any + self, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.MemoryStoreDetails: """Create a memory store. Creates a memory store resource with the provided configuration. :param body: Required. - :type body: ~azure.ai.projects.types.CreateMemoryStoreRequest + :type body: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -7850,7 +7833,7 @@ async def create( @distributed_trace_async async def create( self, - body: Union[JSON, _types.CreateMemoryStoreRequest, IO[bytes]] = _Unset, + body: Union[JSON, IO[bytes]] = _Unset, *, name: str = _Unset, definition: _models.MemoryStoreDefinition = _Unset, @@ -7862,8 +7845,8 @@ async def create( Creates a memory store resource with the provided configuration. - :param body: Is one of the following types: JSON, CreateMemoryStoreRequest, IO[bytes] Required. - :type body: JSON or ~azure.ai.projects.types.CreateMemoryStoreRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword name: The name of the memory store. Required. :paramtype name: str :keyword definition: The memory store definition. Required. @@ -7979,7 +7962,7 @@ async def update( @overload async def update( - self, name: str, body: _types.UpdateMemoryStoreRequest, *, content_type: str = "application/json", **kwargs: Any + self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.MemoryStoreDetails: """Update a memory store. @@ -7988,7 +7971,7 @@ async def update( :param name: The name of the memory store to update. Required. :type name: str :param body: Required. - :type body: ~azure.ai.projects.types.UpdateMemoryStoreRequest + :type body: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -8021,7 +8004,7 @@ async def update( async def update( self, name: str, - body: Union[JSON, _types.UpdateMemoryStoreRequest, IO[bytes]] = _Unset, + body: Union[JSON, IO[bytes]] = _Unset, *, description: Optional[str] = None, metadata: Optional[dict[str, str]] = None, @@ -8033,8 +8016,8 @@ async def update( :param name: The name of the memory store to update. Required. :type name: str - :param body: Is one of the following types: JSON, UpdateMemoryStoreRequest, IO[bytes] Required. - :type body: JSON or ~azure.ai.projects.types.UpdateMemoryStoreRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword description: A human-readable description of the memory store. Default value is None. :paramtype description: str :keyword metadata: Arbitrary key-value metadata to associate with the memory store. Default @@ -8352,7 +8335,7 @@ async def _search_memories( ) -> _models.MemoryStoreSearchResult: ... @overload async def _search_memories( - self, name: str, body: _types.SearchMemoriesRequest, *, content_type: str = "application/json", **kwargs: Any + self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.MemoryStoreSearchResult: ... @overload async def _search_memories( @@ -8363,7 +8346,7 @@ async def _search_memories( async def _search_memories( self, name: str, - body: Union[JSON, _types.SearchMemoriesRequest, IO[bytes]] = _Unset, + body: Union[JSON, IO[bytes]] = _Unset, *, scope: str = _Unset, items: Optional[List[dict[str, Any]]] = None, @@ -8377,8 +8360,8 @@ async def _search_memories( :param name: The name of the memory store to search. Required. :type name: str - :param body: Is one of the following types: JSON, SearchMemoriesRequest, IO[bytes] Required. - :type body: JSON or ~azure.ai.projects.types.SearchMemoriesRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword scope: The namespace that logically groups and isolates memories, such as a user ID. Required. :paramtype scope: str @@ -8466,7 +8449,7 @@ async def _search_memories( async def _update_memories_initial( self, name: str, - body: Union[JSON, _types.UpdateMemoriesRequest, IO[bytes]] = _Unset, + body: Union[JSON, IO[bytes]] = _Unset, *, scope: str = _Unset, items: Optional[List[dict[str, Any]]] = None, @@ -8562,7 +8545,7 @@ async def _begin_update_memories( ) -> AsyncLROPoller[_models.MemoryStoreUpdateCompletedResult]: ... @overload async def _begin_update_memories( - self, name: str, body: _types.UpdateMemoriesRequest, *, content_type: str = "application/json", **kwargs: Any + self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.MemoryStoreUpdateCompletedResult]: ... @overload async def _begin_update_memories( @@ -8573,7 +8556,7 @@ async def _begin_update_memories( async def _begin_update_memories( self, name: str, - body: Union[JSON, _types.UpdateMemoriesRequest, IO[bytes]] = _Unset, + body: Union[JSON, IO[bytes]] = _Unset, *, scope: str = _Unset, items: Optional[List[dict[str, Any]]] = None, @@ -8588,8 +8571,8 @@ async def _begin_update_memories( :param name: The name of the memory store to update. Required. :type name: str - :param body: Is one of the following types: JSON, UpdateMemoriesRequest, IO[bytes] Required. - :type body: JSON or ~azure.ai.projects.types.UpdateMemoriesRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword scope: The namespace that logically groups and isolates memories, such as a user ID. Required. :paramtype scope: str @@ -8695,7 +8678,7 @@ async def delete_scope( @overload async def delete_scope( - self, name: str, body: _types.DeleteScopeRequest, *, content_type: str = "application/json", **kwargs: Any + self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.MemoryStoreDeleteScopeResult: """Delete memories by scope. @@ -8704,7 +8687,7 @@ async def delete_scope( :param name: The name of the memory store. Required. :type name: str :param body: Required. - :type body: ~azure.ai.projects.types.DeleteScopeRequest + :type body: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -8737,12 +8720,7 @@ async def delete_scope( @distributed_trace_async async def delete_scope( - self, - name: str, - body: Union[JSON, _types.DeleteScopeRequest, IO[bytes]] = _Unset, - *, - scope: str = _Unset, - **kwargs: Any + self, name: str, body: Union[JSON, IO[bytes]] = _Unset, *, scope: str = _Unset, **kwargs: Any ) -> _models.MemoryStoreDeleteScopeResult: """Delete memories by scope. @@ -8750,8 +8728,8 @@ async def delete_scope( :param name: The name of the memory store. Required. :type name: str - :param body: Is one of the following types: JSON, DeleteScopeRequest, IO[bytes] Required. - :type body: JSON or ~azure.ai.projects.types.DeleteScopeRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword scope: The namespace that logically groups and isolates memories to delete, such as a user ID. Required. :paramtype scope: str @@ -8865,7 +8843,7 @@ async def create_memory( @overload async def create_memory( - self, name: str, body: _types.CreateMemoryRequest, *, content_type: str = "application/json", **kwargs: Any + self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.MemoryItem: """Create a memory item. @@ -8874,7 +8852,7 @@ async def create_memory( :param name: The name of the memory store. Required. :type name: str :param body: Required. - :type body: ~azure.ai.projects.types.CreateMemoryRequest + :type body: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -8907,7 +8885,7 @@ async def create_memory( async def create_memory( self, name: str, - body: Union[JSON, _types.CreateMemoryRequest, IO[bytes]] = _Unset, + body: Union[JSON, IO[bytes]] = _Unset, *, scope: str = _Unset, content: str = _Unset, @@ -8920,8 +8898,8 @@ async def create_memory( :param name: The name of the memory store. Required. :type name: str - :param body: Is one of the following types: JSON, CreateMemoryRequest, IO[bytes] Required. - :type body: JSON or ~azure.ai.projects.types.CreateMemoryRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword scope: The namespace that logically groups and isolates memories, such as a user ID. Required. :paramtype scope: str @@ -9032,13 +9010,7 @@ async def update_memory( @overload async def update_memory( - self, - name: str, - memory_id: str, - body: _types.UpdateMemoryRequest, - *, - content_type: str = "application/json", - **kwargs: Any + self, name: str, memory_id: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.MemoryItem: """Update a memory item. @@ -9049,7 +9021,7 @@ async def update_memory( :param memory_id: The ID of the memory item to update. Required. :type memory_id: str :param body: Required. - :type body: ~azure.ai.projects.types.UpdateMemoryRequest + :type body: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -9082,13 +9054,7 @@ async def update_memory( @distributed_trace_async async def update_memory( - self, - name: str, - memory_id: str, - body: Union[JSON, _types.UpdateMemoryRequest, IO[bytes]] = _Unset, - *, - content: str = _Unset, - **kwargs: Any + self, name: str, memory_id: str, body: Union[JSON, IO[bytes]] = _Unset, *, content: str = _Unset, **kwargs: Any ) -> _models.MemoryItem: """Update a memory item. @@ -9098,8 +9064,8 @@ async def update_memory( :type name: str :param memory_id: The ID of the memory item to update. Required. :type memory_id: str - :param body: Is one of the following types: JSON, UpdateMemoryRequest, IO[bytes] Required. - :type body: JSON or ~azure.ai.projects.types.UpdateMemoryRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword content: The updated content of the memory. Required. :paramtype content: str :return: MemoryItem. The MemoryItem is compatible with MutableMapping @@ -9298,7 +9264,7 @@ def list_memories( def list_memories( self, name: str, - body: _types.ListMemoriesRequest, + body: JSON, *, kind: Optional[Union[str, _models.MemoryItemKind]] = None, limit: Optional[int] = None, @@ -9314,7 +9280,7 @@ def list_memories( :param name: The name of the memory store. Required. :type name: str :param body: Required. - :type body: ~azure.ai.projects.types.ListMemoriesRequest + :type body: JSON :keyword kind: The kind of the memory item. Known values are: "user_profile", "chat_summary", and "procedural". Default value is None. :paramtype kind: str or ~azure.ai.projects.models.MemoryItemKind @@ -9390,7 +9356,7 @@ def list_memories( def list_memories( self, name: str, - body: Union[JSON, _types.ListMemoriesRequest, IO[bytes]] = _Unset, + body: Union[JSON, IO[bytes]] = _Unset, *, scope: str = _Unset, kind: Optional[Union[str, _models.MemoryItemKind]] = None, @@ -9405,8 +9371,8 @@ def list_memories( :param name: The name of the memory store. Required. :type name: str - :param body: Is one of the following types: JSON, ListMemoriesRequest, IO[bytes] Required. - :type body: JSON or ~azure.ai.projects.types.ListMemoriesRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword scope: The namespace that logically groups and isolates memories, such as a user ID. Required. :paramtype scope: str @@ -9849,8 +9815,7 @@ async def get(self, name: str, version: str, **kwargs: Any) -> _models.ModelVers async def delete(self, name: str, version: str, **kwargs: Any) -> None: """Delete a model version. - Delete the specific version of the ModelVersion. The service returns 200 OK if the ModelVersion - was deleted successfully or if the ModelVersion does not exist. + Removes the specified model version. Returns 200 whether the version existed or not. :param name: The name of the resource. Required. :type name: str @@ -9911,7 +9876,7 @@ async def update( ) -> _models.ModelVersion: """Update a model version. - Update an existing ModelVersion with the given version id. + Updates an existing model version identified by its version ID. :param name: The name of the resource. Required. :type name: str @@ -9933,14 +9898,14 @@ async def update( self, name: str, version: str, - model_version_update: _types.UpdateModelVersionRequest, + model_version_update: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> _models.ModelVersion: """Update a model version. - Update an existing ModelVersion with the given version id. + Updates an existing model version identified by its version ID. :param name: The name of the resource. Required. :type name: str @@ -9948,7 +9913,7 @@ async def update( Required. :type version: str :param model_version_update: The UpdateModelVersionRequest to create or update. Required. - :type model_version_update: ~azure.ai.projects.types.UpdateModelVersionRequest + :type model_version_update: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/merge-patch+json". :paramtype content_type: str @@ -9969,7 +9934,7 @@ async def update( ) -> _models.ModelVersion: """Update a model version. - Update an existing ModelVersion with the given version id. + Updates an existing model version identified by its version ID. :param name: The name of the resource. Required. :type name: str @@ -9991,22 +9956,22 @@ async def update( self, name: str, version: str, - model_version_update: Union[_models.UpdateModelVersionRequest, _types.UpdateModelVersionRequest, IO[bytes]], + model_version_update: Union[_models.UpdateModelVersionRequest, JSON, IO[bytes]], **kwargs: Any ) -> _models.ModelVersion: """Update a model version. - Update an existing ModelVersion with the given version id. + Updates an existing model version identified by its version ID. :param name: The name of the resource. Required. :type name: str :param version: The specific version id of the UpdateModelVersionRequest to create or update. Required. :type version: str - :param model_version_update: The UpdateModelVersionRequest to create or update. Is either a - UpdateModelVersionRequest type or a IO[bytes] type. Required. - :type model_version_update: ~azure.ai.projects.models.UpdateModelVersionRequest or - ~azure.ai.projects.types.UpdateModelVersionRequest or IO[bytes] + :param model_version_update: The UpdateModelVersionRequest to create or update. Is one of the + following types: UpdateModelVersionRequest, JSON, IO[bytes] Required. + :type model_version_update: ~azure.ai.projects.models.UpdateModelVersionRequest or JSON or + IO[bytes] :return: ModelVersion. The ModelVersion is compatible with MutableMapping :rtype: ~azure.ai.projects.models.ModelVersion :raises ~azure.core.exceptions.HttpResponseError: @@ -10104,13 +10069,7 @@ async def pending_create_version( @overload async def pending_create_version( - self, - name: str, - version: str, - model_version: _types.ModelVersion, - *, - content_type: str = "application/json", - **kwargs: Any + self, name: str, version: str, model_version: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.CreateAsyncResponse: """Create a model version async. @@ -10122,7 +10081,7 @@ async def pending_create_version( :param version: Version of the model. Required. :type version: str :param model_version: Model version to create. Required. - :type model_version: ~azure.ai.projects.types.ModelVersion + :type model_version: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -10162,11 +10121,7 @@ async def pending_create_version( @distributed_trace_async async def pending_create_version( - self, - name: str, - version: str, - model_version: Union[_models.ModelVersion, _types.ModelVersion, IO[bytes]], - **kwargs: Any + self, name: str, version: str, model_version: Union[_models.ModelVersion, JSON, IO[bytes]], **kwargs: Any ) -> _models.CreateAsyncResponse: """Create a model version async. @@ -10177,10 +10132,9 @@ async def pending_create_version( :type name: str :param version: Version of the model. Required. :type version: str - :param model_version: Model version to create. Is either a ModelVersion type or a IO[bytes] - type. Required. - :type model_version: ~azure.ai.projects.models.ModelVersion or - ~azure.ai.projects.types.ModelVersion or IO[bytes] + :param model_version: Model version to create. Is one of the following types: ModelVersion, + JSON, IO[bytes] Required. + :type model_version: ~azure.ai.projects.models.ModelVersion or JSON or IO[bytes] :return: CreateAsyncResponse. The CreateAsyncResponse is compatible with MutableMapping :rtype: ~azure.ai.projects.models.CreateAsyncResponse :raises ~azure.core.exceptions.HttpResponseError: @@ -10268,7 +10222,7 @@ async def pending_upload( :type name: str :param version: Version of the model. Required. :type version: str - :param pending_upload_request: Required. + :param pending_upload_request: The pending upload request request body. Required. :type pending_upload_request: ~azure.ai.projects.models.ModelPendingUploadRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". @@ -10284,7 +10238,7 @@ async def pending_upload( self, name: str, version: str, - pending_upload_request: _types.ModelPendingUploadRequest, + pending_upload_request: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -10297,8 +10251,8 @@ async def pending_upload( :type name: str :param version: Version of the model. Required. :type version: str - :param pending_upload_request: Required. - :type pending_upload_request: ~azure.ai.projects.types.ModelPendingUploadRequest + :param pending_upload_request: The pending upload request request body. Required. + :type pending_upload_request: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -10326,7 +10280,7 @@ async def pending_upload( :type name: str :param version: Version of the model. Required. :type version: str - :param pending_upload_request: Required. + :param pending_upload_request: The pending upload request request body. Required. :type pending_upload_request: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". @@ -10342,7 +10296,7 @@ async def pending_upload( self, name: str, version: str, - pending_upload_request: Union[_models.ModelPendingUploadRequest, _types.ModelPendingUploadRequest, IO[bytes]], + pending_upload_request: Union[_models.ModelPendingUploadRequest, JSON, IO[bytes]], **kwargs: Any ) -> _models.ModelPendingUploadResponse: """Start a pending upload. @@ -10353,10 +10307,10 @@ async def pending_upload( :type name: str :param version: Version of the model. Required. :type version: str - :param pending_upload_request: Is either a ModelPendingUploadRequest type or a IO[bytes] type. - Required. - :type pending_upload_request: ~azure.ai.projects.models.ModelPendingUploadRequest or - ~azure.ai.projects.types.ModelPendingUploadRequest or IO[bytes] + :param pending_upload_request: The pending upload request request body. Is one of the following + types: ModelPendingUploadRequest, JSON, IO[bytes] Required. + :type pending_upload_request: ~azure.ai.projects.models.ModelPendingUploadRequest or JSON or + IO[bytes] :return: ModelPendingUploadResponse. The ModelPendingUploadResponse is compatible with MutableMapping :rtype: ~azure.ai.projects.models.ModelPendingUploadResponse @@ -10442,7 +10396,7 @@ async def get_credentials( :type name: str :param version: Version of the model. Required. :type version: str - :param credential_request: Required. + :param credential_request: The credential request request body. Required. :type credential_request: ~azure.ai.projects.models.ModelCredentialRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". @@ -10457,7 +10411,7 @@ async def get_credentials( self, name: str, version: str, - credential_request: _types.ModelCredentialRequest, + credential_request: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -10470,8 +10424,8 @@ async def get_credentials( :type name: str :param version: Version of the model. Required. :type version: str - :param credential_request: Required. - :type credential_request: ~azure.ai.projects.types.ModelCredentialRequest + :param credential_request: The credential request request body. Required. + :type credential_request: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -10498,7 +10452,7 @@ async def get_credentials( :type name: str :param version: Version of the model. Required. :type version: str - :param credential_request: Required. + :param credential_request: The credential request request body. Required. :type credential_request: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". @@ -10513,7 +10467,7 @@ async def get_credentials( self, name: str, version: str, - credential_request: Union[_models.ModelCredentialRequest, _types.ModelCredentialRequest, IO[bytes]], + credential_request: Union[_models.ModelCredentialRequest, JSON, IO[bytes]], **kwargs: Any ) -> _models.DatasetCredential: """Get model asset credentials. @@ -10524,10 +10478,9 @@ async def get_credentials( :type name: str :param version: Version of the model. Required. :type version: str - :param credential_request: Is either a ModelCredentialRequest type or a IO[bytes] type. - Required. - :type credential_request: ~azure.ai.projects.models.ModelCredentialRequest or - ~azure.ai.projects.types.ModelCredentialRequest or IO[bytes] + :param credential_request: The credential request request body. Is one of the following types: + ModelCredentialRequest, JSON, IO[bytes] Required. + :type credential_request: ~azure.ai.projects.models.ModelCredentialRequest or JSON or IO[bytes] :return: DatasetCredential. The DatasetCredential is compatible with MutableMapping :rtype: ~azure.ai.projects.models.DatasetCredential :raises ~azure.core.exceptions.HttpResponseError: @@ -10784,15 +10737,13 @@ async def create( """ @overload - async def create( - self, red_team: _types.RedTeam, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.RedTeam: + async def create(self, red_team: JSON, *, content_type: str = "application/json", **kwargs: Any) -> _models.RedTeam: """Create a redteam run. Submits a new redteam run for execution with the provided configuration. :param red_team: Redteam to be run. Required. - :type red_team: ~azure.ai.projects.types.RedTeam + :type red_team: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -10820,16 +10771,14 @@ async def create( """ @distributed_trace_async - async def create( - self, red_team: Union[_models.RedTeam, _types.RedTeam, IO[bytes]], **kwargs: Any - ) -> _models.RedTeam: + async def create(self, red_team: Union[_models.RedTeam, JSON, IO[bytes]], **kwargs: Any) -> _models.RedTeam: """Create a redteam run. Submits a new redteam run for execution with the provided configuration. - :param red_team: Redteam to be run. Is either a RedTeam type or a IO[bytes] type. Required. - :type red_team: ~azure.ai.projects.models.RedTeam or ~azure.ai.projects.types.RedTeam or - IO[bytes] + :param red_team: Redteam to be run. Is one of the following types: RedTeam, JSON, IO[bytes] + Required. + :type red_team: ~azure.ai.projects.models.RedTeam or JSON or IO[bytes] :return: RedTeam. The RedTeam is compatible with MutableMapping :rtype: ~azure.ai.projects.models.RedTeam :raises ~azure.core.exceptions.HttpResponseError: @@ -10953,12 +10902,7 @@ async def create_or_update( @overload async def create_or_update( - self, - routine_name: str, - body: _types.CreateOrUpdateRoutineRequest, - *, - content_type: str = "application/json", - **kwargs: Any + self, routine_name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.Routine: """Create or update a routine. @@ -10967,7 +10911,7 @@ async def create_or_update( :param routine_name: The unique name of the routine. Required. :type routine_name: str :param body: Required. - :type body: ~azure.ai.projects.types.CreateOrUpdateRoutineRequest + :type body: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -11000,7 +10944,7 @@ async def create_or_update( async def create_or_update( self, routine_name: str, - body: Union[JSON, _types.CreateOrUpdateRoutineRequest, IO[bytes]] = _Unset, + body: Union[JSON, IO[bytes]] = _Unset, *, description: Optional[str] = None, enabled: Optional[bool] = None, @@ -11014,9 +10958,8 @@ async def create_or_update( :param routine_name: The unique name of the routine. Required. :type routine_name: str - :param body: Is one of the following types: JSON, CreateOrUpdateRoutineRequest, IO[bytes] - Required. - :type body: JSON or ~azure.ai.projects.types.CreateOrUpdateRoutineRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword description: A human-readable description of the routine. Default value is None. :paramtype description: str :keyword enabled: Whether the routine is enabled. Default value is None. @@ -11557,12 +11500,7 @@ async def dispatch( @overload async def dispatch( - self, - routine_name: str, - body: _types.DispatchRoutineAsyncRequest, - *, - content_type: str = "application/json", - **kwargs: Any + self, routine_name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.DispatchRoutineResult: """Queue an asynchronous routine dispatch. @@ -11571,7 +11509,7 @@ async def dispatch( :param routine_name: The unique name of the routine. Required. :type routine_name: str :param body: Required. - :type body: ~azure.ai.projects.types.DispatchRoutineAsyncRequest + :type body: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -11604,7 +11542,7 @@ async def dispatch( async def dispatch( self, routine_name: str, - body: Union[JSON, _types.DispatchRoutineAsyncRequest, IO[bytes]] = _Unset, + body: Union[JSON, IO[bytes]] = _Unset, *, payload: Optional[_models.RoutineDispatchPayload] = None, **kwargs: Any @@ -11615,9 +11553,8 @@ async def dispatch( :param routine_name: The unique name of the routine. Required. :type routine_name: str - :param body: Is one of the following types: JSON, DispatchRoutineAsyncRequest, IO[bytes] - Required. - :type body: JSON or ~azure.ai.projects.types.DispatchRoutineAsyncRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword payload: A direct action-input override sent downstream when testing a routine. Default value is None. :paramtype payload: ~azure.ai.projects.models.RoutineDispatchPayload @@ -11949,7 +11886,7 @@ async def create_or_update( @overload async def create_or_update( - self, schedule_id: str, schedule: _types.Schedule, *, content_type: str = "application/json", **kwargs: Any + self, schedule_id: str, schedule: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.Schedule: """Create or update a schedule. @@ -11958,7 +11895,7 @@ async def create_or_update( :param schedule_id: Identifier of the schedule. Required. :type schedule_id: str :param schedule: The resource instance. Required. - :type schedule: ~azure.ai.projects.types.Schedule + :type schedule: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -11989,7 +11926,7 @@ async def create_or_update( @distributed_trace_async async def create_or_update( - self, schedule_id: str, schedule: Union[_models.Schedule, _types.Schedule, IO[bytes]], **kwargs: Any + self, schedule_id: str, schedule: Union[_models.Schedule, JSON, IO[bytes]], **kwargs: Any ) -> _models.Schedule: """Create or update a schedule. @@ -11997,10 +11934,9 @@ async def create_or_update( :param schedule_id: Identifier of the schedule. Required. :type schedule_id: str - :param schedule: The resource instance. Is either a Schedule type or a IO[bytes] type. - Required. - :type schedule: ~azure.ai.projects.models.Schedule or ~azure.ai.projects.types.Schedule or - IO[bytes] + :param schedule: The resource instance. Is one of the following types: Schedule, JSON, + IO[bytes] Required. + :type schedule: ~azure.ai.projects.models.Schedule or JSON or IO[bytes] :return: Schedule. The Schedule is compatible with MutableMapping :rtype: ~azure.ai.projects.models.Schedule :raises ~azure.core.exceptions.HttpResponseError: @@ -12443,7 +12379,7 @@ async def update( @overload async def update( - self, name: str, body: _types.UpdateSkillRequest, *, content_type: str = "application/json", **kwargs: Any + self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.SkillDetails: """Update a skill. @@ -12452,7 +12388,7 @@ async def update( :param name: The name of the skill to update. Required. :type name: str :param body: Required. - :type body: ~azure.ai.projects.types.UpdateSkillRequest + :type body: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -12483,12 +12419,7 @@ async def update( @distributed_trace_async async def update( - self, - name: str, - body: Union[JSON, _types.UpdateSkillRequest, IO[bytes]] = _Unset, - *, - default_version: str = _Unset, - **kwargs: Any + self, name: str, body: Union[JSON, IO[bytes]] = _Unset, *, default_version: str = _Unset, **kwargs: Any ) -> _models.SkillDetails: """Update a skill. @@ -12496,8 +12427,8 @@ async def update( :param name: The name of the skill to update. Required. :type name: str - :param body: Is one of the following types: JSON, UpdateSkillRequest, IO[bytes] Required. - :type body: JSON or ~azure.ai.projects.types.UpdateSkillRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword default_version: The version identifier that the skill should point to. When set, the skill's default version will resolve to this version instead of the latest. Required. :paramtype default_version: str @@ -12673,12 +12604,7 @@ async def create( @overload async def create( - self, - name: str, - body: _types.CreateSkillVersionRequest, - *, - content_type: str = "application/json", - **kwargs: Any + self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.SkillVersion: """Create a new version of a skill. @@ -12687,7 +12613,7 @@ async def create( :param name: The name of the skill. If the skill does not exist, it will be created. Required. :type name: str :param body: Required. - :type body: ~azure.ai.projects.types.CreateSkillVersionRequest + :type body: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -12720,7 +12646,7 @@ async def create( async def create( self, name: str, - body: Union[JSON, _types.CreateSkillVersionRequest, IO[bytes]] = _Unset, + body: Union[JSON, IO[bytes]] = _Unset, *, inline_content: Optional[_models.SkillInlineContent] = None, default: Optional[bool] = None, @@ -12732,9 +12658,8 @@ async def create( :param name: The name of the skill. If the skill does not exist, it will be created. Required. :type name: str - :param body: Is one of the following types: JSON, CreateSkillVersionRequest, IO[bytes] - Required. - :type body: JSON or ~azure.ai.projects.types.CreateSkillVersionRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword inline_content: Inline skill content for simple skills without file uploads. Foundry-specific extension. Default value is None. :paramtype inline_content: ~azure.ai.projects.models.SkillInlineContent @@ -12822,7 +12747,7 @@ async def create_from_files( :param name: The name of the skill. Required. :type name: str - :param content: Required. + :param content: The multipart request content. Required. :type content: ~azure.ai.projects.models.CreateSkillVersionFromFilesBody :return: SkillVersion. The SkillVersion is compatible with MutableMapping :rtype: ~azure.ai.projects.models.SkillVersion @@ -12830,17 +12755,15 @@ async def create_from_files( """ @overload - async def create_from_files( - self, name: str, content: _types.CreateSkillVersionFromFilesBody, **kwargs: Any - ) -> _models.SkillVersion: + async def create_from_files(self, name: str, content: JSON, **kwargs: Any) -> _models.SkillVersion: """Create a skill version from uploaded files. Creates a new version of a skill from uploaded files via multipart form data. :param name: The name of the skill. Required. :type name: str - :param content: Required. - :type content: ~azure.ai.projects.types.CreateSkillVersionFromFilesBody + :param content: The multipart request content. Required. + :type content: JSON :return: SkillVersion. The SkillVersion is compatible with MutableMapping :rtype: ~azure.ai.projects.models.SkillVersion :raises ~azure.core.exceptions.HttpResponseError: @@ -12848,10 +12771,7 @@ async def create_from_files( @distributed_trace_async async def create_from_files( - self, - name: str, - content: Union[_models.CreateSkillVersionFromFilesBody, _types.CreateSkillVersionFromFilesBody], - **kwargs: Any + self, name: str, content: Union[_models.CreateSkillVersionFromFilesBody, JSON], **kwargs: Any ) -> _models.SkillVersion: """Create a skill version from uploaded files. @@ -12859,9 +12779,9 @@ async def create_from_files( :param name: The name of the skill. Required. :type name: str - :param content: Is one of the following types: CreateSkillVersionFromFilesBody Required. - :type content: ~azure.ai.projects.models.CreateSkillVersionFromFilesBody or - ~azure.ai.projects.types.CreateSkillVersionFromFilesBody + :param content: The multipart request content. Is either a CreateSkillVersionFromFilesBody type + or a JSON type. Required. + :type content: ~azure.ai.projects.models.CreateSkillVersionFromFilesBody or JSON :return: SkillVersion. The SkillVersion is compatible with MutableMapping :rtype: ~azure.ai.projects.models.SkillVersion :raises ~azure.core.exceptions.HttpResponseError: @@ -13481,15 +13401,87 @@ async def get_next(_continuation_token=None): return AsyncItemPaged(get_next, extract_data) + async def _create_generation_job_initial( + self, + job: Union[_models.DataGenerationJob, JSON, IO[bytes]], + *, + operation_id: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(job, (IOBase, bytes)): + _content = job + else: + _content = json.dumps(job, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_beta_datasets_create_generation_job_request( + operation_id=operation_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ApiErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + @overload - async def create_generation_job( + async def begin_create_generation_job( self, job: _models.DataGenerationJob, *, operation_id: Optional[str] = None, content_type: str = "application/json", **kwargs: Any - ) -> _models.DataGenerationJob: + ) -> AsyncLROPoller[_models.DataGenerationJobResult]: """Create a data generation job. Submits a new data generation job for asynchronous execution. @@ -13502,46 +13494,43 @@ async def create_generation_job( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: DataGenerationJob. The DataGenerationJob is compatible with MutableMapping - :rtype: ~azure.ai.projects.models.DataGenerationJob + :return: An instance of AsyncLROPoller that returns DataGenerationJobResult. The + DataGenerationJobResult is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.ai.projects.models.DataGenerationJobResult] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def create_generation_job( - self, - job: _types.DataGenerationJob, - *, - operation_id: Optional[str] = None, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DataGenerationJob: + async def begin_create_generation_job( + self, job: JSON, *, operation_id: Optional[str] = None, content_type: str = "application/json", **kwargs: Any + ) -> AsyncLROPoller[_models.DataGenerationJobResult]: """Create a data generation job. Submits a new data generation job for asynchronous execution. :param job: The job to create. Required. - :type job: ~azure.ai.projects.types.DataGenerationJob + :type job: JSON :keyword operation_id: Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. Default value is None. :paramtype operation_id: str :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: DataGenerationJob. The DataGenerationJob is compatible with MutableMapping - :rtype: ~azure.ai.projects.models.DataGenerationJob + :return: An instance of AsyncLROPoller that returns DataGenerationJobResult. The + DataGenerationJobResult is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.ai.projects.models.DataGenerationJobResult] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def create_generation_job( + async def begin_create_generation_job( self, job: IO[bytes], *, operation_id: Optional[str] = None, content_type: str = "application/json", **kwargs: Any - ) -> _models.DataGenerationJob: + ) -> AsyncLROPoller[_models.DataGenerationJobResult]: """Create a data generation job. Submits a new data generation job for asynchronous execution. @@ -13554,102 +13543,92 @@ async def create_generation_job( :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: DataGenerationJob. The DataGenerationJob is compatible with MutableMapping - :rtype: ~azure.ai.projects.models.DataGenerationJob + :return: An instance of AsyncLROPoller that returns DataGenerationJobResult. The + DataGenerationJobResult is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.ai.projects.models.DataGenerationJobResult] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async - async def create_generation_job( + async def begin_create_generation_job( self, - job: Union[_models.DataGenerationJob, _types.DataGenerationJob, IO[bytes]], + job: Union[_models.DataGenerationJob, JSON, IO[bytes]], *, operation_id: Optional[str] = None, **kwargs: Any - ) -> _models.DataGenerationJob: + ) -> AsyncLROPoller[_models.DataGenerationJobResult]: """Create a data generation job. Submits a new data generation job for asynchronous execution. - :param job: The job to create. Is either a DataGenerationJob type or a IO[bytes] type. - Required. - :type job: ~azure.ai.projects.models.DataGenerationJob or - ~azure.ai.projects.types.DataGenerationJob or IO[bytes] + :param job: The job to create. Is one of the following types: DataGenerationJob, JSON, + IO[bytes] Required. + :type job: ~azure.ai.projects.models.DataGenerationJob or JSON or IO[bytes] :keyword operation_id: Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. Default value is None. :paramtype operation_id: str - :return: DataGenerationJob. The DataGenerationJob is compatible with MutableMapping - :rtype: ~azure.ai.projects.models.DataGenerationJob + :return: An instance of AsyncLROPoller that returns DataGenerationJobResult. The + DataGenerationJobResult is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.ai.projects.models.DataGenerationJobResult] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DataGenerationJob] = kwargs.pop("cls", None) + cls: ClsType[_models.DataGenerationJobResult] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_generation_job_initial( + job=job, + operation_id=operation_id, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) - content_type = content_type or "application/json" - _content = None - if isinstance(job, (IOBase, bytes)): - _content = job - else: - _content = json.dumps(job, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Operation-Location"] = self._deserialize( + "str", response.headers.get("Operation-Location") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = _deserialize(_models.DataGenerationJobResult, response.json().get("result", {})) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized - _request = build_beta_datasets_create_generation_job_request( - operation_id=operation_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) path_format_arguments = { "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - if response.status_code not in [201]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ApiErrorResponse, - response, + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: - deserialized = _deserialize(_models.DataGenerationJob, response.json()) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.DataGenerationJobResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.DataGenerationJobResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace_async async def cancel_generation_job(self, job_id: str, **kwargs: Any) -> _models.DataGenerationJob: @@ -13790,19 +13769,87 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + async def _create_optimization_job_initial( + self, job: Union[_models.OptimizationJob, JSON, IO[bytes]], *, operation_id: Optional[str] = None, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(job, (IOBase, bytes)): + _content = job + else: + _content = json.dumps(job, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_beta_agents_create_optimization_job_request( + operation_id=operation_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ApiErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + @overload - async def create_optimization_job( + async def begin_create_optimization_job( self, job: _models.OptimizationJob, *, operation_id: Optional[str] = None, content_type: str = "application/json", **kwargs: Any - ) -> _models.OptimizationJob: - """Creates an agent optimization job. + ) -> AsyncLROPoller[_models.OptimizationJobResult]: + """Create an agent optimization job. - Create an optimization job. Returns 201 with the queued job. Honours ``Operation-Id`` for - idempotent retry. + Creates an optimization job and returns the queued job. Honors ``Operation-Id`` for idempotent + retry. :param job: The job to create. Required. :type job: ~azure.ai.projects.models.OptimizationJob @@ -13812,51 +13859,48 @@ async def create_optimization_job( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: OptimizationJob. The OptimizationJob is compatible with MutableMapping - :rtype: ~azure.ai.projects.models.OptimizationJob + :return: An instance of AsyncLROPoller that returns OptimizationJobResult. The + OptimizationJobResult is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.ai.projects.models.OptimizationJobResult] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def create_optimization_job( - self, - job: _types.OptimizationJob, - *, - operation_id: Optional[str] = None, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.OptimizationJob: - """Creates an agent optimization job. + async def begin_create_optimization_job( + self, job: JSON, *, operation_id: Optional[str] = None, content_type: str = "application/json", **kwargs: Any + ) -> AsyncLROPoller[_models.OptimizationJobResult]: + """Create an agent optimization job. - Create an optimization job. Returns 201 with the queued job. Honours ``Operation-Id`` for - idempotent retry. + Creates an optimization job and returns the queued job. Honors ``Operation-Id`` for idempotent + retry. :param job: The job to create. Required. - :type job: ~azure.ai.projects.types.OptimizationJob + :type job: JSON :keyword operation_id: Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. Default value is None. :paramtype operation_id: str :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: OptimizationJob. The OptimizationJob is compatible with MutableMapping - :rtype: ~azure.ai.projects.models.OptimizationJob + :return: An instance of AsyncLROPoller that returns OptimizationJobResult. The + OptimizationJobResult is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.ai.projects.models.OptimizationJobResult] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def create_optimization_job( + async def begin_create_optimization_job( self, job: IO[bytes], *, operation_id: Optional[str] = None, content_type: str = "application/json", **kwargs: Any - ) -> _models.OptimizationJob: - """Creates an agent optimization job. + ) -> AsyncLROPoller[_models.OptimizationJobResult]: + """Create an agent optimization job. - Create an optimization job. Returns 201 with the queued job. Honours ``Operation-Id`` for - idempotent retry. + Creates an optimization job and returns the queued job. Honors ``Operation-Id`` for idempotent + retry. :param job: The job to create. Required. :type job: IO[bytes] @@ -13866,108 +13910,95 @@ async def create_optimization_job( :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: OptimizationJob. The OptimizationJob is compatible with MutableMapping - :rtype: ~azure.ai.projects.models.OptimizationJob + :return: An instance of AsyncLROPoller that returns OptimizationJobResult. The + OptimizationJobResult is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.ai.projects.models.OptimizationJobResult] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async - async def create_optimization_job( - self, - job: Union[_models.OptimizationJob, _types.OptimizationJob, IO[bytes]], - *, - operation_id: Optional[str] = None, - **kwargs: Any - ) -> _models.OptimizationJob: - """Creates an agent optimization job. + async def begin_create_optimization_job( + self, job: Union[_models.OptimizationJob, JSON, IO[bytes]], *, operation_id: Optional[str] = None, **kwargs: Any + ) -> AsyncLROPoller[_models.OptimizationJobResult]: + """Create an agent optimization job. - Create an optimization job. Returns 201 with the queued job. Honours ``Operation-Id`` for - idempotent retry. + Creates an optimization job and returns the queued job. Honors ``Operation-Id`` for idempotent + retry. - :param job: The job to create. Is either a OptimizationJob type or a IO[bytes] type. Required. - :type job: ~azure.ai.projects.models.OptimizationJob or - ~azure.ai.projects.types.OptimizationJob or IO[bytes] + :param job: The job to create. Is one of the following types: OptimizationJob, JSON, IO[bytes] + Required. + :type job: ~azure.ai.projects.models.OptimizationJob or JSON or IO[bytes] :keyword operation_id: Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. Default value is None. :paramtype operation_id: str - :return: OptimizationJob. The OptimizationJob is compatible with MutableMapping - :rtype: ~azure.ai.projects.models.OptimizationJob + :return: An instance of AsyncLROPoller that returns OptimizationJobResult. The + OptimizationJobResult is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.ai.projects.models.OptimizationJobResult] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.OptimizationJob] = kwargs.pop("cls", None) + cls: ClsType[_models.OptimizationJobResult] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_optimization_job_initial( + job=job, + operation_id=operation_id, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) - content_type = content_type or "application/json" - _content = None - if isinstance(job, (IOBase, bytes)): - _content = job - else: - _content = json.dumps(job, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Operation-Location"] = self._deserialize( + "str", response.headers.get("Operation-Location") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = _deserialize(_models.OptimizationJobResult, response.json().get("result", {})) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized - _request = build_beta_agents_create_optimization_job_request( - operation_id=operation_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) path_format_arguments = { "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - if response.status_code not in [201]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ApiErrorResponse, - response, + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: - deserialized = _deserialize(_models.OptimizationJob, response.json()) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.OptimizationJobResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.OptimizationJobResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace_async async def get_optimization_job(self, job_id: str, **kwargs: Any) -> _models.OptimizationJob: - """Get info about an agent optimization job. + """Get an agent optimization job. - Get an optimization job by id. + Retrieves an optimization job by its identifier. :param job_id: The ID of the job. Required. :type job_id: str @@ -14044,9 +14075,9 @@ def list_optimization_jobs( agent_name: Optional[str] = None, **kwargs: Any ) -> AsyncItemPaged["_models.OptimizationJobListItem"]: - """Returns a list of agent optimization jobs. + """List agent optimization jobs. - List optimization jobs. Supports cursor pagination and optional status / agent_name filters. + Lists optimization jobs with cursor pagination and optional status or agent name filters. :keyword limit: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the @@ -14137,10 +14168,10 @@ async def get_next(_continuation_token=None): @distributed_trace_async async def cancel_optimization_job(self, job_id: str, **kwargs: Any) -> _models.OptimizationJob: - """Cancels an agent optimization job. + """Cancel an agent optimization job. - Request cancellation of a running or queued job. Returns an error if the job is already in a - terminal state. + Requests cancellation of a running or queued job and returns an error if the job is already in + a terminal state. :param job_id: The ID of the job to cancel. Required. :type job_id: str @@ -14205,9 +14236,9 @@ async def cancel_optimization_job(self, job_id: str, **kwargs: Any) -> _models.O @distributed_trace_async async def delete_optimization_job(self, job_id: str, **kwargs: Any) -> None: - """Deletes an agent optimization job. + """Delete an agent optimization job. - Delete the job and its candidate artifacts. Cancels first if non-terminal. + Deletes the job and its candidate artifacts, canceling the job first if it is non-terminal. :param job_id: The ID of the job to delete. Required. :type job_id: str diff --git a/sdk/ai/azure-ai-projects/azure/ai/projects/aio/operations/_patch_agents_async.py b/sdk/ai/azure-ai-projects/azure/ai/projects/aio/operations/_patch_agents_async.py index e8420339b184..cd906a8d8498 100644 --- a/sdk/ai/azure-ai-projects/azure/ai/projects/aio/operations/_patch_agents_async.py +++ b/sdk/ai/azure-ai-projects/azure/ai/projects/aio/operations/_patch_agents_async.py @@ -11,9 +11,8 @@ from typing import Union, Optional, Any, IO, overload from azure.core.exceptions import HttpResponseError from azure.core.tracing.decorator_async import distributed_trace_async -from ._operations import AgentsOperations as GeneratedAgentsOperations, _Unset +from ._operations import AgentsOperations as GeneratedAgentsOperations, JSON, _Unset from ... import models as _models -from ... import types as _types from ...operations._patch_agents import _compute_sha256_from_stream from ...models._patch import ( _FOUNDRY_FEATURES_HEADER_NAME, @@ -87,12 +86,7 @@ async def create_version( @overload async def create_version( - self, - agent_name: str, - body: _types.CreateAgentVersionRequest, - *, - content_type: str = "application/json", - **kwargs: Any, + self, agent_name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.AgentVersionDetails: """Create an agent version. @@ -106,7 +100,7 @@ async def create_version( * Must not exceed 63 characters. Required. :type agent_name: str :param body: Required. - :type body: ~azure.ai.projects.types.CreateAgentVersionRequest + :type body: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -144,7 +138,7 @@ async def create_version( async def create_version( self, agent_name: str, - body: Union[_types.CreateAgentVersionRequest, IO[bytes]] = _Unset, + body: Union[JSON, IO[bytes]] = _Unset, *, definition: _models.AgentDefinition = _Unset, metadata: Optional[dict[str, str]] = None, @@ -164,9 +158,8 @@ async def create_version( * Can contain hyphens in the middle * Must not exceed 63 characters. Required. :type agent_name: str - :param body: Is one of the following types: CreateAgentVersionRequest, IO[bytes] - Required. - :type body: ~azure.ai.projects.types.CreateAgentVersionRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword definition: The agent definition. This can be a workflow, hosted agent, or a simple agent definition. Required. :paramtype definition: ~azure.ai.projects.models.AgentDefinition @@ -200,20 +193,14 @@ async def create_version( kwargs["headers"] = headers try: - if body is _Unset: - return await super().create_version( - agent_name, - definition=definition, - metadata=metadata, - description=description, - blueprint_reference=blueprint_reference, - draft=draft, - **kwargs, - ) - return await super().create_version( agent_name, body, + definition=definition, + metadata=metadata, + description=description, + blueprint_reference=blueprint_reference, + draft=draft, **kwargs, ) except HttpResponseError as exc: diff --git a/sdk/ai/azure-ai-projects/azure/ai/projects/aio/operations/_patch_evaluation_rules_async.py b/sdk/ai/azure-ai-projects/azure/ai/projects/aio/operations/_patch_evaluation_rules_async.py index 6104e6989700..7e61eeb2866c 100644 --- a/sdk/ai/azure-ai-projects/azure/ai/projects/aio/operations/_patch_evaluation_rules_async.py +++ b/sdk/ai/azure-ai-projects/azure/ai/projects/aio/operations/_patch_evaluation_rules_async.py @@ -11,9 +11,8 @@ from typing import Union, Any, IO, overload from azure.core.exceptions import HttpResponseError from azure.core.tracing.decorator_async import distributed_trace_async -from ._operations import EvaluationRulesOperations as GeneratedEvaluationRulesOperations +from ._operations import EvaluationRulesOperations as GeneratedEvaluationRulesOperations, JSON from ... import models as _models -from ... import types as _types from ...models._enums import _FoundryFeaturesOptInKeys from ...models._patch import ( _FOUNDRY_FEATURES_HEADER_NAME, @@ -54,16 +53,14 @@ async def create_or_update( @overload async def create_or_update( - self, id: str, evaluation_rule: _types.EvaluationRule, *, content_type: str = "application/json", **kwargs: Any + self, id: str, evaluation_rule: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.EvaluationRule: """Create or update an evaluation rule. - Creates a new evaluation rule, or replaces the existing rule when the identifier matches. - :param id: Unique identifier for the evaluation rule. Required. :type id: str :param evaluation_rule: Evaluation rule resource. Required. - :type evaluation_rule: ~azure.ai.projects.types.EvaluationRule + :type evaluation_rule: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -94,18 +91,15 @@ async def create_or_update( @distributed_trace_async async def create_or_update( - self, id: str, evaluation_rule: Union[_models.EvaluationRule, _types.EvaluationRule, IO[bytes]], **kwargs: Any + self, id: str, evaluation_rule: Union[_models.EvaluationRule, JSON, IO[bytes]], **kwargs: Any ) -> _models.EvaluationRule: """Create or update an evaluation rule. - Creates a new evaluation rule, or replaces the existing rule when the identifier matches. - :param id: Unique identifier for the evaluation rule. Required. :type id: str - :param evaluation_rule: Evaluation rule resource. Is either a EvaluationRule type or a - IO[bytes] type. Required. - :type evaluation_rule: ~azure.ai.projects.models.EvaluationRule or - ~azure.ai.projects.types.EvaluationRule or IO[bytes] + :param evaluation_rule: Evaluation rule resource. Is one of the following types: + EvaluationRule, JSON, IO[bytes] Required. + :type evaluation_rule: ~azure.ai.projects.models.EvaluationRule or JSON or IO[bytes] :return: EvaluationRule. The EvaluationRule is compatible with MutableMapping :rtype: ~azure.ai.projects.models.EvaluationRule :raises ~azure.core.exceptions.HttpResponseError: diff --git a/sdk/ai/azure-ai-projects/azure/ai/projects/models/__init__.py b/sdk/ai/azure-ai-projects/azure/ai/projects/models/__init__.py index 2ee8abc3cf86..8ab257c7eaef 100644 --- a/sdk/ai/azure-ai-projects/azure/ai/projects/models/__init__.py +++ b/sdk/ai/azure-ai-projects/azure/ai/projects/models/__init__.py @@ -292,6 +292,7 @@ RoutineRun, RoutineTrigger, RubricBasedEvaluatorDefinition, + RubricGenerationInputQualityWarning, SASCredentials, Schedule, ScheduleRoutineTrigger, @@ -311,6 +312,7 @@ SpecificFunctionShellParam, StructuredInputDefinition, StructuredOutputDefinition, + TaskGenerationDataGenerationJobOptions, TaxonomyCategory, TaxonomySubCategory, TelemetryConfig, @@ -339,6 +341,7 @@ ToolDescription, ToolProjectConnection, ToolSearchToolParam, + ToolSearchToolboxTool, ToolUseFineTuningDataGenerationJobOptions, ToolboxObject, ToolboxPolicies, @@ -358,6 +361,8 @@ VersionRefIndicator, VersionSelectionRule, VersionSelector, + WebIQPreviewTool, + WebIQPreviewToolboxTool, WebSearchApproximateLocation, WebSearchConfiguration, WebSearchPreviewTool, @@ -374,6 +379,7 @@ AgentBlueprintReferenceType, AgentEndpointAuthorizationSchemeType, AgentEndpointProtocol, + AgentIdentityStatus, AgentKind, AgentObjectType, AgentSessionStatus, @@ -412,6 +418,7 @@ FoundryModelWarningCode, FoundryModelWeightType, FunctionShellToolParamEnvironmentType, + GenerationWarningType, GitHubIssueEvent, GrammarSyntax1, ImageGenAction, @@ -437,6 +444,9 @@ RoutineDispatchPayloadType, RoutineRunPhase, RoutineTriggerType, + RubricGenerationInputQualityWarningCode, + RubricGenerationInputQualityWarningSeverity, + RubricGenerationInputQualityWarningSource, SampleType, ScheduleProvisioningStatus, ScheduleTaskType, @@ -741,6 +751,7 @@ "RoutineRun", "RoutineTrigger", "RubricBasedEvaluatorDefinition", + "RubricGenerationInputQualityWarning", "SASCredentials", "Schedule", "ScheduleRoutineTrigger", @@ -760,6 +771,7 @@ "SpecificFunctionShellParam", "StructuredInputDefinition", "StructuredOutputDefinition", + "TaskGenerationDataGenerationJobOptions", "TaxonomyCategory", "TaxonomySubCategory", "TelemetryConfig", @@ -788,6 +800,7 @@ "ToolDescription", "ToolProjectConnection", "ToolSearchToolParam", + "ToolSearchToolboxTool", "ToolUseFineTuningDataGenerationJobOptions", "ToolboxObject", "ToolboxPolicies", @@ -807,6 +820,8 @@ "VersionRefIndicator", "VersionSelectionRule", "VersionSelector", + "WebIQPreviewTool", + "WebIQPreviewToolboxTool", "WebSearchApproximateLocation", "WebSearchConfiguration", "WebSearchPreviewTool", @@ -820,6 +835,7 @@ "AgentBlueprintReferenceType", "AgentEndpointAuthorizationSchemeType", "AgentEndpointProtocol", + "AgentIdentityStatus", "AgentKind", "AgentObjectType", "AgentSessionStatus", @@ -858,6 +874,7 @@ "FoundryModelWarningCode", "FoundryModelWeightType", "FunctionShellToolParamEnvironmentType", + "GenerationWarningType", "GitHubIssueEvent", "GrammarSyntax1", "ImageGenAction", @@ -883,6 +900,9 @@ "RoutineDispatchPayloadType", "RoutineRunPhase", "RoutineTriggerType", + "RubricGenerationInputQualityWarningCode", + "RubricGenerationInputQualityWarningSeverity", + "RubricGenerationInputQualityWarningSource", "SampleType", "ScheduleProvisioningStatus", "ScheduleTaskType", diff --git a/sdk/ai/azure-ai-projects/azure/ai/projects/models/_enums.py b/sdk/ai/azure-ai-projects/azure/ai/projects/models/_enums.py index 008f889fc25e..6c5d76661276 100644 --- a/sdk/ai/azure-ai-projects/azure/ai/projects/models/_enums.py +++ b/sdk/ai/azure-ai-projects/azure/ai/projects/models/_enums.py @@ -84,6 +84,17 @@ class AgentEndpointProtocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): """WebSocket-based protocol for hosted voice and real-time streaming agents.""" +class AgentIdentityStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The status of an agent identity, applicable to both the agent instance identity and the agent + blueprint. + """ + + ACTIVE = "active" + """The agent identity is active and can be used to access resources.""" + DISABLED = "disabled" + """The agent identity is disabled and cannot be used to access resources.""" + + class AgentKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Type of AgentKind.""" @@ -392,6 +403,8 @@ class DataGenerationJobType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Single turn query and response from agent traces.""" TOOL_USE = "tool_use" """Tool calling conversation between user and agent.""" + TASK_GENERATION = "task_generation" + """Task generation for evaluation scenarios.""" class DatasetType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -609,6 +622,16 @@ class FunctionShellToolParamEnvironmentType(str, Enum, metaclass=CaseInsensitive """CONTAINER_REFERENCE.""" +class GenerationWarningType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Category of a warning surfaced on a generated evaluator version. Extensible so new warning + categories (e.g., safety, output quality) can be introduced without a breaking change. + """ + + INPUT_QUALITY = "input_quality" + """The paired EvaluatorGenerationJob emitted one or more input-quality advisories. Follow + ``generation_job_id`` to fetch the detailed warning payloads.""" + + class GitHubIssueEvent(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Known GitHub issue events that can fire a routine.""" @@ -912,6 +935,61 @@ class RoutineTriggerType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """A one-shot timer trigger.""" +class RubricGenerationInputQualityWarningCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Stable searchable machine-readable warning code for a rubric-generation input-quality warning. + Values are ``snake_case``; clients must tolerate additional service-defined identifiers. + """ + + EMPTY_PROMPT = "empty_prompt" + """A prompt source was empty or whitespace-only.""" + SHORT_PROMPT = "short_prompt" + """A prompt source was non-empty but below the recommended minimum signal threshold.""" + EMPTY_AGENT_INSTRUCTIONS = "empty_agent_instructions" + """An agent source resolved successfully but had no usable instructions.""" + SHORT_AGENT_INSTRUCTIONS = "short_agent_instructions" + """An agent source had instructions below the recommended minimum signal threshold.""" + EMPTY_DATASET_CONTENT = "empty_dataset_content" + """A dataset source resolved but contained no usable content for rubric generation.""" + SHORT_DATASET_CONTENT = "short_dataset_content" + """Dataset content was below the recommended minimum signal threshold.""" + LOW_TRACE_COUNT = "low_trace_count" + """A row-structured dataset had very few rows, so the generated rubric may not generalize.""" + INSUFFICIENT_TOTAL_INPUT = "insufficient_total_input" + """Combined resolved input across successfully resolved sources was below the recommended minimum + signal threshold.""" + + +class RubricGenerationInputQualityWarningSeverity( # pylint: disable=name-too-long + str, Enum, metaclass=CaseInsensitiveEnumMeta +): + """Advisory severity for a rubric-generation input-quality warning. Initial value set: + ``warning``. + """ + + WARNING = "warning" + """Non-fatal advisory; generation succeeded but output quality may be lower.""" + + +class RubricGenerationInputQualityWarningSource( # pylint: disable=name-too-long + str, Enum, metaclass=CaseInsensitiveEnumMeta +): + """Warning source attribution for a rubric-generation input-quality warning. Per-source values + (``prompt``, ``agent``, ``dataset``) match the source category visible to the generation + runtime. ``aggregate`` is a synthetic value used only for warnings computed across successfully + resolved sources. ``traces`` is not exposed because trace sources resolve into dataset content + upstream. + """ + + PROMPT = "prompt" + """The warning applies to an inline prompt source.""" + AGENT = "agent" + """The warning applies to an agent source.""" + DATASET = "dataset" + """The warning applies to a dataset source (including trace-derived datasets).""" + AGGREGATE = "aggregate" + """The warning is computed across all successfully resolved sources.""" + + class SampleType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of sample used in the analysis.""" @@ -1051,6 +1129,10 @@ class ToolboxToolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """WORK_IQ_PREVIEW.""" FABRIC_IQ_PREVIEW = "fabric_iq_preview" """FABRIC_IQ_PREVIEW.""" + WEB_IQ_PREVIEW = "web_iq_preview" + """WEB_IQ_PREVIEW.""" + TOOLBOX_SEARCH = "toolbox_search" + """TOOLBOX_SEARCH.""" TOOLBOX_SEARCH_PREVIEW = "toolbox_search_preview" """TOOLBOX_SEARCH_PREVIEW.""" @@ -1146,6 +1228,8 @@ class ToolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """WORK_IQ_PREVIEW.""" FABRIC_IQ_PREVIEW = "fabric_iq_preview" """FABRIC_IQ_PREVIEW.""" + WEB_IQ_PREVIEW = "web_iq_preview" + """WEB_IQ_PREVIEW.""" TOOLBOX_SEARCH_PREVIEW = "toolbox_search_preview" """TOOLBOX_SEARCH_PREVIEW.""" AZURE_AI_SEARCH = "azure_ai_search" diff --git a/sdk/ai/azure-ai-projects/azure/ai/projects/models/_models.py b/sdk/ai/azure-ai-projects/azure/ai/projects/models/_models.py index e60e1afec05a..9128e9a8fc78 100644 --- a/sdk/ai/azure-ai-projects/azure/ai/projects/models/_models.py +++ b/sdk/ai/azure-ai-projects/azure/ai/projects/models/_models.py @@ -58,7 +58,7 @@ ) if TYPE_CHECKING: - from .. import _unions, models as _models + from .. import _types, models as _models class _CreateAgentVersionFromCodeContent(_Model): @@ -161,16 +161,17 @@ class Tool(_Model): CaptureStructuredOutputsTool, CodeInterpreterTool, ComputerTool, ComputerUsePreviewTool, CustomToolParam, MicrosoftFabricPreviewTool, FabricIQPreviewTool, FileSearchTool, FunctionTool, ImageGenTool, LocalShellToolParam, MCPTool, MemorySearchPreviewTool, NamespaceToolParam, - OpenApiTool, SharepointPreviewTool, FunctionShellToolParam, ToolSearchToolParam, WebSearchTool, - WebSearchPreviewTool, WorkIQPreviewTool + OpenApiTool, SharepointPreviewTool, FunctionShellToolParam, ToolSearchToolParam, + WebIQPreviewTool, WebSearchTool, WebSearchPreviewTool, WorkIQPreviewTool :ivar type: Required. Known values are: "function", "file_search", "computer", "computer_use_preview", "web_search", "mcp", "code_interpreter", "image_generation", "local_shell", "shell", "custom", "namespace", "tool_search", "web_search_preview", "apply_patch", "a2a_preview", "bing_custom_search_preview", "browser_automation_preview", "fabric_dataagent_preview", "sharepoint_grounding_preview", "memory_search_preview", - "work_iq_preview", "fabric_iq_preview", "toolbox_search_preview", "azure_ai_search", - "azure_function", "bing_grounding", "capture_structured_outputs", and "openapi". + "work_iq_preview", "fabric_iq_preview", "web_iq_preview", "toolbox_search_preview", + "azure_ai_search", "azure_function", "bing_grounding", "capture_structured_outputs", and + "openapi". :vartype type: str or ~azure.ai.projects.models.ToolType """ @@ -181,7 +182,7 @@ class Tool(_Model): \"local_shell\", \"shell\", \"custom\", \"namespace\", \"tool_search\", \"web_search_preview\", \"apply_patch\", \"a2a_preview\", \"bing_custom_search_preview\", \"browser_automation_preview\", \"fabric_dataagent_preview\", \"sharepoint_grounding_preview\", - \"memory_search_preview\", \"work_iq_preview\", \"fabric_iq_preview\", + \"memory_search_preview\", \"work_iq_preview\", \"fabric_iq_preview\", \"web_iq_preview\", \"toolbox_search_preview\", \"azure_ai_search\", \"azure_function\", \"bing_grounding\", \"capture_structured_outputs\", and \"openapi\".""" @@ -267,12 +268,14 @@ class ToolboxTool(_Model): You probably want to use the sub-classes and not this class directly. Known sub-classes are: A2APreviewToolboxTool, AzureAISearchToolboxTool, BrowserAutomationPreviewToolboxTool, CodeInterpreterToolboxTool, FabricIQPreviewToolboxTool, FileSearchToolboxTool, MCPToolboxTool, - OpenApiToolboxTool, ReminderPreviewToolboxTool, ToolboxSearchPreviewToolboxTool, - WebSearchToolboxTool, WorkIQPreviewToolboxTool + OpenApiToolboxTool, ReminderPreviewToolboxTool, ToolSearchToolboxTool, + ToolboxSearchPreviewToolboxTool, WebIQPreviewToolboxTool, WebSearchToolboxTool, + WorkIQPreviewToolboxTool :ivar type: The type of tool. Required. Known values are: "code_interpreter", "file_search", "web_search", "mcp", "azure_ai_search", "openapi", "a2a_preview", "browser_automation_preview", - "reminder_preview", "work_iq_preview", "fabric_iq_preview", and "toolbox_search_preview". + "reminder_preview", "work_iq_preview", "fabric_iq_preview", "web_iq_preview", "toolbox_search", + and "toolbox_search_preview". :vartype type: str or ~azure.ai.projects.models.ToolboxToolType :ivar name: Optional user-defined name for this tool or configuration. :vartype name: str @@ -289,7 +292,7 @@ class ToolboxTool(_Model): """The type of tool. Required. Known values are: \"code_interpreter\", \"file_search\", \"web_search\", \"mcp\", \"azure_ai_search\", \"openapi\", \"a2a_preview\", \"browser_automation_preview\", \"reminder_preview\", \"work_iq_preview\", - \"fabric_iq_preview\", and \"toolbox_search_preview\".""" + \"fabric_iq_preview\", \"web_iq_preview\", \"toolbox_search\", and \"toolbox_search_preview\".""" name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Optional user-defined name for this tool or configuration.""" description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) @@ -1119,12 +1122,20 @@ class AgentIdentity(_Model): :ivar client_id: The client ID of the agent instance. Also referred to as the instance ID. Required. :vartype client_id: str + :ivar status: The status of the agent identity. Present for both the agent instance identity + and the agent blueprint. Known values are: "active" and "disabled". + :vartype status: str or ~azure.ai.projects.models.AgentIdentityStatus """ principal_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The principal ID of the agent instance. Required.""" client_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The client ID of the agent instance. Also referred to as the instance ID. Required.""" + status: Optional[Union[str, "_models.AgentIdentityStatus"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The status of the agent identity. Present for both the agent instance identity and the agent + blueprint. Known values are: \"active\" and \"disabled\".""" @overload def __init__( @@ -1132,6 +1143,7 @@ def __init__( *, principal_id: str, client_id: str, + status: Optional[Union[str, "_models.AgentIdentityStatus"]] = None, ) -> None: ... @overload @@ -4812,11 +4824,11 @@ class DataGenerationJobOptions(_Model): """Options for managing data generation jobs. You probably want to use the sub-classes and not this class directly. Known sub-classes are: - SimpleQnADataGenerationJobOptions, ToolUseFineTuningDataGenerationJobOptions, - TracesDataGenerationJobOptions + SimpleQnADataGenerationJobOptions, TaskGenerationDataGenerationJobOptions, + ToolUseFineTuningDataGenerationJobOptions, TracesDataGenerationJobOptions :ivar type: The data generation job type. Required. Known values are: "simple_qna", "traces", - and "tool_use". + "tool_use", and "task_generation". :vartype type: str or ~azure.ai.projects.models.DataGenerationJobType :ivar max_samples: Maximum number of samples to generate. Required. :vartype max_samples: int @@ -4829,8 +4841,8 @@ class DataGenerationJobOptions(_Model): __mapping__: dict[str, _Model] = {} type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) - """The data generation job type. Required. Known values are: \"simple_qna\", \"traces\", and - \"tool_use\".""" + """The data generation job type. Required. Known values are: \"simple_qna\", \"traces\", + \"tool_use\", and \"task_generation\".""" max_samples: int = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Maximum number of samples to generate. Required.""" train_split: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"]) @@ -6670,6 +6682,12 @@ class EvaluatorGenerationJob(_Model): :vartype finished_at: ~datetime.datetime :ivar usage: Token consumption summary. Populated when the job reaches a terminal state. :vartype usage: ~azure.ai.projects.models.EvaluatorGenerationTokenUsage + :ivar input_quality_warnings: Non-fatal input-quality advisories produced by the generation + pipeline. Read-only; service-generated; populated only on terminal jobs when advisories fired. + Omitted when generation was clean. Cleared when a subsequent ``PATCH`` to the paired + ``EvaluatorVersion.definition`` invalidates the advisories. + :vartype input_quality_warnings: + list[~azure.ai.projects.models.RubricGenerationInputQualityWarning] """ id: str = rest_field(visibility=["read"]) @@ -6692,6 +6710,13 @@ class EvaluatorGenerationJob(_Model): """The timestamp when the job finished, represented in Unix time (seconds since January 1, 1970).""" usage: Optional["_models.EvaluatorGenerationTokenUsage"] = rest_field(visibility=["read"]) """Token consumption summary. Populated when the job reaches a terminal state.""" + input_quality_warnings: Optional[list["_models.RubricGenerationInputQualityWarning"]] = rest_field( + visibility=["read"] + ) + """Non-fatal input-quality advisories produced by the generation pipeline. Read-only; + service-generated; populated only on terminal jobs when advisories fired. Omitted when + generation was clean. Cleared when a subsequent ``PATCH`` to the paired + ``EvaluatorVersion.definition`` invalidates the advisories.""" @overload def __init__( @@ -6834,6 +6859,16 @@ class EvaluatorVersion(_Model): present only on evaluator versions created via an EvaluatorGenerationJob. Each artifact resolves to a versioned Foundry Dataset. :vartype generation_artifacts: ~azure.ai.projects.models.EvaluatorGenerationArtifacts + :ivar generation_job_id: Read-only provenance link back to the EvaluatorGenerationJob that + produced this version. Present only on evaluator versions created via the generation pipeline; + absent for manually-created versions and unaffected by subsequent ``PATCH`` calls. + :vartype generation_job_id: str + :ivar warnings: Categories of warnings surfaced on this generated evaluator version. Present + only on versions created via an EvaluatorGenerationJob when the paired job produced non-empty + warnings. Absent (treat as no warnings) when the version is not from generation, when the + paired job was clean, or when a subsequent ``PATCH`` to ``definition`` cleared the paired job's + advisories. Follow ``generation_job_id`` to fetch the detailed warning payloads. + :vartype warnings: list[str or ~azure.ai.projects.models.GenerationWarningType] :ivar created_by: Creator of the evaluator. Required. :vartype created_by: str :ivar created_at: Creation date/time of the evaluator. Required. @@ -6876,6 +6911,16 @@ class EvaluatorVersion(_Model): """Provenance artifacts from the generation pipeline. Read-only; present only on evaluator versions created via an EvaluatorGenerationJob. Each artifact resolves to a versioned Foundry Dataset.""" + generation_job_id: Optional[str] = rest_field(visibility=["read"]) + """Read-only provenance link back to the EvaluatorGenerationJob that produced this version. + Present only on evaluator versions created via the generation pipeline; absent for + manually-created versions and unaffected by subsequent ``PATCH`` calls.""" + warnings: Optional[list[Union[str, "_models.GenerationWarningType"]]] = rest_field(visibility=["read"]) + """Categories of warnings surfaced on this generated evaluator version. Present only on versions + created via an EvaluatorGenerationJob when the paired job produced non-empty warnings. Absent + (treat as no warnings) when the version is not from generation, when the paired job was clean, + or when a subsequent ``PATCH`` to ``definition`` cleared the paired job's advisories. Follow + ``generation_job_id`` to fetch the detailed warning payloads.""" created_by: str = rest_field(visibility=["read"]) """Creator of the evaluator. Required.""" created_at: datetime.datetime = rest_field(visibility=["read"], format="rfc3339") @@ -7331,7 +7376,7 @@ class FileSearchTool(Tool, discriminator="file_search"): visibility=["read", "create", "update", "delete", "query"] ) """Ranking options for search.""" - filters: Optional["_unions.Filters"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + filters: Optional["_types.Filters"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Is either a ComparisonFilter type or a CompoundFilter type.""" name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Deprecated. This property is deprecated and will be removed in a future version.""" @@ -7349,7 +7394,7 @@ def __init__( vector_store_ids: list[str], max_num_results: Optional[int] = None, ranking_options: Optional["_models.RankingOptions"] = None, - filters: Optional["_unions.Filters"] = None, + filters: Optional["_types.Filters"] = None, name: Optional[str] = None, description: Optional[str] = None, tool_configs: Optional[dict[str, "_models.ToolConfig"]] = None, @@ -7400,7 +7445,7 @@ class FileSearchToolboxTool(ToolboxTool, discriminator="file_search"): visibility=["read", "create", "update", "delete", "query"] ) """Ranking options for search.""" - filters: Optional["_unions.Filters"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + filters: Optional["_types.Filters"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Is either a ComparisonFilter type or a CompoundFilter type.""" vector_store_ids: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The IDs of the vector stores to search.""" @@ -7414,7 +7459,7 @@ def __init__( tool_configs: Optional[dict[str, "_models.ToolConfig"]] = None, max_num_results: Optional[int] = None, ranking_options: Optional["_models.RankingOptions"] = None, - filters: Optional["_unions.Filters"] = None, + filters: Optional["_types.Filters"] = None, vector_store_ids: Optional[list[str]] = None, ) -> None: ... @@ -9169,13 +9214,12 @@ class MCPTool(Tool, discriminator="mcp"): :vartype type: str or ~azure.ai.projects.models.MCP :ivar server_label: A label for this MCP server, used to identify it in tool calls. Required. :vartype server_label: str - :ivar server_url: The URL for the MCP server. One of ``server_url``, ``connector_id``, or - ``tunnel_id`` must be provided. + :ivar server_url: The URL for the MCP server. One of ``server_url`` or ``connector_id`` must be + provided. :vartype server_url: str :ivar connector_id: Identifier for service connectors, like those available in ChatGPT. One of - ``server_url``, ``connector_id``, or ``tunnel_id`` must be provided. Learn more about service - connectors `here `_. Currently supported - ``connector_id`` values are: + ``server_url`` or ``connector_id`` must be provided. Learn more about service connectors `here + `_. Currently supported ``connector_id`` values are: * Dropbox: `connector_dropbox` * Gmail: `connector_gmail` @@ -9190,9 +9234,6 @@ class MCPTool(Tool, discriminator="mcp"): Literal["connector_outlookcalendar"], Literal["connector_outlookemail"], Literal["connector_sharepoint"] :vartype connector_id: str or str or str or str or str or str or str or str - :ivar tunnel_id: The Secure MCP Tunnel ID to use instead of a direct server URL. One of - ``server_url``, ``connector_id``, or ``tunnel_id`` must be provided. - :vartype tunnel_id: str :ivar authorization: An OAuth access token that can be used with a remote MCP server, either with a custom MCP server URL or a service connector. Your application must handle the OAuth authorization flow and provide the token here. @@ -9222,8 +9263,7 @@ class MCPTool(Tool, discriminator="mcp"): server_label: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """A label for this MCP server, used to identify it in tool calls. Required.""" server_url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The URL for the MCP server. One of ``server_url``, ``connector_id``, or ``tunnel_id`` must be - provided.""" + """The URL for the MCP server. One of ``server_url`` or ``connector_id`` must be provided.""" connector_id: Optional[ Literal[ "connector_dropbox", @@ -9236,8 +9276,8 @@ class MCPTool(Tool, discriminator="mcp"): "connector_sharepoint", ] ] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Identifier for service connectors, like those available in ChatGPT. One of ``server_url``, - ``connector_id``, or ``tunnel_id`` must be provided. Learn more about service connectors `here + """Identifier for service connectors, like those available in ChatGPT. One of ``server_url`` or + ``connector_id`` must be provided. Learn more about service connectors `here `_. Currently supported ``connector_id`` values are: * Dropbox: `connector_dropbox` @@ -9252,9 +9292,6 @@ class MCPTool(Tool, discriminator="mcp"): Literal[\"connector_googlecalendar\"], Literal[\"connector_googledrive\"], Literal[\"connector_microsoftteams\"], Literal[\"connector_outlookcalendar\"], Literal[\"connector_outlookemail\"], Literal[\"connector_sharepoint\"]""" - tunnel_id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The Secure MCP Tunnel ID to use instead of a direct server URL. One of ``server_url``, - ``connector_id``, or ``tunnel_id`` must be provided.""" authorization: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """An OAuth access token that can be used with a remote MCP server, either with a custom MCP server URL or a service connector. Your application must handle the OAuth authorization flow @@ -9298,7 +9335,6 @@ def __init__( "connector_sharepoint", ] ] = None, - tunnel_id: Optional[str] = None, authorization: Optional[str] = None, server_description: Optional[str] = None, headers: Optional[dict[str, str]] = None, @@ -9336,13 +9372,12 @@ class MCPToolboxTool(ToolboxTool, discriminator="mcp"): :vartype type: str or ~azure.ai.projects.models.MCP :ivar server_label: A label for this MCP server, used to identify it in tool calls. Required. :vartype server_label: str - :ivar server_url: The URL for the MCP server. One of ``server_url``, ``connector_id``, or - ``tunnel_id`` must be provided. + :ivar server_url: The URL for the MCP server. One of ``server_url`` or ``connector_id`` must be + provided. :vartype server_url: str :ivar connector_id: Identifier for service connectors, like those available in ChatGPT. One of - ``server_url``, ``connector_id``, or ``tunnel_id`` must be provided. Learn more about service - connectors `here `_. Currently supported - ``connector_id`` values are: + ``server_url`` or ``connector_id`` must be provided. Learn more about service connectors `here + `_. Currently supported ``connector_id`` values are: * Dropbox: `connector_dropbox` * Gmail: `connector_gmail` @@ -9357,9 +9392,6 @@ class MCPToolboxTool(ToolboxTool, discriminator="mcp"): Literal["connector_outlookcalendar"], Literal["connector_outlookemail"], Literal["connector_sharepoint"] :vartype connector_id: str or str or str or str or str or str or str or str - :ivar tunnel_id: The Secure MCP Tunnel ID to use instead of a direct server URL. One of - ``server_url``, ``connector_id``, or ``tunnel_id`` must be provided. - :vartype tunnel_id: str :ivar authorization: An OAuth access token that can be used with a remote MCP server, either with a custom MCP server URL or a service connector. Your application must handle the OAuth authorization flow and provide the token here. @@ -9386,8 +9418,7 @@ class MCPToolboxTool(ToolboxTool, discriminator="mcp"): server_label: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """A label for this MCP server, used to identify it in tool calls. Required.""" server_url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The URL for the MCP server. One of ``server_url``, ``connector_id``, or ``tunnel_id`` must be - provided.""" + """The URL for the MCP server. One of ``server_url`` or ``connector_id`` must be provided.""" connector_id: Optional[ Literal[ "connector_dropbox", @@ -9400,8 +9431,8 @@ class MCPToolboxTool(ToolboxTool, discriminator="mcp"): "connector_sharepoint", ] ] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Identifier for service connectors, like those available in ChatGPT. One of ``server_url``, - ``connector_id``, or ``tunnel_id`` must be provided. Learn more about service connectors `here + """Identifier for service connectors, like those available in ChatGPT. One of ``server_url`` or + ``connector_id`` must be provided. Learn more about service connectors `here `_. Currently supported ``connector_id`` values are: * Dropbox: `connector_dropbox` @@ -9416,9 +9447,6 @@ class MCPToolboxTool(ToolboxTool, discriminator="mcp"): Literal[\"connector_googlecalendar\"], Literal[\"connector_googledrive\"], Literal[\"connector_microsoftteams\"], Literal[\"connector_outlookcalendar\"], Literal[\"connector_outlookemail\"], Literal[\"connector_sharepoint\"]""" - tunnel_id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The Secure MCP Tunnel ID to use instead of a direct server URL. One of ``server_url``, - ``connector_id``, or ``tunnel_id`` must be provided.""" authorization: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """An OAuth access token that can be used with a remote MCP server, either with a custom MCP server URL or a service connector. Your application must handle the OAuth authorization flow @@ -9461,7 +9489,6 @@ def __init__( "connector_sharepoint", ] ] = None, - tunnel_id: Optional[str] = None, authorization: Optional[str] = None, server_description: Optional[str] = None, headers: Optional[dict[str, str]] = None, @@ -11644,6 +11671,14 @@ class OptimizationOptions(_Model): 'conversation' for per-conversation multi-turn simulation scoring. Known values are: "turn" and "conversation". :vartype evaluation_level: str or ~azure.ai.projects.models.EvaluationLevel + :ivar max_stalls: Maximum number of consecutive reflective minibatch rejections before stopping + early. A 'stall' occurs when the optimizer proposes a prompt change, evaluates it on a small + subset, and the score does not improve — so no full validation-set evaluation is triggered. The + counter resets whenever a minibatch passes and its full-validation score beats the current + best. Only a sustained plateau of ``max_stalls`` consecutive minibatch failures triggers the + stop. The service defaults to 5 if a value is not specified by the caller. Must be >= 1 when + set. + :vartype max_stalls: int """ max_candidates: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) @@ -11664,6 +11699,13 @@ class OptimizationOptions(_Model): """Evaluation granularity. Null/omitted means per-item single-turn. Set to 'conversation' for per-conversation multi-turn simulation scoring. Known values are: \"turn\" and \"conversation\".""" + max_stalls: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Maximum number of consecutive reflective minibatch rejections before stopping early. A 'stall' + occurs when the optimizer proposes a prompt change, evaluates it on a small subset, and the + score does not improve — so no full validation-set evaluation is triggered. The counter resets + whenever a minibatch passes and its full-validation score beats the current best. Only a + sustained plateau of ``max_stalls`` consecutive minibatch failures triggers the stop. The + service defaults to 5 if a value is not specified by the caller. Must be >= 1 when set.""" @overload def __init__( @@ -11674,6 +11716,7 @@ def __init__( eval_model: Optional[str] = None, optimization_model: Optional[str] = None, evaluation_level: Optional[Union[str, "_models.EvaluationLevel"]] = None, + max_stalls: Optional[int] = None, ) -> None: ... @overload @@ -12454,9 +12497,6 @@ class Reasoning(_Model): :ivar summary: Is one of the following types: Literal["auto"], Literal["concise"], Literal["detailed"] :vartype summary: str or str or str - :ivar context: Is one of the following types: Literal["auto"], Literal["current_turn"], - Literal["all_turns"] - :vartype context: str or str or str :ivar generate_summary: Is one of the following types: Literal["auto"], Literal["concise"], Literal["detailed"] :vartype generate_summary: str or str or str @@ -12471,11 +12511,6 @@ class Reasoning(_Model): visibility=["read", "create", "update", "delete", "query"] ) """Is one of the following types: Literal[\"auto\"], Literal[\"concise\"], Literal[\"detailed\"]""" - context: Optional[Literal["auto", "current_turn", "all_turns"]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Is one of the following types: Literal[\"auto\"], Literal[\"current_turn\"], - Literal[\"all_turns\"]""" generate_summary: Optional[Literal["auto", "concise", "detailed"]] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) @@ -12487,7 +12522,6 @@ def __init__( *, effort: Optional[Literal["none", "minimal", "low", "medium", "high", "xhigh"]] = None, summary: Optional[Literal["auto", "concise", "detailed"]] = None, - context: Optional[Literal["auto", "current_turn", "all_turns"]] = None, generate_summary: Optional[Literal["auto", "concise", "detailed"]] = None, ) -> None: ... @@ -12875,9 +12909,7 @@ class RoutineRun(_Model): id: str = rest_field(visibility=["read"]) """The unique run identifier for the routine attempt. Required.""" - status: Optional["_unions.RoutineRunStatus"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + status: Optional["_types.RoutineRunStatus"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The run status. Is one of the following types: str""" phase: Optional[Union[str, "_models.RoutineRunPhase"]] = rest_field( visibility=["read", "create", "update", "delete", "query"] @@ -12948,7 +12980,7 @@ class RoutineRun(_Model): def __init__( self, *, - status: Optional["_unions.RoutineRunStatus"] = None, + status: Optional["_types.RoutineRunStatus"] = None, phase: Optional[Union[str, "_models.RoutineRunPhase"]] = None, trigger_type: Optional[Union[str, "_models.RoutineTriggerType"]] = None, trigger_name: Optional[str] = None, @@ -13050,6 +13082,76 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: self.type = EvaluatorDefinitionType.RUBRIC # type: ignore +class RubricGenerationInputQualityWarning(_Model): + """A non-fatal advisory produced during rubric evaluator generation when resolved inputs are + technically valid but likely too weak to produce a high-quality rubric. Read-only; + service-generated. Persisted with the terminal EvaluatorGenerationJob. + + :ivar code: Stable searchable machine-readable warning code. Required. Known values are: + "empty_prompt", "short_prompt", "empty_agent_instructions", "short_agent_instructions", + "empty_dataset_content", "short_dataset_content", "low_trace_count", and + "insufficient_total_input". + :vartype code: str or ~azure.ai.projects.models.RubricGenerationInputQualityWarningCode + :ivar severity: Advisory severity. Initial values: ``warning``. Required. "warning" + :vartype severity: str or ~azure.ai.projects.models.RubricGenerationInputQualityWarningSeverity + :ivar message: Human-readable message suitable for direct SDK/CLI/UI display. Must not include + raw prompt, instruction, dataset, or trace text. Required. + :vartype message: str + :ivar source: Which source category the warning applies to. ``aggregate`` is used only for + cross-source warnings. Required. Known values are: "prompt", "agent", "dataset", and + "aggregate". + :vartype source: str or ~azure.ai.projects.models.RubricGenerationInputQualityWarningSource + :ivar source_index: Zero-based index into ``EvaluatorGenerationJob.inputs.sources`` when the + warning applies to a specific source. Omitted for aggregate warnings and for warnings not tied + to one source. + :vartype source_index: int + """ + + code: Union[str, "_models.RubricGenerationInputQualityWarningCode"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Stable searchable machine-readable warning code. Required. Known values are: \"empty_prompt\", + \"short_prompt\", \"empty_agent_instructions\", \"short_agent_instructions\", + \"empty_dataset_content\", \"short_dataset_content\", \"low_trace_count\", and + \"insufficient_total_input\".""" + severity: Union[str, "_models.RubricGenerationInputQualityWarningSeverity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Advisory severity. Initial values: ``warning``. Required. \"warning\"""" + message: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Human-readable message suitable for direct SDK/CLI/UI display. Must not include raw prompt, + instruction, dataset, or trace text. Required.""" + source: Union[str, "_models.RubricGenerationInputQualityWarningSource"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Which source category the warning applies to. ``aggregate`` is used only for cross-source + warnings. Required. Known values are: \"prompt\", \"agent\", \"dataset\", and \"aggregate\".""" + source_index: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Zero-based index into ``EvaluatorGenerationJob.inputs.sources`` when the warning applies to a + specific source. Omitted for aggregate warnings and for warnings not tied to one source.""" + + @overload + def __init__( + self, + *, + code: Union[str, "_models.RubricGenerationInputQualityWarningCode"], + severity: Union[str, "_models.RubricGenerationInputQualityWarningSeverity"], + message: str, + source: Union[str, "_models.RubricGenerationInputQualityWarningSource"], + source_index: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + class SASCredentials(BaseCredentials, discriminator="SAS"): """Shared Access Signature (SAS) credential definition. @@ -13897,6 +13999,48 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) +class TaskGenerationDataGenerationJobOptions(DataGenerationJobOptions, discriminator="task_generation"): + """The options for a task generation data generation job. Use with multiturn evaluation scenarios + and with prompt, file, or agent sources. Generated dataset rows include fields such as ``id``, + ``category``, ``test_case_description``, and ``desired_num_turns``. + + :ivar max_samples: Maximum number of samples to generate. Required. + :vartype max_samples: int + :ivar train_split: The proportion of the generated data to be used for training when the data + is used for fine-tuning. The rest will be used for validation. Value should be between 0 and 1. + :vartype train_split: float + :ivar model_options: The LLM model options. + :vartype model_options: ~azure.ai.projects.models.DataGenerationModelOptions + :ivar type: The data generation job type, which is TaskGeneration for this model. Required. + Task generation for evaluation scenarios. + :vartype type: str or ~azure.ai.projects.models.TASK_GENERATION + """ + + type: Literal[DataGenerationJobType.TASK_GENERATION] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The data generation job type, which is TaskGeneration for this model. Required. Task generation + for evaluation scenarios.""" + + @overload + def __init__( + self, + *, + max_samples: int, + train_split: Optional[float] = None, + model_options: Optional["_models.DataGenerationModelOptions"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type = DataGenerationJobType.TASK_GENERATION # type: ignore + + class TaxonomyCategory(_Model): """Taxonomy category definition. @@ -14974,6 +15118,45 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) +class ToolSearchToolboxTool(ToolboxTool, discriminator="toolbox_search"): + """A toolbox search tool stored in a toolbox. + + :ivar name: Optional user-defined name for this tool or configuration. + :vartype name: str + :ivar description: Optional user-defined description for this tool or configuration. + :vartype description: str + :ivar tool_configs: Per-tool configuration map. Keys are tool names or ``*`` (catch-all + default). Resolution order: exact tool name match takes priority over ``*``. Unknown tool names + are silently ignored at runtime. + :vartype tool_configs: dict[str, ~azure.ai.projects.models.ToolConfig] + :ivar type: The type of the tool. Always ``toolbox_search``. Required. TOOLBOX_SEARCH. + :vartype type: str or ~azure.ai.projects.models.TOOLBOX_SEARCH + """ + + type: Literal[ToolboxToolType.TOOLBOX_SEARCH] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The type of the tool. Always ``toolbox_search``. Required. TOOLBOX_SEARCH.""" + + @overload + def __init__( + self, + *, + name: Optional[str] = None, + description: Optional[str] = None, + tool_configs: Optional[dict[str, "_models.ToolConfig"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type = ToolboxToolType.TOOLBOX_SEARCH # type: ignore + + class ToolSearchToolParam(Tool, discriminator="tool_search"): """Tool search tool. @@ -15450,6 +15633,125 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) +class WebIQPreviewTool(Tool, discriminator="web_iq_preview"): + """A WebIQ server-side tool. + + :ivar type: The object type, which is always 'web_iq_preview'. Required. WEB_IQ_PREVIEW. + :vartype type: str or ~azure.ai.projects.models.WEB_IQ_PREVIEW + :ivar project_connection_id: The ID of the WebIQ project connection. Required. + :vartype project_connection_id: str + :ivar server_label: The label of the WebIQ MCP server to connect to. + :vartype server_label: str + :ivar server_url: The URL of the WebIQ MCP server. If not provided, the URL from the project + connection will be used. + :vartype server_url: str + :ivar require_approval: Whether the agent requires approval before executing actions. Default + is always. Is either a MCPToolRequireApproval type or a str type. + :vartype require_approval: ~azure.ai.projects.models.MCPToolRequireApproval or str + """ + + type: Literal[ToolType.WEB_IQ_PREVIEW] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The object type, which is always 'web_iq_preview'. Required. WEB_IQ_PREVIEW.""" + project_connection_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The ID of the WebIQ project connection. Required.""" + server_label: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The label of the WebIQ MCP server to connect to.""" + server_url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The URL of the WebIQ MCP server. If not provided, the URL from the project connection will be + used.""" + require_approval: Optional[Union["_models.MCPToolRequireApproval", str]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Whether the agent requires approval before executing actions. Default is always. Is either a + MCPToolRequireApproval type or a str type.""" + + @overload + def __init__( + self, + *, + project_connection_id: str, + server_label: Optional[str] = None, + server_url: Optional[str] = None, + require_approval: Optional[Union["_models.MCPToolRequireApproval", str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type = ToolType.WEB_IQ_PREVIEW # type: ignore + + +class WebIQPreviewToolboxTool(ToolboxTool, discriminator="web_iq_preview"): + """A WebIQ tool stored in a toolbox. + + :ivar name: Optional user-defined name for this tool or configuration. + :vartype name: str + :ivar description: Optional user-defined description for this tool or configuration. + :vartype description: str + :ivar tool_configs: Per-tool configuration map. Keys are tool names or ``*`` (catch-all + default). Resolution order: exact tool name match takes priority over ``*``. Unknown tool names + are silently ignored at runtime. + :vartype tool_configs: dict[str, ~azure.ai.projects.models.ToolConfig] + :ivar type: Required. WEB_IQ_PREVIEW. + :vartype type: str or ~azure.ai.projects.models.WEB_IQ_PREVIEW + :ivar project_connection_id: The ID of the WebIQ project connection. Required. + :vartype project_connection_id: str + :ivar server_label: The label of the WebIQ MCP server to connect to. + :vartype server_label: str + :ivar server_url: The URL of the WebIQ MCP server. If not provided, the URL from the project + connection will be used. + :vartype server_url: str + :ivar require_approval: Whether the agent requires approval before executing actions. Default + is always. Is either a MCPToolRequireApproval type or a str type. + :vartype require_approval: ~azure.ai.projects.models.MCPToolRequireApproval or str + """ + + type: Literal[ToolboxToolType.WEB_IQ_PREVIEW] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Required. WEB_IQ_PREVIEW.""" + project_connection_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The ID of the WebIQ project connection. Required.""" + server_label: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The label of the WebIQ MCP server to connect to.""" + server_url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The URL of the WebIQ MCP server. If not provided, the URL from the project connection will be + used.""" + require_approval: Optional[Union["_models.MCPToolRequireApproval", str]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Whether the agent requires approval before executing actions. Default is always. Is either a + MCPToolRequireApproval type or a str type.""" + + @overload + def __init__( + self, + *, + project_connection_id: str, + name: Optional[str] = None, + description: Optional[str] = None, + tool_configs: Optional[dict[str, "_models.ToolConfig"]] = None, + server_label: Optional[str] = None, + server_url: Optional[str] = None, + require_approval: Optional[Union["_models.MCPToolRequireApproval", str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type = ToolboxToolType.WEB_IQ_PREVIEW # type: ignore + + class WebSearchApproximateLocation(_Model): """Web search approximate location. diff --git a/sdk/ai/azure-ai-projects/azure/ai/projects/operations/_operations.py b/sdk/ai/azure-ai-projects/azure/ai/projects/operations/_operations.py index 00622740aa37..7013e5925454 100644 --- a/sdk/ai/azure-ai-projects/azure/ai/projects/operations/_operations.py +++ b/sdk/ai/azure-ai-projects/azure/ai/projects/operations/_operations.py @@ -33,7 +33,7 @@ from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict -from .. import models as _models, types as _types +from .. import models as _models from .._configuration import AIProjectClientConfiguration from .._utils.model_base import Model as _Model, SdkJSONEncoder, _deserialize, _failsafe_deserialize from .._utils.serialization import Deserializer, Serializer @@ -3944,12 +3944,7 @@ def create_version( @overload def create_version( - self, - agent_name: str, - body: _types.CreateAgentVersionRequest, - *, - content_type: str = "application/json", - **kwargs: Any + self, agent_name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.AgentVersionDetails: """Create an agent version. @@ -3963,7 +3958,7 @@ def create_version( * Must not exceed 63 characters. Required. :type agent_name: str :param body: Required. - :type body: ~azure.ai.projects.types.CreateAgentVersionRequest + :type body: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -4001,7 +3996,7 @@ def create_version( def create_version( self, agent_name: str, - body: Union[JSON, _types.CreateAgentVersionRequest, IO[bytes]] = _Unset, + body: Union[JSON, IO[bytes]] = _Unset, *, definition: _models.AgentDefinition = _Unset, metadata: Optional[dict[str, str]] = None, @@ -4021,9 +4016,8 @@ def create_version( * Can contain hyphens in the middle * Must not exceed 63 characters. Required. :type agent_name: str - :param body: Is one of the following types: JSON, CreateAgentVersionRequest, IO[bytes] - Required. - :type body: JSON or ~azure.ai.projects.types.CreateAgentVersionRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword definition: The agent definition. This can be a workflow, hosted agent, or a simple agent definition. Required. :paramtype definition: ~azure.ai.projects.models.AgentDefinition @@ -4170,12 +4164,7 @@ def create_version_from_manifest( @overload def create_version_from_manifest( - self, - agent_name: str, - body: _types.CreateAgentVersionFromManifestRequest, - *, - content_type: str = "application/json", - **kwargs: Any + self, agent_name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.AgentVersionDetails: """Create an agent version from manifest. @@ -4189,7 +4178,7 @@ def create_version_from_manifest( * Must not exceed 63 characters. Required. :type agent_name: str :param body: Required. - :type body: ~azure.ai.projects.types.CreateAgentVersionFromManifestRequest + :type body: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -4227,7 +4216,7 @@ def create_version_from_manifest( def create_version_from_manifest( self, agent_name: str, - body: Union[JSON, _types.CreateAgentVersionFromManifestRequest, IO[bytes]] = _Unset, + body: Union[JSON, IO[bytes]] = _Unset, *, manifest_id: str = _Unset, parameter_values: dict[str, Any] = _Unset, @@ -4246,9 +4235,8 @@ def create_version_from_manifest( * Can contain hyphens in the middle * Must not exceed 63 characters. Required. :type agent_name: str - :param body: Is one of the following types: JSON, CreateAgentVersionFromManifestRequest, - IO[bytes] Required. - :type body: JSON or ~azure.ai.projects.types.CreateAgentVersionFromManifestRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword manifest_id: The manifest ID to import the agent version from. Required. :paramtype manifest_id: str :keyword parameter_values: The inputs to the manifest that will result in a fully materialized @@ -4627,12 +4615,7 @@ def update_details( @overload def update_details( - self, - agent_name: str, - body: _types.PatchAgentObjectRequest, - *, - content_type: str = "application/merge-patch+json", - **kwargs: Any + self, agent_name: str, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> _models.AgentDetails: """Update an agent endpoint. @@ -4641,7 +4624,7 @@ def update_details( :param agent_name: The name of the agent to retrieve. Required. :type agent_name: str :param body: Required. - :type body: ~azure.ai.projects.types.PatchAgentObjectRequest + :type body: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/merge-patch+json". :paramtype content_type: str @@ -4674,7 +4657,7 @@ def update_details( def update_details( self, agent_name: str, - body: Union[JSON, _types.PatchAgentObjectRequest, IO[bytes]] = _Unset, + body: Union[JSON, IO[bytes]] = _Unset, *, agent_endpoint: Optional[_models.AgentEndpointConfig] = None, agent_card: Optional[_models.AgentCard] = None, @@ -4686,8 +4669,8 @@ def update_details( :param agent_name: The name of the agent to retrieve. Required. :type agent_name: str - :param body: Is one of the following types: JSON, PatchAgentObjectRequest, IO[bytes] Required. - :type body: JSON or ~azure.ai.projects.types.PatchAgentObjectRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword agent_endpoint: The endpoint configuration for the agent. Default value is None. :paramtype agent_endpoint: ~azure.ai.projects.models.AgentEndpointConfig :keyword agent_card: Optional agent card for the agent. Default value is None. @@ -4775,19 +4758,14 @@ def _create_version_from_code( ) -> _models.AgentVersionDetails: ... @overload def _create_version_from_code( - self, - agent_name: str, - content: _types._CreateAgentVersionFromCodeContent, - *, - code_zip_sha256: str, - **kwargs: Any + self, agent_name: str, content: JSON, *, code_zip_sha256: str, **kwargs: Any ) -> _models.AgentVersionDetails: ... @distributed_trace def _create_version_from_code( self, agent_name: str, - content: Union[_models._models._CreateAgentVersionFromCodeContent, _types._CreateAgentVersionFromCodeContent], + content: Union[_models._models._CreateAgentVersionFromCodeContent, JSON], *, code_zip_sha256: str, **kwargs: Any @@ -4806,9 +4784,9 @@ def _create_version_from_code( * Can contain hyphens in the middle * Must not exceed 63 characters. Required. :type agent_name: str - :param content: Is one of the following types: _CreateAgentVersionFromCodeContent Required. - :type content: ~azure.ai.projects.models._models._CreateAgentVersionFromCodeContent or - ~azure.ai.projects.types._CreateAgentVersionFromCodeContent + :param content: The content multipart request content. Is either a + _CreateAgentVersionFromCodeContent type or a JSON type. Required. + :type content: ~azure.ai.projects.models._models._CreateAgentVersionFromCodeContent or JSON :keyword code_zip_sha256: SHA-256 hex digest of the uploaded code zip. Used for change detection (dedup) and integrity verification. Required. :paramtype code_zip_sha256: str @@ -5103,12 +5081,7 @@ def create_session( @overload def create_session( - self, - agent_name: str, - body: _types.CreateSessionRequest, - *, - content_type: str = "application/json", - **kwargs: Any + self, agent_name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.AgentSessionResource: """Create a session. @@ -5119,7 +5092,7 @@ def create_session( :param agent_name: The name of the agent to create a session for. Required. :type agent_name: str :param body: Required. - :type body: ~azure.ai.projects.types.CreateSessionRequest + :type body: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -5154,7 +5127,7 @@ def create_session( def create_session( self, agent_name: str, - body: Union[JSON, _types.CreateSessionRequest, IO[bytes]] = _Unset, + body: Union[JSON, IO[bytes]] = _Unset, *, version_indicator: _models.VersionIndicator = _Unset, agent_session_id: Optional[str] = None, @@ -5168,8 +5141,8 @@ def create_session( :param agent_name: The name of the agent to create a session for. Required. :type agent_name: str - :param body: Is one of the following types: JSON, CreateSessionRequest, IO[bytes] Required. - :type body: JSON or ~azure.ai.projects.types.CreateSessionRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword version_indicator: Determines which agent version backs the session. Required. :paramtype version_indicator: ~azure.ai.projects.models.VersionIndicator :keyword agent_session_id: Optional caller-provided session ID. If specified, it must be unique @@ -6122,7 +6095,7 @@ def create_or_update( @overload def create_or_update( - self, id: str, evaluation_rule: _types.EvaluationRule, *, content_type: str = "application/json", **kwargs: Any + self, id: str, evaluation_rule: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.EvaluationRule: """Create or update an evaluation rule. @@ -6131,7 +6104,7 @@ def create_or_update( :param id: Unique identifier for the evaluation rule. Required. :type id: str :param evaluation_rule: Evaluation rule resource. Required. - :type evaluation_rule: ~azure.ai.projects.types.EvaluationRule + :type evaluation_rule: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -6162,7 +6135,7 @@ def create_or_update( @distributed_trace def create_or_update( - self, id: str, evaluation_rule: Union[_models.EvaluationRule, _types.EvaluationRule, IO[bytes]], **kwargs: Any + self, id: str, evaluation_rule: Union[_models.EvaluationRule, JSON, IO[bytes]], **kwargs: Any ) -> _models.EvaluationRule: """Create or update an evaluation rule. @@ -6170,10 +6143,9 @@ def create_or_update( :param id: Unique identifier for the evaluation rule. Required. :type id: str - :param evaluation_rule: Evaluation rule resource. Is either a EvaluationRule type or a - IO[bytes] type. Required. - :type evaluation_rule: ~azure.ai.projects.models.EvaluationRule or - ~azure.ai.projects.types.EvaluationRule or IO[bytes] + :param evaluation_rule: Evaluation rule resource. Is one of the following types: + EvaluationRule, JSON, IO[bytes] Required. + :type evaluation_rule: ~azure.ai.projects.models.EvaluationRule or JSON or IO[bytes] :return: EvaluationRule. The EvaluationRule is compatible with MutableMapping :rtype: ~azure.ai.projects.models.EvaluationRule :raises ~azure.core.exceptions.HttpResponseError: @@ -6963,7 +6935,7 @@ def create_or_update( self, name: str, version: str, - dataset_version: _types.DatasetVersion, + dataset_version: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any @@ -6977,7 +6949,7 @@ def create_or_update( :param version: The specific version id of the DatasetVersion to create or update. Required. :type version: str :param dataset_version: The DatasetVersion to create or update. Required. - :type dataset_version: ~azure.ai.projects.types.DatasetVersion + :type dataset_version: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/merge-patch+json". :paramtype content_type: str @@ -7016,11 +6988,7 @@ def create_or_update( @distributed_trace def create_or_update( - self, - name: str, - version: str, - dataset_version: Union[_models.DatasetVersion, _types.DatasetVersion, IO[bytes]], - **kwargs: Any + self, name: str, version: str, dataset_version: Union[_models.DatasetVersion, JSON, IO[bytes]], **kwargs: Any ) -> _models.DatasetVersion: """Create or update a version. @@ -7030,10 +6998,9 @@ def create_or_update( :type name: str :param version: The specific version id of the DatasetVersion to create or update. Required. :type version: str - :param dataset_version: The DatasetVersion to create or update. Is either a DatasetVersion type - or a IO[bytes] type. Required. - :type dataset_version: ~azure.ai.projects.models.DatasetVersion or - ~azure.ai.projects.types.DatasetVersion or IO[bytes] + :param dataset_version: The DatasetVersion to create or update. Is one of the following types: + DatasetVersion, JSON, IO[bytes] Required. + :type dataset_version: ~azure.ai.projects.models.DatasetVersion or JSON or IO[bytes] :return: DatasetVersion. The DatasetVersion is compatible with MutableMapping :rtype: ~azure.ai.projects.models.DatasetVersion :raises ~azure.core.exceptions.HttpResponseError: @@ -7133,7 +7100,7 @@ def pending_upload( self, name: str, version: str, - pending_upload_request: _types.PendingUploadRequest, + pending_upload_request: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -7147,7 +7114,7 @@ def pending_upload( :param version: The specific version id of the DatasetVersion to operate on. Required. :type version: str :param pending_upload_request: The pending upload request parameters. Required. - :type pending_upload_request: ~azure.ai.projects.types.PendingUploadRequest + :type pending_upload_request: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -7189,7 +7156,7 @@ def pending_upload( self, name: str, version: str, - pending_upload_request: Union[_models.PendingUploadRequest, _types.PendingUploadRequest, IO[bytes]], + pending_upload_request: Union[_models.PendingUploadRequest, JSON, IO[bytes]], **kwargs: Any ) -> _models.PendingUploadResponse: """Start a pending upload. @@ -7200,10 +7167,10 @@ def pending_upload( :type name: str :param version: The specific version id of the DatasetVersion to operate on. Required. :type version: str - :param pending_upload_request: The pending upload request parameters. Is either a - PendingUploadRequest type or a IO[bytes] type. Required. - :type pending_upload_request: ~azure.ai.projects.models.PendingUploadRequest or - ~azure.ai.projects.types.PendingUploadRequest or IO[bytes] + :param pending_upload_request: The pending upload request parameters. Is one of the following + types: PendingUploadRequest, JSON, IO[bytes] Required. + :type pending_upload_request: ~azure.ai.projects.models.PendingUploadRequest or JSON or + IO[bytes] :return: PendingUploadResponse. The PendingUploadResponse is compatible with MutableMapping :rtype: ~azure.ai.projects.models.PendingUploadResponse :raises ~azure.core.exceptions.HttpResponseError: @@ -7274,7 +7241,7 @@ def pending_upload( def get_credentials(self, name: str, version: str, **kwargs: Any) -> _models.DatasetCredential: """Get dataset credentials. - Gets the SAS credential to access the storage account associated with a Dataset version. + Retrieves the SAS credential to access the storage account associated with a dataset version. :param name: The name of the resource. Required. :type name: str @@ -7358,7 +7325,7 @@ def __init__(self, *args, **kwargs) -> None: def get(self, name: str, **kwargs: Any) -> _models.Deployment: """Get a deployment. - Gets a deployed model. + Retrieves a deployed model. :param name: Name of the deployment. Required. :type name: str @@ -7883,13 +7850,7 @@ def create_or_update( @overload def create_or_update( - self, - name: str, - version: str, - index: _types.Index, - *, - content_type: str = "application/merge-patch+json", - **kwargs: Any + self, name: str, version: str, index: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> _models.Index: """Create or update a version. @@ -7900,7 +7861,7 @@ def create_or_update( :param version: The specific version id of the Index to create or update. Required. :type version: str :param index: The Index to create or update. Required. - :type index: ~azure.ai.projects.types.Index + :type index: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/merge-patch+json". :paramtype content_type: str @@ -7939,7 +7900,7 @@ def create_or_update( @distributed_trace def create_or_update( - self, name: str, version: str, index: Union[_models.Index, _types.Index, IO[bytes]], **kwargs: Any + self, name: str, version: str, index: Union[_models.Index, JSON, IO[bytes]], **kwargs: Any ) -> _models.Index: """Create or update a version. @@ -7949,9 +7910,9 @@ def create_or_update( :type name: str :param version: The specific version id of the Index to create or update. Required. :type version: str - :param index: The Index to create or update. Is either a Index type or a IO[bytes] type. - Required. - :type index: ~azure.ai.projects.models.Index or ~azure.ai.projects.types.Index or IO[bytes] + :param index: The Index to create or update. Is one of the following types: Index, JSON, + IO[bytes] Required. + :type index: ~azure.ai.projects.models.Index or JSON or IO[bytes] :return: Index. The Index is compatible with MutableMapping :rtype: ~azure.ai.projects.models.Index :raises ~azure.core.exceptions.HttpResponseError: @@ -8079,12 +8040,7 @@ def create_version( @overload def create_version( - self, - name: str, - body: _types.CreateToolboxVersionRequest, - *, - content_type: str = "application/json", - **kwargs: Any + self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.ToolboxVersionObject: """Create a new version of a toolbox. @@ -8094,7 +8050,7 @@ def create_version( Required. :type name: str :param body: Required. - :type body: ~azure.ai.projects.types.CreateToolboxVersionRequest + :type body: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -8128,7 +8084,7 @@ def create_version( def create_version( self, name: str, - body: Union[JSON, _types.CreateToolboxVersionRequest, IO[bytes]] = _Unset, + body: Union[JSON, IO[bytes]] = _Unset, *, tools: List[_models.ToolboxTool] = _Unset, description: Optional[str] = None, @@ -8144,9 +8100,8 @@ def create_version( :param name: The name of the toolbox. If the toolbox does not exist, it will be created. Required. :type name: str - :param body: Is one of the following types: JSON, CreateToolboxVersionRequest, IO[bytes] - Required. - :type body: JSON or ~azure.ai.projects.types.CreateToolboxVersionRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword tools: The list of tools to include in this version. Required. :paramtype tools: list[~azure.ai.projects.models.ToolboxTool] :keyword description: A human-readable description of the toolbox. Default value is None. @@ -8588,7 +8543,7 @@ def update( @overload def update( - self, name: str, body: _types.UpdateToolboxRequest1, *, content_type: str = "application/json", **kwargs: Any + self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.ToolboxObject: """Update a toolbox to point to a specific version. @@ -8597,7 +8552,7 @@ def update( :param name: The name of the toolbox to update. Required. :type name: str :param body: Required. - :type body: ~azure.ai.projects.types.UpdateToolboxRequest1 + :type body: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -8628,12 +8583,7 @@ def update( @distributed_trace def update( - self, - name: str, - body: Union[JSON, _types.UpdateToolboxRequest1, IO[bytes]] = _Unset, - *, - default_version: str = _Unset, - **kwargs: Any + self, name: str, body: Union[JSON, IO[bytes]] = _Unset, *, default_version: str = _Unset, **kwargs: Any ) -> _models.ToolboxObject: """Update a toolbox to point to a specific version. @@ -8641,8 +8591,8 @@ def update( :param name: The name of the toolbox to update. Required. :type name: str - :param body: Is one of the following types: JSON, UpdateToolboxRequest1, IO[bytes] Required. - :type body: JSON or ~azure.ai.projects.types.UpdateToolboxRequest1 or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword default_version: The version identifier that the toolbox should point to. When set, the toolbox's default version will resolve to this version instead of the latest. Required. :paramtype default_version: str @@ -9085,7 +9035,7 @@ def create( @overload def create( - self, name: str, taxonomy: _types.EvaluationTaxonomy, *, content_type: str = "application/json", **kwargs: Any + self, name: str, taxonomy: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.EvaluationTaxonomy: """Create an evaluation taxonomy. @@ -9094,7 +9044,7 @@ def create( :param name: The name of the evaluation taxonomy. Required. :type name: str :param taxonomy: The evaluation taxonomy. Required. - :type taxonomy: ~azure.ai.projects.types.EvaluationTaxonomy + :type taxonomy: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -9125,10 +9075,7 @@ def create( @distributed_trace def create( - self, - name: str, - taxonomy: Union[_models.EvaluationTaxonomy, _types.EvaluationTaxonomy, IO[bytes]], - **kwargs: Any + self, name: str, taxonomy: Union[_models.EvaluationTaxonomy, JSON, IO[bytes]], **kwargs: Any ) -> _models.EvaluationTaxonomy: """Create an evaluation taxonomy. @@ -9136,10 +9083,9 @@ def create( :param name: The name of the evaluation taxonomy. Required. :type name: str - :param taxonomy: The evaluation taxonomy. Is either a EvaluationTaxonomy type or a IO[bytes] - type. Required. - :type taxonomy: ~azure.ai.projects.models.EvaluationTaxonomy or - ~azure.ai.projects.types.EvaluationTaxonomy or IO[bytes] + :param taxonomy: The evaluation taxonomy. Is one of the following types: EvaluationTaxonomy, + JSON, IO[bytes] Required. + :type taxonomy: ~azure.ai.projects.models.EvaluationTaxonomy or JSON or IO[bytes] :return: EvaluationTaxonomy. The EvaluationTaxonomy is compatible with MutableMapping :rtype: ~azure.ai.projects.models.EvaluationTaxonomy :raises ~azure.core.exceptions.HttpResponseError: @@ -9211,7 +9157,7 @@ def update( ) -> _models.EvaluationTaxonomy: """Update an evaluation taxonomy. - Update an evaluation taxonomy. + Modifies the specified evaluation taxonomy with the provided changes. :param name: The name of the evaluation taxonomy. Required. :type name: str @@ -9227,16 +9173,16 @@ def update( @overload def update( - self, name: str, taxonomy: _types.EvaluationTaxonomy, *, content_type: str = "application/json", **kwargs: Any + self, name: str, taxonomy: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.EvaluationTaxonomy: """Update an evaluation taxonomy. - Update an evaluation taxonomy. + Modifies the specified evaluation taxonomy with the provided changes. :param name: The name of the evaluation taxonomy. Required. :type name: str :param taxonomy: The evaluation taxonomy. Required. - :type taxonomy: ~azure.ai.projects.types.EvaluationTaxonomy + :type taxonomy: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -9251,7 +9197,7 @@ def update( ) -> _models.EvaluationTaxonomy: """Update an evaluation taxonomy. - Update an evaluation taxonomy. + Modifies the specified evaluation taxonomy with the provided changes. :param name: The name of the evaluation taxonomy. Required. :type name: str @@ -9267,21 +9213,17 @@ def update( @distributed_trace def update( - self, - name: str, - taxonomy: Union[_models.EvaluationTaxonomy, _types.EvaluationTaxonomy, IO[bytes]], - **kwargs: Any + self, name: str, taxonomy: Union[_models.EvaluationTaxonomy, JSON, IO[bytes]], **kwargs: Any ) -> _models.EvaluationTaxonomy: """Update an evaluation taxonomy. - Update an evaluation taxonomy. + Modifies the specified evaluation taxonomy with the provided changes. :param name: The name of the evaluation taxonomy. Required. :type name: str - :param taxonomy: The evaluation taxonomy. Is either a EvaluationTaxonomy type or a IO[bytes] - type. Required. - :type taxonomy: ~azure.ai.projects.models.EvaluationTaxonomy or - ~azure.ai.projects.types.EvaluationTaxonomy or IO[bytes] + :param taxonomy: The evaluation taxonomy. Is one of the following types: EvaluationTaxonomy, + JSON, IO[bytes] Required. + :type taxonomy: ~azure.ai.projects.models.EvaluationTaxonomy or JSON or IO[bytes] :return: EvaluationTaxonomy. The EvaluationTaxonomy is compatible with MutableMapping :rtype: ~azure.ai.projects.models.EvaluationTaxonomy :raises ~azure.core.exceptions.HttpResponseError: @@ -9727,12 +9669,7 @@ def create_version( @overload def create_version( - self, - name: str, - evaluator_version: _types.EvaluatorVersion, - *, - content_type: str = "application/json", - **kwargs: Any + self, name: str, evaluator_version: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.EvaluatorVersion: """Create an evaluator version. @@ -9741,7 +9678,7 @@ def create_version( :param name: The name of the resource. Required. :type name: str :param evaluator_version: Required. - :type evaluator_version: ~azure.ai.projects.types.EvaluatorVersion + :type evaluator_version: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -9772,10 +9709,7 @@ def create_version( @distributed_trace def create_version( - self, - name: str, - evaluator_version: Union[_models.EvaluatorVersion, _types.EvaluatorVersion, IO[bytes]], - **kwargs: Any + self, name: str, evaluator_version: Union[_models.EvaluatorVersion, JSON, IO[bytes]], **kwargs: Any ) -> _models.EvaluatorVersion: """Create an evaluator version. @@ -9783,9 +9717,9 @@ def create_version( :param name: The name of the resource. Required. :type name: str - :param evaluator_version: Is either a EvaluatorVersion type or a IO[bytes] type. Required. - :type evaluator_version: ~azure.ai.projects.models.EvaluatorVersion or - ~azure.ai.projects.types.EvaluatorVersion or IO[bytes] + :param evaluator_version: Is one of the following types: EvaluatorVersion, JSON, IO[bytes] + Required. + :type evaluator_version: ~azure.ai.projects.models.EvaluatorVersion or JSON or IO[bytes] :return: EvaluatorVersion. The EvaluatorVersion is compatible with MutableMapping :rtype: ~azure.ai.projects.models.EvaluatorVersion :raises ~azure.core.exceptions.HttpResponseError: @@ -9881,13 +9815,7 @@ def update_version( @overload def update_version( - self, - name: str, - version: str, - evaluator_version: _types.EvaluatorVersion, - *, - content_type: str = "application/json", - **kwargs: Any + self, name: str, version: str, evaluator_version: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.EvaluatorVersion: """Update an evaluator version. @@ -9898,7 +9826,7 @@ def update_version( :param version: The version of the EvaluatorVersion to update. Required. :type version: str :param evaluator_version: Evaluator resource. Required. - :type evaluator_version: ~azure.ai.projects.types.EvaluatorVersion + :type evaluator_version: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -9940,7 +9868,7 @@ def update_version( self, name: str, version: str, - evaluator_version: Union[_models.EvaluatorVersion, _types.EvaluatorVersion, IO[bytes]], + evaluator_version: Union[_models.EvaluatorVersion, JSON, IO[bytes]], **kwargs: Any ) -> _models.EvaluatorVersion: """Update an evaluator version. @@ -9951,10 +9879,9 @@ def update_version( :type name: str :param version: The version of the EvaluatorVersion to update. Required. :type version: str - :param evaluator_version: Evaluator resource. Is either a EvaluatorVersion type or a IO[bytes] - type. Required. - :type evaluator_version: ~azure.ai.projects.models.EvaluatorVersion or - ~azure.ai.projects.types.EvaluatorVersion or IO[bytes] + :param evaluator_version: Evaluator resource. Is one of the following types: EvaluatorVersion, + JSON, IO[bytes] Required. + :type evaluator_version: ~azure.ai.projects.models.EvaluatorVersion or JSON or IO[bytes] :return: EvaluatorVersion. The EvaluatorVersion is compatible with MutableMapping :rtype: ~azure.ai.projects.models.EvaluatorVersion :raises ~azure.core.exceptions.HttpResponseError: @@ -10036,7 +9963,7 @@ def pending_upload( Initiates a new pending upload or retrieves an existing one for the specified evaluator version. - :param name: Required. + :param name: The name path parameter. Required. :type name: str :param version: The specific version id of the EvaluatorVersion to operate on. Required. :type version: str @@ -10055,7 +9982,7 @@ def pending_upload( self, name: str, version: str, - pending_upload_request: _types.PendingUploadRequest, + pending_upload_request: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -10065,12 +9992,12 @@ def pending_upload( Initiates a new pending upload or retrieves an existing one for the specified evaluator version. - :param name: Required. + :param name: The name path parameter. Required. :type name: str :param version: The specific version id of the EvaluatorVersion to operate on. Required. :type version: str :param pending_upload_request: The pending upload request parameters. Required. - :type pending_upload_request: ~azure.ai.projects.types.PendingUploadRequest + :type pending_upload_request: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -10094,7 +10021,7 @@ def pending_upload( Initiates a new pending upload or retrieves an existing one for the specified evaluator version. - :param name: Required. + :param name: The name path parameter. Required. :type name: str :param version: The specific version id of the EvaluatorVersion to operate on. Required. :type version: str @@ -10113,7 +10040,7 @@ def pending_upload( self, name: str, version: str, - pending_upload_request: Union[_models.PendingUploadRequest, _types.PendingUploadRequest, IO[bytes]], + pending_upload_request: Union[_models.PendingUploadRequest, JSON, IO[bytes]], **kwargs: Any ) -> _models.PendingUploadResponse: """Start a pending upload. @@ -10121,14 +10048,14 @@ def pending_upload( Initiates a new pending upload or retrieves an existing one for the specified evaluator version. - :param name: Required. + :param name: The name path parameter. Required. :type name: str :param version: The specific version id of the EvaluatorVersion to operate on. Required. :type version: str - :param pending_upload_request: The pending upload request parameters. Is either a - PendingUploadRequest type or a IO[bytes] type. Required. - :type pending_upload_request: ~azure.ai.projects.models.PendingUploadRequest or - ~azure.ai.projects.types.PendingUploadRequest or IO[bytes] + :param pending_upload_request: The pending upload request parameters. Is one of the following + types: PendingUploadRequest, JSON, IO[bytes] Required. + :type pending_upload_request: ~azure.ai.projects.models.PendingUploadRequest or JSON or + IO[bytes] :return: PendingUploadResponse. The PendingUploadResponse is compatible with MutableMapping :rtype: ~azure.ai.projects.models.PendingUploadResponse :raises ~azure.core.exceptions.HttpResponseError: @@ -10214,7 +10141,7 @@ def get_credentials( Retrieves SAS credentials for accessing the storage account associated with the specified evaluator version. - :param name: Required. + :param name: The name path parameter. Required. :type name: str :param version: The specific version id of the EvaluatorVersion to operate on. Required. :type version: str @@ -10233,7 +10160,7 @@ def get_credentials( self, name: str, version: str, - credential_request: _types.EvaluatorCredentialRequest, + credential_request: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -10243,12 +10170,12 @@ def get_credentials( Retrieves SAS credentials for accessing the storage account associated with the specified evaluator version. - :param name: Required. + :param name: The name path parameter. Required. :type name: str :param version: The specific version id of the EvaluatorVersion to operate on. Required. :type version: str :param credential_request: The credential request parameters. Required. - :type credential_request: ~azure.ai.projects.types.EvaluatorCredentialRequest + :type credential_request: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -10272,7 +10199,7 @@ def get_credentials( Retrieves SAS credentials for accessing the storage account associated with the specified evaluator version. - :param name: Required. + :param name: The name path parameter. Required. :type name: str :param version: The specific version id of the EvaluatorVersion to operate on. Required. :type version: str @@ -10291,7 +10218,7 @@ def get_credentials( self, name: str, version: str, - credential_request: Union[_models.EvaluatorCredentialRequest, _types.EvaluatorCredentialRequest, IO[bytes]], + credential_request: Union[_models.EvaluatorCredentialRequest, JSON, IO[bytes]], **kwargs: Any ) -> _models.DatasetCredential: """Get evaluator credentials. @@ -10299,14 +10226,14 @@ def get_credentials( Retrieves SAS credentials for accessing the storage account associated with the specified evaluator version. - :param name: Required. + :param name: The name path parameter. Required. :type name: str :param version: The specific version id of the EvaluatorVersion to operate on. Required. :type version: str - :param credential_request: The credential request parameters. Is either a - EvaluatorCredentialRequest type or a IO[bytes] type. Required. - :type credential_request: ~azure.ai.projects.models.EvaluatorCredentialRequest or - ~azure.ai.projects.types.EvaluatorCredentialRequest or IO[bytes] + :param credential_request: The credential request parameters. Is one of the following types: + EvaluatorCredentialRequest, JSON, IO[bytes] Required. + :type credential_request: ~azure.ai.projects.models.EvaluatorCredentialRequest or JSON or + IO[bytes] :return: DatasetCredential. The DatasetCredential is compatible with MutableMapping :rtype: ~azure.ai.projects.models.DatasetCredential :raises ~azure.core.exceptions.HttpResponseError: @@ -10377,15 +10304,87 @@ def get_credentials( return deserialized # type: ignore + def _create_generation_job_initial( + self, + job: Union[_models.EvaluatorGenerationJob, JSON, IO[bytes]], + *, + operation_id: Optional[str] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(job, (IOBase, bytes)): + _content = job + else: + _content = json.dumps(job, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_beta_evaluators_create_generation_job_request( + operation_id=operation_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ApiErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + @overload - def create_generation_job( + def begin_create_generation_job( self, job: _models.EvaluatorGenerationJob, *, operation_id: Optional[str] = None, content_type: str = "application/json", **kwargs: Any - ) -> _models.EvaluatorGenerationJob: + ) -> LROPoller[_models.EvaluatorVersion]: """Create an evaluator generation job. Creates an evaluator generation job. The service generates rubric-based evaluator definitions @@ -10399,47 +10398,44 @@ def create_generation_job( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: EvaluatorGenerationJob. The EvaluatorGenerationJob is compatible with MutableMapping - :rtype: ~azure.ai.projects.models.EvaluatorGenerationJob + :return: An instance of LROPoller that returns EvaluatorVersion. The EvaluatorVersion is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.ai.projects.models.EvaluatorVersion] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def create_generation_job( - self, - job: _types.EvaluatorGenerationJob, - *, - operation_id: Optional[str] = None, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.EvaluatorGenerationJob: + def begin_create_generation_job( + self, job: JSON, *, operation_id: Optional[str] = None, content_type: str = "application/json", **kwargs: Any + ) -> LROPoller[_models.EvaluatorVersion]: """Create an evaluator generation job. Creates an evaluator generation job. The service generates rubric-based evaluator definitions from the provided source materials asynchronously. :param job: The job to create. Required. - :type job: ~azure.ai.projects.types.EvaluatorGenerationJob + :type job: JSON :keyword operation_id: Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. Default value is None. :paramtype operation_id: str :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: EvaluatorGenerationJob. The EvaluatorGenerationJob is compatible with MutableMapping - :rtype: ~azure.ai.projects.models.EvaluatorGenerationJob + :return: An instance of LROPoller that returns EvaluatorVersion. The EvaluatorVersion is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.ai.projects.models.EvaluatorVersion] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def create_generation_job( + def begin_create_generation_job( self, job: IO[bytes], *, operation_id: Optional[str] = None, content_type: str = "application/json", **kwargs: Any - ) -> _models.EvaluatorGenerationJob: + ) -> LROPoller[_models.EvaluatorVersion]: """Create an evaluator generation job. Creates an evaluator generation job. The service generates rubric-based evaluator definitions @@ -10453,103 +10449,92 @@ def create_generation_job( :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: EvaluatorGenerationJob. The EvaluatorGenerationJob is compatible with MutableMapping - :rtype: ~azure.ai.projects.models.EvaluatorGenerationJob + :return: An instance of LROPoller that returns EvaluatorVersion. The EvaluatorVersion is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.ai.projects.models.EvaluatorVersion] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - def create_generation_job( + def begin_create_generation_job( self, - job: Union[_models.EvaluatorGenerationJob, _types.EvaluatorGenerationJob, IO[bytes]], + job: Union[_models.EvaluatorGenerationJob, JSON, IO[bytes]], *, operation_id: Optional[str] = None, **kwargs: Any - ) -> _models.EvaluatorGenerationJob: + ) -> LROPoller[_models.EvaluatorVersion]: """Create an evaluator generation job. Creates an evaluator generation job. The service generates rubric-based evaluator definitions from the provided source materials asynchronously. - :param job: The job to create. Is either a EvaluatorGenerationJob type or a IO[bytes] type. - Required. - :type job: ~azure.ai.projects.models.EvaluatorGenerationJob or - ~azure.ai.projects.types.EvaluatorGenerationJob or IO[bytes] + :param job: The job to create. Is one of the following types: EvaluatorGenerationJob, JSON, + IO[bytes] Required. + :type job: ~azure.ai.projects.models.EvaluatorGenerationJob or JSON or IO[bytes] :keyword operation_id: Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. Default value is None. :paramtype operation_id: str - :return: EvaluatorGenerationJob. The EvaluatorGenerationJob is compatible with MutableMapping - :rtype: ~azure.ai.projects.models.EvaluatorGenerationJob + :return: An instance of LROPoller that returns EvaluatorVersion. The EvaluatorVersion is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.ai.projects.models.EvaluatorVersion] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.EvaluatorGenerationJob] = kwargs.pop("cls", None) + cls: ClsType[_models.EvaluatorVersion] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_generation_job_initial( + job=job, + operation_id=operation_id, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) - content_type = content_type or "application/json" - _content = None - if isinstance(job, (IOBase, bytes)): - _content = job - else: - _content = json.dumps(job, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Operation-Location"] = self._deserialize( + "str", response.headers.get("Operation-Location") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = _deserialize(_models.EvaluatorVersion, response.json().get("result", {})) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized - _request = build_beta_evaluators_create_generation_job_request( - operation_id=operation_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) path_format_arguments = { "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - if response.status_code not in [201]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ApiErrorResponse, - response, + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) else: - deserialized = _deserialize(_models.EvaluatorGenerationJob, response.json()) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore + polling_method = polling + if cont_token: + return LROPoller[_models.EvaluatorVersion].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.EvaluatorVersion]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace def get_generation_job(self, job_id: str, **kwargs: Any) -> _models.EvaluatorGenerationJob: @@ -10877,16 +10862,14 @@ def generate( """ @overload - def generate( - self, insight: _types.Insight, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.Insight: + def generate(self, insight: JSON, *, content_type: str = "application/json", **kwargs: Any) -> _models.Insight: """Generate insights. Generates an insights report from the provided evaluation configuration. :param insight: Complete evaluation configuration including data source, evaluators, and result settings. Required. - :type insight: ~azure.ai.projects.types.Insight + :type insight: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -10913,15 +10896,14 @@ def generate(self, insight: IO[bytes], *, content_type: str = "application/json" """ @distributed_trace - def generate(self, insight: Union[_models.Insight, _types.Insight, IO[bytes]], **kwargs: Any) -> _models.Insight: + def generate(self, insight: Union[_models.Insight, JSON, IO[bytes]], **kwargs: Any) -> _models.Insight: """Generate insights. Generates an insights report from the provided evaluation configuration. :param insight: Complete evaluation configuration including data source, evaluators, and result - settings. Is either a Insight type or a IO[bytes] type. Required. - :type insight: ~azure.ai.projects.models.Insight or ~azure.ai.projects.types.Insight or - IO[bytes] + settings. Is one of the following types: Insight, JSON, IO[bytes] Required. + :type insight: ~azure.ai.projects.models.Insight or JSON or IO[bytes] :return: Insight. The Insight is compatible with MutableMapping :rtype: ~azure.ai.projects.models.Insight :raises ~azure.core.exceptions.HttpResponseError: @@ -11233,14 +11215,14 @@ def create( @overload def create( - self, body: _types.CreateMemoryStoreRequest, *, content_type: str = "application/json", **kwargs: Any + self, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.MemoryStoreDetails: """Create a memory store. Creates a memory store resource with the provided configuration. :param body: Required. - :type body: ~azure.ai.projects.types.CreateMemoryStoreRequest + :type body: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -11270,7 +11252,7 @@ def create( @distributed_trace def create( self, - body: Union[JSON, _types.CreateMemoryStoreRequest, IO[bytes]] = _Unset, + body: Union[JSON, IO[bytes]] = _Unset, *, name: str = _Unset, definition: _models.MemoryStoreDefinition = _Unset, @@ -11282,8 +11264,8 @@ def create( Creates a memory store resource with the provided configuration. - :param body: Is one of the following types: JSON, CreateMemoryStoreRequest, IO[bytes] Required. - :type body: JSON or ~azure.ai.projects.types.CreateMemoryStoreRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword name: The name of the memory store. Required. :paramtype name: str :keyword definition: The memory store definition. Required. @@ -11399,7 +11381,7 @@ def update( @overload def update( - self, name: str, body: _types.UpdateMemoryStoreRequest, *, content_type: str = "application/json", **kwargs: Any + self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.MemoryStoreDetails: """Update a memory store. @@ -11408,7 +11390,7 @@ def update( :param name: The name of the memory store to update. Required. :type name: str :param body: Required. - :type body: ~azure.ai.projects.types.UpdateMemoryStoreRequest + :type body: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -11441,7 +11423,7 @@ def update( def update( self, name: str, - body: Union[JSON, _types.UpdateMemoryStoreRequest, IO[bytes]] = _Unset, + body: Union[JSON, IO[bytes]] = _Unset, *, description: Optional[str] = None, metadata: Optional[dict[str, str]] = None, @@ -11453,8 +11435,8 @@ def update( :param name: The name of the memory store to update. Required. :type name: str - :param body: Is one of the following types: JSON, UpdateMemoryStoreRequest, IO[bytes] Required. - :type body: JSON or ~azure.ai.projects.types.UpdateMemoryStoreRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword description: A human-readable description of the memory store. Default value is None. :paramtype description: str :keyword metadata: Arbitrary key-value metadata to associate with the memory store. Default @@ -11772,7 +11754,7 @@ def _search_memories( ) -> _models.MemoryStoreSearchResult: ... @overload def _search_memories( - self, name: str, body: _types.SearchMemoriesRequest, *, content_type: str = "application/json", **kwargs: Any + self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.MemoryStoreSearchResult: ... @overload def _search_memories( @@ -11783,7 +11765,7 @@ def _search_memories( def _search_memories( self, name: str, - body: Union[JSON, _types.SearchMemoriesRequest, IO[bytes]] = _Unset, + body: Union[JSON, IO[bytes]] = _Unset, *, scope: str = _Unset, items: Optional[List[dict[str, Any]]] = None, @@ -11797,8 +11779,8 @@ def _search_memories( :param name: The name of the memory store to search. Required. :type name: str - :param body: Is one of the following types: JSON, SearchMemoriesRequest, IO[bytes] Required. - :type body: JSON or ~azure.ai.projects.types.SearchMemoriesRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword scope: The namespace that logically groups and isolates memories, such as a user ID. Required. :paramtype scope: str @@ -11886,7 +11868,7 @@ def _search_memories( def _update_memories_initial( self, name: str, - body: Union[JSON, _types.UpdateMemoriesRequest, IO[bytes]] = _Unset, + body: Union[JSON, IO[bytes]] = _Unset, *, scope: str = _Unset, items: Optional[List[dict[str, Any]]] = None, @@ -11982,7 +11964,7 @@ def _begin_update_memories( ) -> LROPoller[_models.MemoryStoreUpdateCompletedResult]: ... @overload def _begin_update_memories( - self, name: str, body: _types.UpdateMemoriesRequest, *, content_type: str = "application/json", **kwargs: Any + self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.MemoryStoreUpdateCompletedResult]: ... @overload def _begin_update_memories( @@ -11993,7 +11975,7 @@ def _begin_update_memories( def _begin_update_memories( self, name: str, - body: Union[JSON, _types.UpdateMemoriesRequest, IO[bytes]] = _Unset, + body: Union[JSON, IO[bytes]] = _Unset, *, scope: str = _Unset, items: Optional[List[dict[str, Any]]] = None, @@ -12008,8 +11990,8 @@ def _begin_update_memories( :param name: The name of the memory store to update. Required. :type name: str - :param body: Is one of the following types: JSON, UpdateMemoriesRequest, IO[bytes] Required. - :type body: JSON or ~azure.ai.projects.types.UpdateMemoriesRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword scope: The namespace that logically groups and isolates memories, such as a user ID. Required. :paramtype scope: str @@ -12114,7 +12096,7 @@ def delete_scope( @overload def delete_scope( - self, name: str, body: _types.DeleteScopeRequest, *, content_type: str = "application/json", **kwargs: Any + self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.MemoryStoreDeleteScopeResult: """Delete memories by scope. @@ -12123,7 +12105,7 @@ def delete_scope( :param name: The name of the memory store. Required. :type name: str :param body: Required. - :type body: ~azure.ai.projects.types.DeleteScopeRequest + :type body: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -12156,12 +12138,7 @@ def delete_scope( @distributed_trace def delete_scope( - self, - name: str, - body: Union[JSON, _types.DeleteScopeRequest, IO[bytes]] = _Unset, - *, - scope: str = _Unset, - **kwargs: Any + self, name: str, body: Union[JSON, IO[bytes]] = _Unset, *, scope: str = _Unset, **kwargs: Any ) -> _models.MemoryStoreDeleteScopeResult: """Delete memories by scope. @@ -12169,8 +12146,8 @@ def delete_scope( :param name: The name of the memory store. Required. :type name: str - :param body: Is one of the following types: JSON, DeleteScopeRequest, IO[bytes] Required. - :type body: JSON or ~azure.ai.projects.types.DeleteScopeRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword scope: The namespace that logically groups and isolates memories to delete, such as a user ID. Required. :paramtype scope: str @@ -12284,7 +12261,7 @@ def create_memory( @overload def create_memory( - self, name: str, body: _types.CreateMemoryRequest, *, content_type: str = "application/json", **kwargs: Any + self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.MemoryItem: """Create a memory item. @@ -12293,7 +12270,7 @@ def create_memory( :param name: The name of the memory store. Required. :type name: str :param body: Required. - :type body: ~azure.ai.projects.types.CreateMemoryRequest + :type body: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -12326,7 +12303,7 @@ def create_memory( def create_memory( self, name: str, - body: Union[JSON, _types.CreateMemoryRequest, IO[bytes]] = _Unset, + body: Union[JSON, IO[bytes]] = _Unset, *, scope: str = _Unset, content: str = _Unset, @@ -12339,8 +12316,8 @@ def create_memory( :param name: The name of the memory store. Required. :type name: str - :param body: Is one of the following types: JSON, CreateMemoryRequest, IO[bytes] Required. - :type body: JSON or ~azure.ai.projects.types.CreateMemoryRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword scope: The namespace that logically groups and isolates memories, such as a user ID. Required. :paramtype scope: str @@ -12451,13 +12428,7 @@ def update_memory( @overload def update_memory( - self, - name: str, - memory_id: str, - body: _types.UpdateMemoryRequest, - *, - content_type: str = "application/json", - **kwargs: Any + self, name: str, memory_id: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.MemoryItem: """Update a memory item. @@ -12468,7 +12439,7 @@ def update_memory( :param memory_id: The ID of the memory item to update. Required. :type memory_id: str :param body: Required. - :type body: ~azure.ai.projects.types.UpdateMemoryRequest + :type body: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -12501,13 +12472,7 @@ def update_memory( @distributed_trace def update_memory( - self, - name: str, - memory_id: str, - body: Union[JSON, _types.UpdateMemoryRequest, IO[bytes]] = _Unset, - *, - content: str = _Unset, - **kwargs: Any + self, name: str, memory_id: str, body: Union[JSON, IO[bytes]] = _Unset, *, content: str = _Unset, **kwargs: Any ) -> _models.MemoryItem: """Update a memory item. @@ -12517,8 +12482,8 @@ def update_memory( :type name: str :param memory_id: The ID of the memory item to update. Required. :type memory_id: str - :param body: Is one of the following types: JSON, UpdateMemoryRequest, IO[bytes] Required. - :type body: JSON or ~azure.ai.projects.types.UpdateMemoryRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword content: The updated content of the memory. Required. :paramtype content: str :return: MemoryItem. The MemoryItem is compatible with MutableMapping @@ -12717,7 +12682,7 @@ def list_memories( def list_memories( self, name: str, - body: _types.ListMemoriesRequest, + body: JSON, *, kind: Optional[Union[str, _models.MemoryItemKind]] = None, limit: Optional[int] = None, @@ -12733,7 +12698,7 @@ def list_memories( :param name: The name of the memory store. Required. :type name: str :param body: Required. - :type body: ~azure.ai.projects.types.ListMemoriesRequest + :type body: JSON :keyword kind: The kind of the memory item. Known values are: "user_profile", "chat_summary", and "procedural". Default value is None. :paramtype kind: str or ~azure.ai.projects.models.MemoryItemKind @@ -12809,7 +12774,7 @@ def list_memories( def list_memories( self, name: str, - body: Union[JSON, _types.ListMemoriesRequest, IO[bytes]] = _Unset, + body: Union[JSON, IO[bytes]] = _Unset, *, scope: str = _Unset, kind: Optional[Union[str, _models.MemoryItemKind]] = None, @@ -12824,8 +12789,8 @@ def list_memories( :param name: The name of the memory store. Required. :type name: str - :param body: Is one of the following types: JSON, ListMemoriesRequest, IO[bytes] Required. - :type body: JSON or ~azure.ai.projects.types.ListMemoriesRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword scope: The namespace that logically groups and isolates memories, such as a user ID. Required. :paramtype scope: str @@ -13268,8 +13233,7 @@ def get(self, name: str, version: str, **kwargs: Any) -> _models.ModelVersion: def delete(self, name: str, version: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements """Delete a model version. - Delete the specific version of the ModelVersion. The service returns 200 OK if the ModelVersion - was deleted successfully or if the ModelVersion does not exist. + Removes the specified model version. Returns 200 whether the version existed or not. :param name: The name of the resource. Required. :type name: str @@ -13330,7 +13294,7 @@ def update( ) -> _models.ModelVersion: """Update a model version. - Update an existing ModelVersion with the given version id. + Updates an existing model version identified by its version ID. :param name: The name of the resource. Required. :type name: str @@ -13352,14 +13316,14 @@ def update( self, name: str, version: str, - model_version_update: _types.UpdateModelVersionRequest, + model_version_update: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> _models.ModelVersion: """Update a model version. - Update an existing ModelVersion with the given version id. + Updates an existing model version identified by its version ID. :param name: The name of the resource. Required. :type name: str @@ -13367,7 +13331,7 @@ def update( Required. :type version: str :param model_version_update: The UpdateModelVersionRequest to create or update. Required. - :type model_version_update: ~azure.ai.projects.types.UpdateModelVersionRequest + :type model_version_update: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/merge-patch+json". :paramtype content_type: str @@ -13388,7 +13352,7 @@ def update( ) -> _models.ModelVersion: """Update a model version. - Update an existing ModelVersion with the given version id. + Updates an existing model version identified by its version ID. :param name: The name of the resource. Required. :type name: str @@ -13410,22 +13374,22 @@ def update( self, name: str, version: str, - model_version_update: Union[_models.UpdateModelVersionRequest, _types.UpdateModelVersionRequest, IO[bytes]], + model_version_update: Union[_models.UpdateModelVersionRequest, JSON, IO[bytes]], **kwargs: Any ) -> _models.ModelVersion: """Update a model version. - Update an existing ModelVersion with the given version id. + Updates an existing model version identified by its version ID. :param name: The name of the resource. Required. :type name: str :param version: The specific version id of the UpdateModelVersionRequest to create or update. Required. :type version: str - :param model_version_update: The UpdateModelVersionRequest to create or update. Is either a - UpdateModelVersionRequest type or a IO[bytes] type. Required. - :type model_version_update: ~azure.ai.projects.models.UpdateModelVersionRequest or - ~azure.ai.projects.types.UpdateModelVersionRequest or IO[bytes] + :param model_version_update: The UpdateModelVersionRequest to create or update. Is one of the + following types: UpdateModelVersionRequest, JSON, IO[bytes] Required. + :type model_version_update: ~azure.ai.projects.models.UpdateModelVersionRequest or JSON or + IO[bytes] :return: ModelVersion. The ModelVersion is compatible with MutableMapping :rtype: ~azure.ai.projects.models.ModelVersion :raises ~azure.core.exceptions.HttpResponseError: @@ -13523,13 +13487,7 @@ def pending_create_version( @overload def pending_create_version( - self, - name: str, - version: str, - model_version: _types.ModelVersion, - *, - content_type: str = "application/json", - **kwargs: Any + self, name: str, version: str, model_version: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.CreateAsyncResponse: """Create a model version async. @@ -13541,7 +13499,7 @@ def pending_create_version( :param version: Version of the model. Required. :type version: str :param model_version: Model version to create. Required. - :type model_version: ~azure.ai.projects.types.ModelVersion + :type model_version: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -13581,11 +13539,7 @@ def pending_create_version( @distributed_trace def pending_create_version( - self, - name: str, - version: str, - model_version: Union[_models.ModelVersion, _types.ModelVersion, IO[bytes]], - **kwargs: Any + self, name: str, version: str, model_version: Union[_models.ModelVersion, JSON, IO[bytes]], **kwargs: Any ) -> _models.CreateAsyncResponse: """Create a model version async. @@ -13596,10 +13550,9 @@ def pending_create_version( :type name: str :param version: Version of the model. Required. :type version: str - :param model_version: Model version to create. Is either a ModelVersion type or a IO[bytes] - type. Required. - :type model_version: ~azure.ai.projects.models.ModelVersion or - ~azure.ai.projects.types.ModelVersion or IO[bytes] + :param model_version: Model version to create. Is one of the following types: ModelVersion, + JSON, IO[bytes] Required. + :type model_version: ~azure.ai.projects.models.ModelVersion or JSON or IO[bytes] :return: CreateAsyncResponse. The CreateAsyncResponse is compatible with MutableMapping :rtype: ~azure.ai.projects.models.CreateAsyncResponse :raises ~azure.core.exceptions.HttpResponseError: @@ -13687,7 +13640,7 @@ def pending_upload( :type name: str :param version: Version of the model. Required. :type version: str - :param pending_upload_request: Required. + :param pending_upload_request: The pending upload request request body. Required. :type pending_upload_request: ~azure.ai.projects.models.ModelPendingUploadRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". @@ -13703,7 +13656,7 @@ def pending_upload( self, name: str, version: str, - pending_upload_request: _types.ModelPendingUploadRequest, + pending_upload_request: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -13716,8 +13669,8 @@ def pending_upload( :type name: str :param version: Version of the model. Required. :type version: str - :param pending_upload_request: Required. - :type pending_upload_request: ~azure.ai.projects.types.ModelPendingUploadRequest + :param pending_upload_request: The pending upload request request body. Required. + :type pending_upload_request: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -13745,7 +13698,7 @@ def pending_upload( :type name: str :param version: Version of the model. Required. :type version: str - :param pending_upload_request: Required. + :param pending_upload_request: The pending upload request request body. Required. :type pending_upload_request: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". @@ -13761,7 +13714,7 @@ def pending_upload( self, name: str, version: str, - pending_upload_request: Union[_models.ModelPendingUploadRequest, _types.ModelPendingUploadRequest, IO[bytes]], + pending_upload_request: Union[_models.ModelPendingUploadRequest, JSON, IO[bytes]], **kwargs: Any ) -> _models.ModelPendingUploadResponse: """Start a pending upload. @@ -13772,10 +13725,10 @@ def pending_upload( :type name: str :param version: Version of the model. Required. :type version: str - :param pending_upload_request: Is either a ModelPendingUploadRequest type or a IO[bytes] type. - Required. - :type pending_upload_request: ~azure.ai.projects.models.ModelPendingUploadRequest or - ~azure.ai.projects.types.ModelPendingUploadRequest or IO[bytes] + :param pending_upload_request: The pending upload request request body. Is one of the following + types: ModelPendingUploadRequest, JSON, IO[bytes] Required. + :type pending_upload_request: ~azure.ai.projects.models.ModelPendingUploadRequest or JSON or + IO[bytes] :return: ModelPendingUploadResponse. The ModelPendingUploadResponse is compatible with MutableMapping :rtype: ~azure.ai.projects.models.ModelPendingUploadResponse @@ -13861,7 +13814,7 @@ def get_credentials( :type name: str :param version: Version of the model. Required. :type version: str - :param credential_request: Required. + :param credential_request: The credential request request body. Required. :type credential_request: ~azure.ai.projects.models.ModelCredentialRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". @@ -13876,7 +13829,7 @@ def get_credentials( self, name: str, version: str, - credential_request: _types.ModelCredentialRequest, + credential_request: JSON, *, content_type: str = "application/json", **kwargs: Any @@ -13889,8 +13842,8 @@ def get_credentials( :type name: str :param version: Version of the model. Required. :type version: str - :param credential_request: Required. - :type credential_request: ~azure.ai.projects.types.ModelCredentialRequest + :param credential_request: The credential request request body. Required. + :type credential_request: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -13917,7 +13870,7 @@ def get_credentials( :type name: str :param version: Version of the model. Required. :type version: str - :param credential_request: Required. + :param credential_request: The credential request request body. Required. :type credential_request: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". @@ -13932,7 +13885,7 @@ def get_credentials( self, name: str, version: str, - credential_request: Union[_models.ModelCredentialRequest, _types.ModelCredentialRequest, IO[bytes]], + credential_request: Union[_models.ModelCredentialRequest, JSON, IO[bytes]], **kwargs: Any ) -> _models.DatasetCredential: """Get model asset credentials. @@ -13943,10 +13896,9 @@ def get_credentials( :type name: str :param version: Version of the model. Required. :type version: str - :param credential_request: Is either a ModelCredentialRequest type or a IO[bytes] type. - Required. - :type credential_request: ~azure.ai.projects.models.ModelCredentialRequest or - ~azure.ai.projects.types.ModelCredentialRequest or IO[bytes] + :param credential_request: The credential request request body. Is one of the following types: + ModelCredentialRequest, JSON, IO[bytes] Required. + :type credential_request: ~azure.ai.projects.models.ModelCredentialRequest or JSON or IO[bytes] :return: DatasetCredential. The DatasetCredential is compatible with MutableMapping :rtype: ~azure.ai.projects.models.DatasetCredential :raises ~azure.core.exceptions.HttpResponseError: @@ -14203,15 +14155,13 @@ def create( """ @overload - def create( - self, red_team: _types.RedTeam, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.RedTeam: + def create(self, red_team: JSON, *, content_type: str = "application/json", **kwargs: Any) -> _models.RedTeam: """Create a redteam run. Submits a new redteam run for execution with the provided configuration. :param red_team: Redteam to be run. Required. - :type red_team: ~azure.ai.projects.types.RedTeam + :type red_team: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -14237,14 +14187,14 @@ def create(self, red_team: IO[bytes], *, content_type: str = "application/json", """ @distributed_trace - def create(self, red_team: Union[_models.RedTeam, _types.RedTeam, IO[bytes]], **kwargs: Any) -> _models.RedTeam: + def create(self, red_team: Union[_models.RedTeam, JSON, IO[bytes]], **kwargs: Any) -> _models.RedTeam: """Create a redteam run. Submits a new redteam run for execution with the provided configuration. - :param red_team: Redteam to be run. Is either a RedTeam type or a IO[bytes] type. Required. - :type red_team: ~azure.ai.projects.models.RedTeam or ~azure.ai.projects.types.RedTeam or - IO[bytes] + :param red_team: Redteam to be run. Is one of the following types: RedTeam, JSON, IO[bytes] + Required. + :type red_team: ~azure.ai.projects.models.RedTeam or JSON or IO[bytes] :return: RedTeam. The RedTeam is compatible with MutableMapping :rtype: ~azure.ai.projects.models.RedTeam :raises ~azure.core.exceptions.HttpResponseError: @@ -14368,12 +14318,7 @@ def create_or_update( @overload def create_or_update( - self, - routine_name: str, - body: _types.CreateOrUpdateRoutineRequest, - *, - content_type: str = "application/json", - **kwargs: Any + self, routine_name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.Routine: """Create or update a routine. @@ -14382,7 +14327,7 @@ def create_or_update( :param routine_name: The unique name of the routine. Required. :type routine_name: str :param body: Required. - :type body: ~azure.ai.projects.types.CreateOrUpdateRoutineRequest + :type body: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -14415,7 +14360,7 @@ def create_or_update( def create_or_update( self, routine_name: str, - body: Union[JSON, _types.CreateOrUpdateRoutineRequest, IO[bytes]] = _Unset, + body: Union[JSON, IO[bytes]] = _Unset, *, description: Optional[str] = None, enabled: Optional[bool] = None, @@ -14429,9 +14374,8 @@ def create_or_update( :param routine_name: The unique name of the routine. Required. :type routine_name: str - :param body: Is one of the following types: JSON, CreateOrUpdateRoutineRequest, IO[bytes] - Required. - :type body: JSON or ~azure.ai.projects.types.CreateOrUpdateRoutineRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword description: A human-readable description of the routine. Default value is None. :paramtype description: str :keyword enabled: Whether the routine is enabled. Default value is None. @@ -14972,12 +14916,7 @@ def dispatch( @overload def dispatch( - self, - routine_name: str, - body: _types.DispatchRoutineAsyncRequest, - *, - content_type: str = "application/json", - **kwargs: Any + self, routine_name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.DispatchRoutineResult: """Queue an asynchronous routine dispatch. @@ -14986,7 +14925,7 @@ def dispatch( :param routine_name: The unique name of the routine. Required. :type routine_name: str :param body: Required. - :type body: ~azure.ai.projects.types.DispatchRoutineAsyncRequest + :type body: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -15019,7 +14958,7 @@ def dispatch( def dispatch( self, routine_name: str, - body: Union[JSON, _types.DispatchRoutineAsyncRequest, IO[bytes]] = _Unset, + body: Union[JSON, IO[bytes]] = _Unset, *, payload: Optional[_models.RoutineDispatchPayload] = None, **kwargs: Any @@ -15030,9 +14969,8 @@ def dispatch( :param routine_name: The unique name of the routine. Required. :type routine_name: str - :param body: Is one of the following types: JSON, DispatchRoutineAsyncRequest, IO[bytes] - Required. - :type body: JSON or ~azure.ai.projects.types.DispatchRoutineAsyncRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword payload: A direct action-input override sent downstream when testing a routine. Default value is None. :paramtype payload: ~azure.ai.projects.models.RoutineDispatchPayload @@ -15364,7 +15302,7 @@ def create_or_update( @overload def create_or_update( - self, schedule_id: str, schedule: _types.Schedule, *, content_type: str = "application/json", **kwargs: Any + self, schedule_id: str, schedule: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.Schedule: """Create or update a schedule. @@ -15373,7 +15311,7 @@ def create_or_update( :param schedule_id: Identifier of the schedule. Required. :type schedule_id: str :param schedule: The resource instance. Required. - :type schedule: ~azure.ai.projects.types.Schedule + :type schedule: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -15404,7 +15342,7 @@ def create_or_update( @distributed_trace def create_or_update( - self, schedule_id: str, schedule: Union[_models.Schedule, _types.Schedule, IO[bytes]], **kwargs: Any + self, schedule_id: str, schedule: Union[_models.Schedule, JSON, IO[bytes]], **kwargs: Any ) -> _models.Schedule: """Create or update a schedule. @@ -15412,10 +15350,9 @@ def create_or_update( :param schedule_id: Identifier of the schedule. Required. :type schedule_id: str - :param schedule: The resource instance. Is either a Schedule type or a IO[bytes] type. - Required. - :type schedule: ~azure.ai.projects.models.Schedule or ~azure.ai.projects.types.Schedule or - IO[bytes] + :param schedule: The resource instance. Is one of the following types: Schedule, JSON, + IO[bytes] Required. + :type schedule: ~azure.ai.projects.models.Schedule or JSON or IO[bytes] :return: Schedule. The Schedule is compatible with MutableMapping :rtype: ~azure.ai.projects.models.Schedule :raises ~azure.core.exceptions.HttpResponseError: @@ -15858,7 +15795,7 @@ def update( @overload def update( - self, name: str, body: _types.UpdateSkillRequest, *, content_type: str = "application/json", **kwargs: Any + self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.SkillDetails: """Update a skill. @@ -15867,7 +15804,7 @@ def update( :param name: The name of the skill to update. Required. :type name: str :param body: Required. - :type body: ~azure.ai.projects.types.UpdateSkillRequest + :type body: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -15898,12 +15835,7 @@ def update( @distributed_trace def update( - self, - name: str, - body: Union[JSON, _types.UpdateSkillRequest, IO[bytes]] = _Unset, - *, - default_version: str = _Unset, - **kwargs: Any + self, name: str, body: Union[JSON, IO[bytes]] = _Unset, *, default_version: str = _Unset, **kwargs: Any ) -> _models.SkillDetails: """Update a skill. @@ -15911,8 +15843,8 @@ def update( :param name: The name of the skill to update. Required. :type name: str - :param body: Is one of the following types: JSON, UpdateSkillRequest, IO[bytes] Required. - :type body: JSON or ~azure.ai.projects.types.UpdateSkillRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword default_version: The version identifier that the skill should point to. When set, the skill's default version will resolve to this version instead of the latest. Required. :paramtype default_version: str @@ -16088,12 +16020,7 @@ def create( @overload def create( - self, - name: str, - body: _types.CreateSkillVersionRequest, - *, - content_type: str = "application/json", - **kwargs: Any + self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.SkillVersion: """Create a new version of a skill. @@ -16102,7 +16029,7 @@ def create( :param name: The name of the skill. If the skill does not exist, it will be created. Required. :type name: str :param body: Required. - :type body: ~azure.ai.projects.types.CreateSkillVersionRequest + :type body: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -16135,7 +16062,7 @@ def create( def create( self, name: str, - body: Union[JSON, _types.CreateSkillVersionRequest, IO[bytes]] = _Unset, + body: Union[JSON, IO[bytes]] = _Unset, *, inline_content: Optional[_models.SkillInlineContent] = None, default: Optional[bool] = None, @@ -16147,9 +16074,8 @@ def create( :param name: The name of the skill. If the skill does not exist, it will be created. Required. :type name: str - :param body: Is one of the following types: JSON, CreateSkillVersionRequest, IO[bytes] - Required. - :type body: JSON or ~azure.ai.projects.types.CreateSkillVersionRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword inline_content: Inline skill content for simple skills without file uploads. Foundry-specific extension. Default value is None. :paramtype inline_content: ~azure.ai.projects.models.SkillInlineContent @@ -16237,7 +16163,7 @@ def create_from_files( :param name: The name of the skill. Required. :type name: str - :param content: Required. + :param content: The multipart request content. Required. :type content: ~azure.ai.projects.models.CreateSkillVersionFromFilesBody :return: SkillVersion. The SkillVersion is compatible with MutableMapping :rtype: ~azure.ai.projects.models.SkillVersion @@ -16245,17 +16171,15 @@ def create_from_files( """ @overload - def create_from_files( - self, name: str, content: _types.CreateSkillVersionFromFilesBody, **kwargs: Any - ) -> _models.SkillVersion: + def create_from_files(self, name: str, content: JSON, **kwargs: Any) -> _models.SkillVersion: """Create a skill version from uploaded files. Creates a new version of a skill from uploaded files via multipart form data. :param name: The name of the skill. Required. :type name: str - :param content: Required. - :type content: ~azure.ai.projects.types.CreateSkillVersionFromFilesBody + :param content: The multipart request content. Required. + :type content: JSON :return: SkillVersion. The SkillVersion is compatible with MutableMapping :rtype: ~azure.ai.projects.models.SkillVersion :raises ~azure.core.exceptions.HttpResponseError: @@ -16263,10 +16187,7 @@ def create_from_files( @distributed_trace def create_from_files( - self, - name: str, - content: Union[_models.CreateSkillVersionFromFilesBody, _types.CreateSkillVersionFromFilesBody], - **kwargs: Any + self, name: str, content: Union[_models.CreateSkillVersionFromFilesBody, JSON], **kwargs: Any ) -> _models.SkillVersion: """Create a skill version from uploaded files. @@ -16274,9 +16195,9 @@ def create_from_files( :param name: The name of the skill. Required. :type name: str - :param content: Is one of the following types: CreateSkillVersionFromFilesBody Required. - :type content: ~azure.ai.projects.models.CreateSkillVersionFromFilesBody or - ~azure.ai.projects.types.CreateSkillVersionFromFilesBody + :param content: The multipart request content. Is either a CreateSkillVersionFromFilesBody type + or a JSON type. Required. + :type content: ~azure.ai.projects.models.CreateSkillVersionFromFilesBody or JSON :return: SkillVersion. The SkillVersion is compatible with MutableMapping :rtype: ~azure.ai.projects.models.SkillVersion :raises ~azure.core.exceptions.HttpResponseError: @@ -16896,15 +16817,87 @@ def get_next(_continuation_token=None): return ItemPaged(get_next, extract_data) + def _create_generation_job_initial( + self, + job: Union[_models.DataGenerationJob, JSON, IO[bytes]], + *, + operation_id: Optional[str] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(job, (IOBase, bytes)): + _content = job + else: + _content = json.dumps(job, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_beta_datasets_create_generation_job_request( + operation_id=operation_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ApiErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + @overload - def create_generation_job( + def begin_create_generation_job( self, job: _models.DataGenerationJob, *, operation_id: Optional[str] = None, content_type: str = "application/json", **kwargs: Any - ) -> _models.DataGenerationJob: + ) -> LROPoller[_models.DataGenerationJobResult]: """Create a data generation job. Submits a new data generation job for asynchronous execution. @@ -16917,46 +16910,43 @@ def create_generation_job( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: DataGenerationJob. The DataGenerationJob is compatible with MutableMapping - :rtype: ~azure.ai.projects.models.DataGenerationJob + :return: An instance of LROPoller that returns DataGenerationJobResult. The + DataGenerationJobResult is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.ai.projects.models.DataGenerationJobResult] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def create_generation_job( - self, - job: _types.DataGenerationJob, - *, - operation_id: Optional[str] = None, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DataGenerationJob: + def begin_create_generation_job( + self, job: JSON, *, operation_id: Optional[str] = None, content_type: str = "application/json", **kwargs: Any + ) -> LROPoller[_models.DataGenerationJobResult]: """Create a data generation job. Submits a new data generation job for asynchronous execution. :param job: The job to create. Required. - :type job: ~azure.ai.projects.types.DataGenerationJob + :type job: JSON :keyword operation_id: Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. Default value is None. :paramtype operation_id: str :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: DataGenerationJob. The DataGenerationJob is compatible with MutableMapping - :rtype: ~azure.ai.projects.models.DataGenerationJob + :return: An instance of LROPoller that returns DataGenerationJobResult. The + DataGenerationJobResult is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.ai.projects.models.DataGenerationJobResult] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def create_generation_job( + def begin_create_generation_job( self, job: IO[bytes], *, operation_id: Optional[str] = None, content_type: str = "application/json", **kwargs: Any - ) -> _models.DataGenerationJob: + ) -> LROPoller[_models.DataGenerationJobResult]: """Create a data generation job. Submits a new data generation job for asynchronous execution. @@ -16969,102 +16959,91 @@ def create_generation_job( :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: DataGenerationJob. The DataGenerationJob is compatible with MutableMapping - :rtype: ~azure.ai.projects.models.DataGenerationJob + :return: An instance of LROPoller that returns DataGenerationJobResult. The + DataGenerationJobResult is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.ai.projects.models.DataGenerationJobResult] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - def create_generation_job( + def begin_create_generation_job( self, - job: Union[_models.DataGenerationJob, _types.DataGenerationJob, IO[bytes]], + job: Union[_models.DataGenerationJob, JSON, IO[bytes]], *, operation_id: Optional[str] = None, **kwargs: Any - ) -> _models.DataGenerationJob: + ) -> LROPoller[_models.DataGenerationJobResult]: """Create a data generation job. Submits a new data generation job for asynchronous execution. - :param job: The job to create. Is either a DataGenerationJob type or a IO[bytes] type. - Required. - :type job: ~azure.ai.projects.models.DataGenerationJob or - ~azure.ai.projects.types.DataGenerationJob or IO[bytes] + :param job: The job to create. Is one of the following types: DataGenerationJob, JSON, + IO[bytes] Required. + :type job: ~azure.ai.projects.models.DataGenerationJob or JSON or IO[bytes] :keyword operation_id: Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. Default value is None. :paramtype operation_id: str - :return: DataGenerationJob. The DataGenerationJob is compatible with MutableMapping - :rtype: ~azure.ai.projects.models.DataGenerationJob + :return: An instance of LROPoller that returns DataGenerationJobResult. The + DataGenerationJobResult is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.ai.projects.models.DataGenerationJobResult] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DataGenerationJob] = kwargs.pop("cls", None) + cls: ClsType[_models.DataGenerationJobResult] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_generation_job_initial( + job=job, + operation_id=operation_id, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) - content_type = content_type or "application/json" - _content = None - if isinstance(job, (IOBase, bytes)): - _content = job - else: - _content = json.dumps(job, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Operation-Location"] = self._deserialize( + "str", response.headers.get("Operation-Location") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = _deserialize(_models.DataGenerationJobResult, response.json().get("result", {})) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized - _request = build_beta_datasets_create_generation_job_request( - operation_id=operation_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) path_format_arguments = { "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - if response.status_code not in [201]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ApiErrorResponse, - response, + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) else: - deserialized = _deserialize(_models.DataGenerationJob, response.json()) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore + polling_method = polling + if cont_token: + return LROPoller[_models.DataGenerationJobResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.DataGenerationJobResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace def cancel_generation_job(self, job_id: str, **kwargs: Any) -> _models.DataGenerationJob: @@ -17207,19 +17186,87 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + def _create_optimization_job_initial( + self, job: Union[_models.OptimizationJob, JSON, IO[bytes]], *, operation_id: Optional[str] = None, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(job, (IOBase, bytes)): + _content = job + else: + _content = json.dumps(job, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_beta_agents_create_optimization_job_request( + operation_id=operation_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ApiErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + @overload - def create_optimization_job( + def begin_create_optimization_job( self, job: _models.OptimizationJob, *, operation_id: Optional[str] = None, content_type: str = "application/json", **kwargs: Any - ) -> _models.OptimizationJob: - """Creates an agent optimization job. + ) -> LROPoller[_models.OptimizationJobResult]: + """Create an agent optimization job. - Create an optimization job. Returns 201 with the queued job. Honours ``Operation-Id`` for - idempotent retry. + Creates an optimization job and returns the queued job. Honors ``Operation-Id`` for idempotent + retry. :param job: The job to create. Required. :type job: ~azure.ai.projects.models.OptimizationJob @@ -17229,51 +17276,48 @@ def create_optimization_job( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: OptimizationJob. The OptimizationJob is compatible with MutableMapping - :rtype: ~azure.ai.projects.models.OptimizationJob + :return: An instance of LROPoller that returns OptimizationJobResult. The OptimizationJobResult + is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.ai.projects.models.OptimizationJobResult] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def create_optimization_job( - self, - job: _types.OptimizationJob, - *, - operation_id: Optional[str] = None, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.OptimizationJob: - """Creates an agent optimization job. + def begin_create_optimization_job( + self, job: JSON, *, operation_id: Optional[str] = None, content_type: str = "application/json", **kwargs: Any + ) -> LROPoller[_models.OptimizationJobResult]: + """Create an agent optimization job. - Create an optimization job. Returns 201 with the queued job. Honours ``Operation-Id`` for - idempotent retry. + Creates an optimization job and returns the queued job. Honors ``Operation-Id`` for idempotent + retry. :param job: The job to create. Required. - :type job: ~azure.ai.projects.types.OptimizationJob + :type job: JSON :keyword operation_id: Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. Default value is None. :paramtype operation_id: str :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: OptimizationJob. The OptimizationJob is compatible with MutableMapping - :rtype: ~azure.ai.projects.models.OptimizationJob + :return: An instance of LROPoller that returns OptimizationJobResult. The OptimizationJobResult + is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.ai.projects.models.OptimizationJobResult] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def create_optimization_job( + def begin_create_optimization_job( self, job: IO[bytes], *, operation_id: Optional[str] = None, content_type: str = "application/json", **kwargs: Any - ) -> _models.OptimizationJob: - """Creates an agent optimization job. + ) -> LROPoller[_models.OptimizationJobResult]: + """Create an agent optimization job. - Create an optimization job. Returns 201 with the queued job. Honours ``Operation-Id`` for - idempotent retry. + Creates an optimization job and returns the queued job. Honors ``Operation-Id`` for idempotent + retry. :param job: The job to create. Required. :type job: IO[bytes] @@ -17283,108 +17327,94 @@ def create_optimization_job( :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: OptimizationJob. The OptimizationJob is compatible with MutableMapping - :rtype: ~azure.ai.projects.models.OptimizationJob + :return: An instance of LROPoller that returns OptimizationJobResult. The OptimizationJobResult + is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.ai.projects.models.OptimizationJobResult] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - def create_optimization_job( - self, - job: Union[_models.OptimizationJob, _types.OptimizationJob, IO[bytes]], - *, - operation_id: Optional[str] = None, - **kwargs: Any - ) -> _models.OptimizationJob: - """Creates an agent optimization job. + def begin_create_optimization_job( + self, job: Union[_models.OptimizationJob, JSON, IO[bytes]], *, operation_id: Optional[str] = None, **kwargs: Any + ) -> LROPoller[_models.OptimizationJobResult]: + """Create an agent optimization job. - Create an optimization job. Returns 201 with the queued job. Honours ``Operation-Id`` for - idempotent retry. + Creates an optimization job and returns the queued job. Honors ``Operation-Id`` for idempotent + retry. - :param job: The job to create. Is either a OptimizationJob type or a IO[bytes] type. Required. - :type job: ~azure.ai.projects.models.OptimizationJob or - ~azure.ai.projects.types.OptimizationJob or IO[bytes] + :param job: The job to create. Is one of the following types: OptimizationJob, JSON, IO[bytes] + Required. + :type job: ~azure.ai.projects.models.OptimizationJob or JSON or IO[bytes] :keyword operation_id: Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. Default value is None. :paramtype operation_id: str - :return: OptimizationJob. The OptimizationJob is compatible with MutableMapping - :rtype: ~azure.ai.projects.models.OptimizationJob + :return: An instance of LROPoller that returns OptimizationJobResult. The OptimizationJobResult + is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.ai.projects.models.OptimizationJobResult] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.OptimizationJob] = kwargs.pop("cls", None) + cls: ClsType[_models.OptimizationJobResult] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_optimization_job_initial( + job=job, + operation_id=operation_id, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) - content_type = content_type or "application/json" - _content = None - if isinstance(job, (IOBase, bytes)): - _content = job - else: - _content = json.dumps(job, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Operation-Location"] = self._deserialize( + "str", response.headers.get("Operation-Location") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = _deserialize(_models.OptimizationJobResult, response.json().get("result", {})) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized - _request = build_beta_agents_create_optimization_job_request( - operation_id=operation_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) path_format_arguments = { "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - if response.status_code not in [201]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ApiErrorResponse, - response, + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) else: - deserialized = _deserialize(_models.OptimizationJob, response.json()) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore + polling_method = polling + if cont_token: + return LROPoller[_models.OptimizationJobResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.OptimizationJobResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace def get_optimization_job(self, job_id: str, **kwargs: Any) -> _models.OptimizationJob: - """Get info about an agent optimization job. + """Get an agent optimization job. - Get an optimization job by id. + Retrieves an optimization job by its identifier. :param job_id: The ID of the job. Required. :type job_id: str @@ -17461,9 +17491,9 @@ def list_optimization_jobs( agent_name: Optional[str] = None, **kwargs: Any ) -> ItemPaged["_models.OptimizationJobListItem"]: - """Returns a list of agent optimization jobs. + """List agent optimization jobs. - List optimization jobs. Supports cursor pagination and optional status / agent_name filters. + Lists optimization jobs with cursor pagination and optional status or agent name filters. :keyword limit: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the @@ -17553,10 +17583,10 @@ def get_next(_continuation_token=None): @distributed_trace def cancel_optimization_job(self, job_id: str, **kwargs: Any) -> _models.OptimizationJob: - """Cancels an agent optimization job. + """Cancel an agent optimization job. - Request cancellation of a running or queued job. Returns an error if the job is already in a - terminal state. + Requests cancellation of a running or queued job and returns an error if the job is already in + a terminal state. :param job_id: The ID of the job to cancel. Required. :type job_id: str @@ -17623,9 +17653,9 @@ def cancel_optimization_job(self, job_id: str, **kwargs: Any) -> _models.Optimiz def delete_optimization_job( # pylint: disable=inconsistent-return-statements self, job_id: str, **kwargs: Any ) -> None: - """Deletes an agent optimization job. + """Delete an agent optimization job. - Delete the job and its candidate artifacts. Cancels first if non-terminal. + Deletes the job and its candidate artifacts, canceling the job first if it is non-terminal. :param job_id: The ID of the job to delete. Required. :type job_id: str diff --git a/sdk/ai/azure-ai-projects/azure/ai/projects/operations/_patch_agents.py b/sdk/ai/azure-ai-projects/azure/ai/projects/operations/_patch_agents.py index ac21500415e3..d72e81cf077d 100644 --- a/sdk/ai/azure-ai-projects/azure/ai/projects/operations/_patch_agents.py +++ b/sdk/ai/azure-ai-projects/azure/ai/projects/operations/_patch_agents.py @@ -13,8 +13,7 @@ from typing import Union, Optional, Any, IO, overload from azure.core.exceptions import HttpResponseError from azure.core.tracing.decorator import distributed_trace -from ._operations import AgentsOperations as GeneratedAgentsOperations, _Unset -from .. import types as _types +from ._operations import AgentsOperations as GeneratedAgentsOperations, JSON, _Unset from .. import models as _models from ..models._patch import ( _FOUNDRY_FEATURES_HEADER_NAME, @@ -105,12 +104,7 @@ def create_version( @overload def create_version( - self, - agent_name: str, - body: _types.CreateAgentVersionRequest, - *, - content_type: str = "application/json", - **kwargs: Any, + self, agent_name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.AgentVersionDetails: """Create an agent version. @@ -124,7 +118,7 @@ def create_version( * Must not exceed 63 characters. Required. :type agent_name: str :param body: Required. - :type body: ~azure.ai.projects.types.CreateAgentVersionRequest + :type body: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -162,7 +156,7 @@ def create_version( def create_version( self, agent_name: str, - body: Union[_types.CreateAgentVersionRequest, IO[bytes]] = _Unset, + body: Union[JSON, IO[bytes]] = _Unset, *, definition: _models.AgentDefinition = _Unset, metadata: Optional[dict[str, str]] = None, @@ -182,9 +176,8 @@ def create_version( * Can contain hyphens in the middle * Must not exceed 63 characters. Required. :type agent_name: str - :param body: Is one of the following types: CreateAgentVersionRequest, IO[bytes] - Required. - :type body: ~azure.ai.projects.types.CreateAgentVersionRequest or IO[bytes] + :param body: Is either a JSON type or a IO[bytes] type. Required. + :type body: JSON or IO[bytes] :keyword definition: The agent definition. This can be a workflow, hosted agent, or a simple agent definition. Required. :paramtype definition: ~azure.ai.projects.models.AgentDefinition @@ -219,20 +212,14 @@ def create_version( kwargs["headers"] = headers try: - if body is _Unset: - return super().create_version( - agent_name, - definition=definition, - metadata=metadata, - description=description, - blueprint_reference=blueprint_reference, - draft=draft, - **kwargs, - ) - return super().create_version( agent_name, body, + definition=definition, + metadata=metadata, + description=description, + blueprint_reference=blueprint_reference, + draft=draft, **kwargs, ) except HttpResponseError as exc: diff --git a/sdk/ai/azure-ai-projects/azure/ai/projects/operations/_patch_evaluation_rules.py b/sdk/ai/azure-ai-projects/azure/ai/projects/operations/_patch_evaluation_rules.py index 8292036b6677..859bea44b87b 100644 --- a/sdk/ai/azure-ai-projects/azure/ai/projects/operations/_patch_evaluation_rules.py +++ b/sdk/ai/azure-ai-projects/azure/ai/projects/operations/_patch_evaluation_rules.py @@ -11,9 +11,8 @@ from typing import Union, Any, IO, overload from azure.core.exceptions import HttpResponseError from azure.core.tracing.decorator import distributed_trace -from ._operations import EvaluationRulesOperations as GeneratedEvaluationRulesOperations +from ._operations import EvaluationRulesOperations as GeneratedEvaluationRulesOperations, JSON from .. import models as _models -from .. import types as _types from ..models._enums import _FoundryFeaturesOptInKeys from ..models._patch import ( _FOUNDRY_FEATURES_HEADER_NAME, @@ -54,16 +53,14 @@ def create_or_update( @overload def create_or_update( - self, id: str, evaluation_rule: _types.EvaluationRule, *, content_type: str = "application/json", **kwargs: Any + self, id: str, evaluation_rule: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.EvaluationRule: """Create or update an evaluation rule. - Creates a new evaluation rule, or replaces the existing rule when the identifier matches. - :param id: Unique identifier for the evaluation rule. Required. :type id: str :param evaluation_rule: Evaluation rule resource. Required. - :type evaluation_rule: ~azure.ai.projects.types.EvaluationRule + :type evaluation_rule: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -94,18 +91,15 @@ def create_or_update( @distributed_trace def create_or_update( - self, id: str, evaluation_rule: Union[_models.EvaluationRule, _types.EvaluationRule, IO[bytes]], **kwargs: Any + self, id: str, evaluation_rule: Union[_models.EvaluationRule, JSON, IO[bytes]], **kwargs: Any ) -> _models.EvaluationRule: """Create or update an evaluation rule. - Creates a new evaluation rule, or replaces the existing rule when the identifier matches. - :param id: Unique identifier for the evaluation rule. Required. :type id: str - :param evaluation_rule: Evaluation rule resource. Is either a EvaluationRule type or a - IO[bytes] type. Required. - :type evaluation_rule: ~azure.ai.projects.models.EvaluationRule or - ~azure.ai.projects.types.EvaluationRule or IO[bytes] + :param evaluation_rule: Evaluation rule resource. Is one of the following types: + EvaluationRule, JSON, IO[bytes] Required. + :type evaluation_rule: ~azure.ai.projects.models.EvaluationRule or JSON or IO[bytes] :return: EvaluationRule. The EvaluationRule is compatible with MutableMapping :rtype: ~azure.ai.projects.models.EvaluationRule :raises ~azure.core.exceptions.HttpResponseError: diff --git a/sdk/ai/azure-ai-projects/azure/ai/projects/types.py b/sdk/ai/azure-ai-projects/azure/ai/projects/types.py deleted file mode 100644 index cb30e0f17d6d..000000000000 --- a/sdk/ai/azure-ai-projects/azure/ai/projects/types.py +++ /dev/null @@ -1,7201 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any, Literal, Optional, TYPE_CHECKING, Union -from typing_extensions import Required, TypedDict - -from ._utils.utils import FileType -from .models._enums import ( - AgentBlueprintReferenceType, - AgentEndpointAuthorizationSchemeType, - AgentKind, - ContainerNetworkPolicyParamType, - ContainerSkillType, - CustomToolParamFormatType, - DataGenerationJobOutputType, - DataGenerationJobSourceType, - DataGenerationJobType, - DatasetType, - EvaluationRuleActionType, - EvaluationTaxonomyInputType, - EvaluatorDefinitionType, - EvaluatorGenerationJobSourceType, - FunctionShellToolParamEnvironmentType, - IndexType, - InsightType, - MemoryStoreKind, - OpenApiAuthType, - OptimizationDatasetInputType, - PendingUploadType, - RecurrenceType, - RoutineActionType, - RoutineDispatchPayloadType, - RoutineTriggerType, - SampleType, - ScheduleTaskType, - TelemetryEndpointAuthType, - TelemetryEndpointKind, - TextResponseFormatConfigurationType, - ToolChoiceParamType, - ToolType, - ToolboxToolType, - TriggerType, - VersionIndicatorType, - VersionSelectorType, -) - -if TYPE_CHECKING: - from . import _unions - from .models import ( - AgentEndpointProtocol, - AttackStrategy, - AzureAISearchQueryType, - CodeDependencyResolution, - ComputerEnvironment, - ContainerMemoryLimit, - DataGenerationJobScenario, - DayOfWeek, - EvaluationLevel, - EvaluationRuleEventType, - EvaluatorCategory, - EvaluatorMetricDirection, - EvaluatorMetricType, - EvaluatorType, - FoundryModelArtifactProfileCategory, - FoundryModelArtifactProfileSignal, - FoundryModelSourceType, - FoundryModelWarningCode, - FoundryModelWeightType, - GitHubIssueEvent, - GrammarSyntax1, - ImageGenAction, - InputFidelity, - JobStatus, - MemoryItemKind, - OperationState, - RankerVersionType, - RiskCategory, - ScheduleProvisioningStatus, - SearchContentType, - SearchContextSize, - SimpleQnAFineTuningQuestionType, - TelemetryDataKind, - TelemetryTransportProtocol, - ToolSearchExecutionType, - TreatmentEffectType, - ) - - -class _CreateAgentVersionFromCodeContent(TypedDict, total=False): - """Multipart request body for updating or versioning a code-based agent (POST /agents/{name} and - POST /agents/{name}/versions). - - :ivar metadata: JSON metadata including description and hosted definition. Required. - :vartype metadata: "_CreateAgentVersionFromCodeMetadata" - :ivar code: The code zip file (max 250 MB). Required. - :vartype code: FileType - """ - - metadata: Required["_CreateAgentVersionFromCodeMetadata"] - """JSON metadata including description and hosted definition. Required.""" - code: Required[FileType] - """The code zip file (max 250 MB). Required.""" - - -class _CreateAgentVersionFromCodeMetadata(TypedDict, total=False): - """JSON metadata for code-based agent operations (create, update, create version). The agent name - comes from the URL path parameter or the ``x-ms-agent-name`` header, so it is not included in - this model. The content hash (SHA-256 of the zip) is carried in the ``x-ms-code-zip-sha256`` - header. - - :ivar description: A human-readable description of the agent. - :vartype description: str - :ivar metadata: Set of 16 key-value pairs that can be attached to an object. This can be - useful for storing additional information about the object in a structured - format, and querying for objects via API or the dashboard. - - Keys are strings with a maximum length of 64 characters. Values are strings - with a maximum length of 512 characters. - :vartype metadata: dict[str, str] - :ivar definition: The hosted agent definition including code_configuration (runtime, - entry_point), cpu, memory, and protocol_versions. Required. - :vartype definition: "HostedAgentDefinition" - """ - - description: str - """A human-readable description of the agent.""" - metadata: dict[str, str] - """Set of 16 key-value pairs that can be attached to an object. This can be - useful for storing additional information about the object in a structured - format, and querying for objects via API or the dashboard. - - Keys are strings with a maximum length of 64 characters. Values are strings - with a maximum length of 512 characters.""" - definition: Required["HostedAgentDefinition"] - """The hosted agent definition including code_configuration (runtime, entry_point), cpu, memory, - and protocol_versions. Required.""" - - -class A2APreviewTool(TypedDict, total=False): - """An agent implementing the A2A protocol. - - :ivar type: The type of the tool. Always ``"a2a_preview``. Required. A2A_PREVIEW. - :vartype type: Literal[ToolType.A2A_PREVIEW] - :ivar base_url: Base URL of the agent. - :vartype base_url: str - :ivar agent_card_path: The path to the agent card relative to the ``base_url``. If not - provided, defaults to ``/.well-known/agent-card.json``. - :vartype agent_card_path: str - :ivar project_connection_id: The connection ID in the project for the A2A server. The - connection stores authentication and other connection details needed to connect to the A2A - server. - :vartype project_connection_id: str - :ivar send_credentials_for_agent_card: When ``true``, Foundry sends its credentials when - fetching the remote agent's Agent Card. The service defaults to ``false`` if a value is not - specified by the caller (anonymous fetch). - :vartype send_credentials_for_agent_card: bool - """ - - type: Required[Literal[ToolType.A2A_PREVIEW]] - """The type of the tool. Always ``\"a2a_preview``. Required. A2A_PREVIEW.""" - base_url: str - """Base URL of the agent.""" - agent_card_path: str - """The path to the agent card relative to the ``base_url``. If not provided, defaults to - ``/.well-known/agent-card.json``.""" - project_connection_id: str - """The connection ID in the project for the A2A server. The connection stores authentication and - other connection details needed to connect to the A2A server.""" - send_credentials_for_agent_card: bool - """When ``true``, Foundry sends its credentials when fetching the remote agent's Agent Card. The - service defaults to ``false`` if a value is not specified by the caller (anonymous fetch).""" - - -class A2APreviewToolboxTool(TypedDict, total=False): - """An A2A tool stored in a toolbox. - - :ivar name: Optional user-defined name for this tool or configuration. - :vartype name: str - :ivar description: Optional user-defined description for this tool or configuration. - :vartype description: str - :ivar tool_configs: Per-tool configuration map. Keys are tool names or ``*`` (catch-all - default). Resolution order: exact tool name match takes priority over ``*``. Unknown tool names - are silently ignored at runtime. - :vartype tool_configs: dict[str, "ToolConfig"] - :ivar type: Required. A2A_PREVIEW. - :vartype type: Literal[ToolboxToolType.A2A_PREVIEW] - :ivar base_url: Base URL of the agent. - :vartype base_url: str - :ivar agent_card_path: The path to the agent card relative to the ``base_url``. If not - provided, defaults to ``/.well-known/agent-card.json``. - :vartype agent_card_path: str - :ivar project_connection_id: The connection ID in the project for the A2A server. The - connection stores authentication and other connection details needed to connect to the A2A - server. - :vartype project_connection_id: str - :ivar send_credentials_for_agent_card: When ``true``, Foundry sends its credentials when - fetching the remote agent's Agent Card. The service defaults to ``false`` if a value is not - specified by the caller (anonymous fetch). - :vartype send_credentials_for_agent_card: bool - """ - - name: str - """Optional user-defined name for this tool or configuration.""" - description: str - """Optional user-defined description for this tool or configuration.""" - tool_configs: dict[str, "ToolConfig"] - """Per-tool configuration map. Keys are tool names or ``*`` (catch-all default). Resolution order: - exact tool name match takes priority over ``*``. Unknown tool names are silently ignored at - runtime.""" - type: Required[Literal[ToolboxToolType.A2A_PREVIEW]] - """Required. A2A_PREVIEW.""" - base_url: str - """Base URL of the agent.""" - agent_card_path: str - """The path to the agent card relative to the ``base_url``. If not provided, defaults to - ``/.well-known/agent-card.json``.""" - project_connection_id: str - """The connection ID in the project for the A2A server. The connection stores authentication and - other connection details needed to connect to the A2A server.""" - send_credentials_for_agent_card: bool - """When ``true``, Foundry sends its credentials when fetching the remote agent's Agent Card. The - service defaults to ``false`` if a value is not specified by the caller (anonymous fetch).""" - - -class A2AProtocolConfiguration(TypedDict, total=False): - """Configuration specific to the A2A protocol.""" - - -class ActivityProtocolConfiguration(TypedDict, total=False): - """Configuration specific to the activity protocol. - - :ivar enable_m365_public_endpoint: Whether to enable the M365 public endpoint for the activity - protocol. - :vartype enable_m365_public_endpoint: bool - """ - - enable_m365_public_endpoint: bool - """Whether to enable the M365 public endpoint for the activity protocol.""" - - -class AgentCard(TypedDict, total=False): - """AgentCard. - - :ivar version: The version of the agent card. Required. - :vartype version: str - :ivar description: The description of the agent card. - :vartype description: str - :ivar skills: The set of skills that an agent can perform. Required. - :vartype skills: list["AgentCardSkill"] - """ - - version: Required[str] - """The version of the agent card. Required.""" - description: str - """The description of the agent card.""" - skills: Required[list["AgentCardSkill"]] - """The set of skills that an agent can perform. Required.""" - - -class AgentCardSkill(TypedDict, total=False): - """AgentCardSkill. - - :ivar id: a unique identifier for the skill. Required. - :vartype id: str - :ivar name: The name of the skill. Required. - :vartype name: str - :ivar description: A description of the skill. - :vartype description: str - :ivar tags: set of tagwords describing classes of capabilities for the skill. - :vartype tags: list[str] - :ivar examples: A list of example scenarios that the skill can perform. - :vartype examples: list[str] - """ - - id: Required[str] - """a unique identifier for the skill. Required.""" - name: Required[str] - """The name of the skill. Required.""" - description: str - """A description of the skill.""" - tags: list[str] - """set of tagwords describing classes of capabilities for the skill.""" - examples: list[str] - """A list of example scenarios that the skill can perform.""" - - -class AgentClusterInsightRequest(TypedDict, total=False): - """Insights on set of Agent Evaluation Results. - - :ivar type: The type of request. Required. Cluster Insight on an Agent. - :vartype type: Literal[InsightType.AGENT_CLUSTER_INSIGHT] - :ivar agent_name: Identifier for the agent. Required. - :vartype agent_name: str - :ivar model_configuration: Configuration of the model used in the insight generation. - :vartype model_configuration: "InsightModelConfiguration" - """ - - type: Required[Literal[InsightType.AGENT_CLUSTER_INSIGHT]] - """The type of request. Required. Cluster Insight on an Agent.""" - agentName: Required[str] - """Identifier for the agent. Required.""" - modelConfiguration: "InsightModelConfiguration" - """Configuration of the model used in the insight generation.""" - - -class AgentClusterInsightResult(TypedDict, total=False): - """Insights from the agent cluster analysis. - - :ivar type: The type of insights result. Required. Cluster Insight on an Agent. - :vartype type: Literal[InsightType.AGENT_CLUSTER_INSIGHT] - :ivar cluster_insight: Required. - :vartype cluster_insight: "ClusterInsightResult" - """ - - type: Required[Literal[InsightType.AGENT_CLUSTER_INSIGHT]] - """The type of insights result. Required. Cluster Insight on an Agent.""" - clusterInsight: Required["ClusterInsightResult"] - """Required.""" - - -class AgentDataGenerationJobSource(TypedDict, total=False): - """Agent source for data generation jobs — references an agent to fetch instructions and metadata - from. - - :ivar description: Optional description of what this source represents — helps the pipeline - interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core - capabilities'). - :vartype description: str - :ivar type: The source type for this source, which is Agent. Required. Agent source — - references an agent. - :vartype type: Literal[DataGenerationJobSourceType.AGENT] - :ivar agent_name: The agent name to fetch instructions from. Required. - :vartype agent_name: str - :ivar agent_version: The agent version. If not specified, the latest version is used. - :vartype agent_version: str - """ - - description: str - """Optional description of what this source represents — helps the pipeline interpret its content - (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities').""" - type: Required[Literal[DataGenerationJobSourceType.AGENT]] - """The source type for this source, which is Agent. Required. Agent source — references an agent.""" - agent_name: Required[str] - """The agent name to fetch instructions from. Required.""" - agent_version: str - """The agent version. If not specified, the latest version is used.""" - - -class AgentEndpointConfig(TypedDict, total=False): - """AgentEndpointConfig. - - :ivar version_selector: The version selector of the agent endpoint determines how traffic is - routed to different versions of the agent. - :vartype version_selector: "VersionSelector" - :ivar protocol_configuration: Per-protocol configuration for the agent endpoint. - :vartype protocol_configuration: "ProtocolConfiguration" - :ivar authorization_schemes: The authorization schemes supported by the agent endpoint. - :vartype authorization_schemes: list["AgentEndpointAuthorizationScheme"] - """ - - version_selector: "VersionSelector" - """The version selector of the agent endpoint determines how traffic is routed to different - versions of the agent.""" - protocol_configuration: "ProtocolConfiguration" - """Per-protocol configuration for the agent endpoint.""" - authorization_schemes: list["AgentEndpointAuthorizationScheme"] - """The authorization schemes supported by the agent endpoint.""" - - -class AgentEvaluatorGenerationJobSource(TypedDict, total=False): - """Agent source for evaluator generation jobs — references an agent to fetch instructions and - metadata from. - - :ivar description: Optional description of what this source represents — helps the pipeline - interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core - capabilities'). - :vartype description: str - :ivar type: The source type for this source, which is Agent. Required. Agent source — - references an agent to fetch instructions and metadata from. - :vartype type: Literal[EvaluatorGenerationJobSourceType.AGENT] - :ivar agent_name: The agent name to fetch instructions from. Required. - :vartype agent_name: str - :ivar agent_version: The agent version. If not specified, the latest version is used. - :vartype agent_version: str - """ - - description: str - """Optional description of what this source represents — helps the pipeline interpret its content - (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities').""" - type: Required[Literal[EvaluatorGenerationJobSourceType.AGENT]] - """The source type for this source, which is Agent. Required. Agent source — references an agent - to fetch instructions and metadata from.""" - agent_name: Required[str] - """The agent name to fetch instructions from. Required.""" - agent_version: str - """The agent version. If not specified, the latest version is used.""" - - -class AgentTaxonomyInput(TypedDict, total=False): - """Input configuration for the evaluation taxonomy when the input type is agent. - - :ivar type: Input type of the evaluation taxonomy. Required. Agent. - :vartype type: Literal[EvaluationTaxonomyInputType.AGENT] - :ivar target: Target configuration for the agent. Required. - :vartype target: "EvaluationTarget" - :ivar risk_categories: List of risk categories to evaluate against. Required. - :vartype risk_categories: list[Union[str, "RiskCategory"]] - """ - - type: Required[Literal[EvaluationTaxonomyInputType.AGENT]] - """Input type of the evaluation taxonomy. Required. Agent.""" - target: Required["EvaluationTarget"] - """Target configuration for the agent. Required.""" - riskCategories: Required[list[Union[str, "RiskCategory"]]] - """List of risk categories to evaluate against. Required.""" - - -class AISearchIndexResource(TypedDict, total=False): - """A AI Search Index resource. - - :ivar project_connection_id: An index connection ID in an IndexResource attached to this agent. - :vartype project_connection_id: str - :ivar index_name: The name of an index in an IndexResource attached to this agent. - :vartype index_name: str - :ivar query_type: Type of query in an AIIndexResource attached to this agent. Known values are: - "simple", "semantic", "vector", "vector_simple_hybrid", and "vector_semantic_hybrid". - :vartype query_type: Union[str, "AzureAISearchQueryType"] - :ivar top_k: Number of documents to retrieve from search and present to the model. - :vartype top_k: int - :ivar filter: filter string for search resource. `Learn more here - `_. - :vartype filter: str - :ivar index_asset_id: Index asset id for search resource. - :vartype index_asset_id: str - """ - - project_connection_id: str - """An index connection ID in an IndexResource attached to this agent.""" - index_name: str - """The name of an index in an IndexResource attached to this agent.""" - query_type: Union[str, "AzureAISearchQueryType"] - """Type of query in an AIIndexResource attached to this agent. Known values are: \"simple\", - \"semantic\", \"vector\", \"vector_simple_hybrid\", and \"vector_semantic_hybrid\".""" - top_k: int - """Number of documents to retrieve from search and present to the model.""" - filter: str - """filter string for search resource. `Learn more here - `_.""" - index_asset_id: str - """Index asset id for search resource.""" - - -class ApiError(TypedDict, total=False): - """ApiError. - - :ivar code: Required. - :vartype code: str - :ivar message: Required. - :vartype message: str - :ivar param: - :vartype param: str - :ivar type: - :vartype type: str - :ivar details: - :vartype details: list["ApiError"] - :ivar additional_info: - :vartype additional_info: dict[str, Any] - :ivar debug_info: - :vartype debug_info: dict[str, Any] - """ - - code: Required[Optional[str]] - """Required.""" - message: Required[str] - """Required.""" - param: Optional[str] - type: str - details: list["ApiError"] - additionalInfo: dict[str, Any] - debugInfo: dict[str, Any] - - -class ApplyPatchToolParam(TypedDict, total=False): - """Apply patch tool. - - :ivar type: The type of the tool. Always ``apply_patch``. Required. APPLY_PATCH. - :vartype type: Literal[ToolType.APPLY_PATCH] - """ - - type: Required[Literal[ToolType.APPLY_PATCH]] - """The type of the tool. Always ``apply_patch``. Required. APPLY_PATCH.""" - - -class ApproximateLocation(TypedDict, total=False): - """ApproximateLocation. - - :ivar type: The type of location approximation. Always ``approximate``. Required. Default value - is "approximate". - :vartype type: Literal["approximate"] - :ivar country: - :vartype country: str - :ivar region: - :vartype region: str - :ivar city: - :vartype city: str - :ivar timezone: - :vartype timezone: str - """ - - type: Required[Literal["approximate"]] - """The type of location approximation. Always ``approximate``. Required. Default value is - \"approximate\".""" - country: Optional[str] - region: Optional[str] - city: Optional[str] - timezone: Optional[str] - - -class ArtifactProfile(TypedDict, total=False): - """Artifact profile of the model. - - :ivar category: The category of the artifact profile. Required. Known values are: "DataOnly", - "RuntimeDependent", and "Unknown". - :vartype category: Union[str, "FoundryModelArtifactProfileCategory"] - :ivar signals: Signals detected in the model artifact. - :vartype signals: list[Union[str, "FoundryModelArtifactProfileSignal"]] - """ - - category: Required[Union[str, "FoundryModelArtifactProfileCategory"]] - """The category of the artifact profile. Required. Known values are: \"DataOnly\", - \"RuntimeDependent\", and \"Unknown\".""" - signals: list[Union[str, "FoundryModelArtifactProfileSignal"]] - """Signals detected in the model artifact.""" - - -class AutoCodeInterpreterToolParam(TypedDict, total=False): - """Automatic Code Interpreter Tool Parameters. - - :ivar type: Always ``auto``. Required. Default value is "auto". - :vartype type: Literal["auto"] - :ivar file_ids: An optional list of uploaded files to make available to your code. - :vartype file_ids: list[str] - :ivar memory_limit: Known values are: "1g", "4g", "16g", and "64g". - :vartype memory_limit: Union[str, "ContainerMemoryLimit"] - :ivar network_policy: - :vartype network_policy: "ContainerNetworkPolicyParam" - """ - - type: Required[Literal["auto"]] - """Always ``auto``. Required. Default value is \"auto\".""" - file_ids: list[str] - """An optional list of uploaded files to make available to your code.""" - memory_limit: Optional[Union[str, "ContainerMemoryLimit"]] - """Known values are: \"1g\", \"4g\", \"16g\", and \"64g\".""" - network_policy: "ContainerNetworkPolicyParam" - - -class AzureAIAgentTarget(TypedDict, total=False): - """Represents a target specifying an Azure AI agent. - - :ivar type: The type of target, always ``azure_ai_agent``. Required. Default value is - "azure_ai_agent". - :vartype type: Literal["azure_ai_agent"] - :ivar name: The unique identifier of the Azure AI agent. Required. - :vartype name: str - :ivar version: The version of the Azure AI agent. - :vartype version: str - :ivar tool_descriptions: The parameters used to control the sampling behavior of the agent - during text generation. - :vartype tool_descriptions: list["ToolDescription"] - :ivar tools: - :vartype tools: list["Tool"] - """ - - type: Required[Literal["azure_ai_agent"]] - """The type of target, always ``azure_ai_agent``. Required. Default value is \"azure_ai_agent\".""" - name: Required[str] - """The unique identifier of the Azure AI agent. Required.""" - version: str - """The version of the Azure AI agent.""" - tool_descriptions: list["ToolDescription"] - """The parameters used to control the sampling behavior of the agent during text generation.""" - tools: list["Tool"] - - -class AzureAIModelTarget(TypedDict, total=False): - """Represents a target specifying an Azure AI model for operations requiring model selection. - - :ivar type: The type of target, always ``azure_ai_model``. Required. Default value is - "azure_ai_model". - :vartype type: Literal["azure_ai_model"] - :ivar model: The unique identifier of the Azure AI model. - :vartype model: str - :ivar sampling_params: The parameters used to control the sampling behavior of the model during - text generation. - :vartype sampling_params: "ModelSamplingParams" - """ - - type: Required[Literal["azure_ai_model"]] - """The type of target, always ``azure_ai_model``. Required. Default value is \"azure_ai_model\".""" - model: str - """The unique identifier of the Azure AI model.""" - sampling_params: "ModelSamplingParams" - """The parameters used to control the sampling behavior of the model during text generation.""" - - -class AzureAISearchIndex(TypedDict, total=False): - """Azure AI Search Index Definition. - - :ivar id: Asset ID, a unique identifier for the asset. - :vartype id: str - :ivar name: The name of the resource. Required. - :vartype name: str - :ivar version: The version of the resource. Required. - :vartype version: str - :ivar description: The asset description text. - :vartype description: str - :ivar tags: Tag dictionary. Tags can be added, removed, and updated. - :vartype tags: dict[str, str] - :ivar type: Type of index. Required. Azure search. - :vartype type: Literal[IndexType.AZURE_SEARCH] - :ivar connection_name: Name of connection to Azure AI Search. Required. - :vartype connection_name: str - :ivar index_name: Name of index in Azure AI Search resource to attach. Required. - :vartype index_name: str - :ivar field_mapping: Field mapping configuration. - :vartype field_mapping: "FieldMapping" - """ - - id: str - """Asset ID, a unique identifier for the asset.""" - name: Required[str] - """The name of the resource. Required.""" - version: Required[str] - """The version of the resource. Required.""" - description: str - """The asset description text.""" - tags: dict[str, str] - """Tag dictionary. Tags can be added, removed, and updated.""" - type: Required[Literal[IndexType.AZURE_SEARCH]] - """Type of index. Required. Azure search.""" - connectionName: Required[str] - """Name of connection to Azure AI Search. Required.""" - indexName: Required[str] - """Name of index in Azure AI Search resource to attach. Required.""" - fieldMapping: "FieldMapping" - """Field mapping configuration.""" - - -class AzureAISearchTool(TypedDict, total=False): - """The input definition information for an Azure AI search tool as used to configure an agent. - - :ivar type: The object type, which is always 'azure_ai_search'. Required. AZURE_AI_SEARCH. - :vartype type: Literal[ToolType.AZURE_AI_SEARCH] - :ivar name: Deprecated. This property is deprecated and will be removed in a future version. - :vartype name: str - :ivar description: Deprecated. This property is deprecated and will be removed in a future - version. - :vartype description: str - :ivar tool_configs: Deprecated. This property is deprecated and will be removed in a future - version. - :vartype tool_configs: dict[str, "ToolConfig"] - :ivar azure_ai_search: The azure ai search index resource. Required. - :vartype azure_ai_search: "AzureAISearchToolResource" - """ - - type: Required[Literal[ToolType.AZURE_AI_SEARCH]] - """The object type, which is always 'azure_ai_search'. Required. AZURE_AI_SEARCH.""" - name: str - """Deprecated. This property is deprecated and will be removed in a future version.""" - description: str - """Deprecated. This property is deprecated and will be removed in a future version.""" - tool_configs: dict[str, "ToolConfig"] - """Deprecated. This property is deprecated and will be removed in a future version.""" - azure_ai_search: Required["AzureAISearchToolResource"] - """The azure ai search index resource. Required.""" - - -class AzureAISearchToolboxTool(TypedDict, total=False): - """An Azure AI Search tool stored in a toolbox. - - :ivar name: Optional user-defined name for this tool or configuration. - :vartype name: str - :ivar description: Optional user-defined description for this tool or configuration. - :vartype description: str - :ivar tool_configs: Per-tool configuration map. Keys are tool names or ``*`` (catch-all - default). Resolution order: exact tool name match takes priority over ``*``. Unknown tool names - are silently ignored at runtime. - :vartype tool_configs: dict[str, "ToolConfig"] - :ivar type: Required. AZURE_AI_SEARCH. - :vartype type: Literal[ToolboxToolType.AZURE_AI_SEARCH] - :ivar azure_ai_search: The azure ai search index resource. Required. - :vartype azure_ai_search: "AzureAISearchToolResource" - """ - - name: str - """Optional user-defined name for this tool or configuration.""" - description: str - """Optional user-defined description for this tool or configuration.""" - tool_configs: dict[str, "ToolConfig"] - """Per-tool configuration map. Keys are tool names or ``*`` (catch-all default). Resolution order: - exact tool name match takes priority over ``*``. Unknown tool names are silently ignored at - runtime.""" - type: Required[Literal[ToolboxToolType.AZURE_AI_SEARCH]] - """Required. AZURE_AI_SEARCH.""" - azure_ai_search: Required["AzureAISearchToolResource"] - """The azure ai search index resource. Required.""" - - -class AzureAISearchToolResource(TypedDict, total=False): - """A set of index resources used by the ``azure_ai_search`` tool. - - :ivar indexes: The indices attached to this agent. There can be a maximum of 1 index resource - attached to the agent. Required. - :vartype indexes: list["AISearchIndexResource"] - """ - - indexes: Required[list["AISearchIndexResource"]] - """The indices attached to this agent. There can be a maximum of 1 index resource attached to the - agent. Required.""" - - -class AzureFunctionBinding(TypedDict, total=False): - """The structure for keeping storage queue name and URI. - - :ivar type: The type of binding, which is always 'storage_queue'. Required. Default value is - "storage_queue". - :vartype type: Literal["storage_queue"] - :ivar storage_queue: Storage queue. Required. - :vartype storage_queue: "AzureFunctionStorageQueue" - """ - - type: Required[Literal["storage_queue"]] - """The type of binding, which is always 'storage_queue'. Required. Default value is - \"storage_queue\".""" - storage_queue: Required["AzureFunctionStorageQueue"] - """Storage queue. Required.""" - - -class AzureFunctionDefinition(TypedDict, total=False): - """The definition of Azure function. - - :ivar function: The definition of azure function and its parameters. Required. - :vartype function: "AzureFunctionDefinitionFunction" - :ivar input_binding: Input storage queue. The queue storage trigger runs a function as messages - are added to it. Required. - :vartype input_binding: "AzureFunctionBinding" - :ivar output_binding: Output storage queue. The function writes output to this queue when the - input items are processed. Required. - :vartype output_binding: "AzureFunctionBinding" - """ - - function: Required["AzureFunctionDefinitionFunction"] - """The definition of azure function and its parameters. Required.""" - input_binding: Required["AzureFunctionBinding"] - """Input storage queue. The queue storage trigger runs a function as messages are added to it. - Required.""" - output_binding: Required["AzureFunctionBinding"] - """Output storage queue. The function writes output to this queue when the input items are - processed. Required.""" - - -class AzureFunctionDefinitionFunction(TypedDict, total=False): - """AzureFunctionDefinitionFunction. - - :ivar name: The name of the function to be called. Required. - :vartype name: str - :ivar description: A description of what the function does, used by the model to choose when - and how to call the function. - :vartype description: str - :ivar parameters: The parameters the functions accepts, described as a JSON Schema object. - Required. - :vartype parameters: dict[str, Any] - """ - - name: Required[str] - """The name of the function to be called. Required.""" - description: str - """A description of what the function does, used by the model to choose when and how to call the - function.""" - parameters: Required[dict[str, Any]] - """The parameters the functions accepts, described as a JSON Schema object. Required.""" - - -class AzureFunctionStorageQueue(TypedDict, total=False): - """The structure for keeping storage queue name and URI. - - :ivar queue_service_endpoint: URI to the Azure Storage Queue service allowing you to manipulate - a queue. Required. - :vartype queue_service_endpoint: str - :ivar queue_name: The name of an Azure function storage queue. Required. - :vartype queue_name: str - """ - - queue_service_endpoint: Required[str] - """URI to the Azure Storage Queue service allowing you to manipulate a queue. Required.""" - queue_name: Required[str] - """The name of an Azure function storage queue. Required.""" - - -class AzureFunctionTool(TypedDict, total=False): - """The input definition information for an Azure Function Tool, as used to configure an Agent. - - :ivar type: The object type, which is always 'browser_automation'. Required. AZURE_FUNCTION. - :vartype type: Literal[ToolType.AZURE_FUNCTION] - :ivar tool_configs: Deprecated. This property is deprecated and will be removed in a future - version. - :vartype tool_configs: dict[str, "ToolConfig"] - :ivar azure_function: The Azure Function Tool definition. Required. - :vartype azure_function: "AzureFunctionDefinition" - """ - - type: Required[Literal[ToolType.AZURE_FUNCTION]] - """The object type, which is always 'browser_automation'. Required. AZURE_FUNCTION.""" - tool_configs: dict[str, "ToolConfig"] - """Deprecated. This property is deprecated and will be removed in a future version.""" - azure_function: Required["AzureFunctionDefinition"] - """The Azure Function Tool definition. Required.""" - - -class AzureOpenAIModelConfiguration(TypedDict, total=False): - """Azure OpenAI model configuration. The API version would be selected by the service for querying - the model. - - :ivar type: Required. Default value is "AzureOpenAIModel". - :vartype type: Literal["AzureOpenAIModel"] - :ivar model_deployment_name: Deployment name for AOAI model. Example: gpt-4o if in AIServices - or connection based ``connection_name/deployment_name`` (e.g. ``my-aoai-connection/gpt-4o``). - Required. - :vartype model_deployment_name: str - """ - - type: Required[Literal["AzureOpenAIModel"]] - """Required. Default value is \"AzureOpenAIModel\".""" - modelDeploymentName: Required[str] - """Deployment name for AOAI model. Example: gpt-4o if in AIServices or connection based - ``connection_name/deployment_name`` (e.g. ``my-aoai-connection/gpt-4o``). Required.""" - - -class BingCustomSearchConfiguration(TypedDict, total=False): - """A bing custom search configuration. - - :ivar project_connection_id: Project connection id for grounding with bing search. Required. - :vartype project_connection_id: str - :ivar instance_name: Name of the custom configuration instance given to config. Required. - :vartype instance_name: str - :ivar market: The market where the results come from. - :vartype market: str - :ivar set_lang: The language to use for user interface strings when calling Bing API. - :vartype set_lang: str - :ivar count: The number of search results to return in the bing api response. - :vartype count: int - :ivar freshness: Filter search results by a specific time range. See `accepted values here - `_. - :vartype freshness: str - """ - - project_connection_id: Required[str] - """Project connection id for grounding with bing search. Required.""" - instance_name: Required[str] - """Name of the custom configuration instance given to config. Required.""" - market: str - """The market where the results come from.""" - set_lang: str - """The language to use for user interface strings when calling Bing API.""" - count: int - """The number of search results to return in the bing api response.""" - freshness: str - """Filter search results by a specific time range. See `accepted values here - `_.""" - - -class BingCustomSearchPreviewTool(TypedDict, total=False): - """The input definition information for a Bing custom search tool as used to configure an agent. - - :ivar type: The object type, which is always 'bing_custom_search_preview'. Required. - BING_CUSTOM_SEARCH_PREVIEW. - :vartype type: Literal[ToolType.BING_CUSTOM_SEARCH_PREVIEW] - :ivar bing_custom_search_preview: The bing custom search tool parameters. Required. - :vartype bing_custom_search_preview: "BingCustomSearchToolParameters" - """ - - type: Required[Literal[ToolType.BING_CUSTOM_SEARCH_PREVIEW]] - """The object type, which is always 'bing_custom_search_preview'. Required. - BING_CUSTOM_SEARCH_PREVIEW.""" - bing_custom_search_preview: Required["BingCustomSearchToolParameters"] - """The bing custom search tool parameters. Required.""" - - -class BingCustomSearchToolParameters(TypedDict, total=False): - """The bing custom search tool parameters. - - :ivar search_configurations: The project connections attached to this tool. There can be a - maximum of 1 connection resource attached to the tool. Required. - :vartype search_configurations: list["BingCustomSearchConfiguration"] - """ - - search_configurations: Required[list["BingCustomSearchConfiguration"]] - """The project connections attached to this tool. There can be a maximum of 1 connection resource - attached to the tool. Required.""" - - -class BingGroundingSearchConfiguration(TypedDict, total=False): - """Search configuration for Bing Grounding. - - :ivar project_connection_id: Project connection id for grounding with bing search. Required. - :vartype project_connection_id: str - :ivar market: The market where the results come from. - :vartype market: str - :ivar set_lang: The language to use for user interface strings when calling Bing API. - :vartype set_lang: str - :ivar count: The number of search results to return in the bing api response. - :vartype count: int - :ivar freshness: Filter search results by a specific time range. See `accepted values here - `_. - :vartype freshness: str - """ - - project_connection_id: Required[str] - """Project connection id for grounding with bing search. Required.""" - market: str - """The market where the results come from.""" - set_lang: str - """The language to use for user interface strings when calling Bing API.""" - count: int - """The number of search results to return in the bing api response.""" - freshness: str - """Filter search results by a specific time range. See `accepted values here - `_.""" - - -class BingGroundingSearchToolParameters(TypedDict, total=False): - """The bing grounding search tool parameters. - - :ivar search_configurations: The search configurations attached to this tool. There can be a - maximum of 1 search configuration resource attached to the tool. Required. - :vartype search_configurations: list["BingGroundingSearchConfiguration"] - """ - - search_configurations: Required[list["BingGroundingSearchConfiguration"]] - """The search configurations attached to this tool. There can be a maximum of 1 search - configuration resource attached to the tool. Required.""" - - -class BingGroundingTool(TypedDict, total=False): - """The input definition information for a bing grounding search tool as used to configure an - agent. - - :ivar type: The object type, which is always 'bing_grounding'. Required. BING_GROUNDING. - :vartype type: Literal[ToolType.BING_GROUNDING] - :ivar name: Deprecated. This property is deprecated and will be removed in a future version. - :vartype name: str - :ivar description: Deprecated. This property is deprecated and will be removed in a future - version. - :vartype description: str - :ivar tool_configs: Deprecated. This property is deprecated and will be removed in a future - version. - :vartype tool_configs: dict[str, "ToolConfig"] - :ivar bing_grounding: The bing grounding search tool parameters. Required. - :vartype bing_grounding: "BingGroundingSearchToolParameters" - """ - - type: Required[Literal[ToolType.BING_GROUNDING]] - """The object type, which is always 'bing_grounding'. Required. BING_GROUNDING.""" - name: str - """Deprecated. This property is deprecated and will be removed in a future version.""" - description: str - """Deprecated. This property is deprecated and will be removed in a future version.""" - tool_configs: dict[str, "ToolConfig"] - """Deprecated. This property is deprecated and will be removed in a future version.""" - bing_grounding: Required["BingGroundingSearchToolParameters"] - """The bing grounding search tool parameters. Required.""" - - -class BotServiceAuthorizationScheme(TypedDict, total=False): - """BotServiceAuthorizationScheme. - - :ivar type: Required. BOT_SERVICE. - :vartype type: Literal[AgentEndpointAuthorizationSchemeType.BOT_SERVICE] - """ - - type: Required[Literal[AgentEndpointAuthorizationSchemeType.BOT_SERVICE]] - """Required. BOT_SERVICE.""" - - -class BotServiceRbacAuthorizationScheme(TypedDict, total=False): - """BotServiceRbacAuthorizationScheme. - - :ivar type: Required. BOT_SERVICE_RBAC. - :vartype type: Literal[AgentEndpointAuthorizationSchemeType.BOT_SERVICE_RBAC] - """ - - type: Required[Literal[AgentEndpointAuthorizationSchemeType.BOT_SERVICE_RBAC]] - """Required. BOT_SERVICE_RBAC.""" - - -class BotServiceTenantAuthorizationScheme(TypedDict, total=False): - """BotServiceTenantAuthorizationScheme. - - :ivar type: Required. BOT_SERVICE_TENANT. - :vartype type: Literal[AgentEndpointAuthorizationSchemeType.BOT_SERVICE_TENANT] - """ - - type: Required[Literal[AgentEndpointAuthorizationSchemeType.BOT_SERVICE_TENANT]] - """Required. BOT_SERVICE_TENANT.""" - - -class BrowserAutomationPreviewTool(TypedDict, total=False): - """The input definition information for a Browser Automation Tool, as used to configure an Agent. - - :ivar type: The object type, which is always 'browser_automation_preview'. Required. - BROWSER_AUTOMATION_PREVIEW. - :vartype type: Literal[ToolType.BROWSER_AUTOMATION_PREVIEW] - :ivar browser_automation_preview: The Browser Automation Tool parameters. Required. - :vartype browser_automation_preview: "BrowserAutomationToolParameters" - """ - - type: Required[Literal[ToolType.BROWSER_AUTOMATION_PREVIEW]] - """The object type, which is always 'browser_automation_preview'. Required. - BROWSER_AUTOMATION_PREVIEW.""" - browser_automation_preview: Required["BrowserAutomationToolParameters"] - """The Browser Automation Tool parameters. Required.""" - - -class BrowserAutomationPreviewToolboxTool(TypedDict, total=False): - """A browser automation tool stored in a toolbox. - - :ivar name: Optional user-defined name for this tool or configuration. - :vartype name: str - :ivar description: Optional user-defined description for this tool or configuration. - :vartype description: str - :ivar tool_configs: Per-tool configuration map. Keys are tool names or ``*`` (catch-all - default). Resolution order: exact tool name match takes priority over ``*``. Unknown tool names - are silently ignored at runtime. - :vartype tool_configs: dict[str, "ToolConfig"] - :ivar type: Required. BROWSER_AUTOMATION_PREVIEW. - :vartype type: Literal[ToolboxToolType.BROWSER_AUTOMATION_PREVIEW] - :ivar browser_automation_preview: The Browser Automation Tool parameters. Required. - :vartype browser_automation_preview: "BrowserAutomationToolParameters" - """ - - name: str - """Optional user-defined name for this tool or configuration.""" - description: str - """Optional user-defined description for this tool or configuration.""" - tool_configs: dict[str, "ToolConfig"] - """Per-tool configuration map. Keys are tool names or ``*`` (catch-all default). Resolution order: - exact tool name match takes priority over ``*``. Unknown tool names are silently ignored at - runtime.""" - type: Required[Literal[ToolboxToolType.BROWSER_AUTOMATION_PREVIEW]] - """Required. BROWSER_AUTOMATION_PREVIEW.""" - browser_automation_preview: Required["BrowserAutomationToolParameters"] - """The Browser Automation Tool parameters. Required.""" - - -class BrowserAutomationToolConnectionParameters(TypedDict, total=False): # pylint: disable=name-too-long - """Definition of input parameters for the connection used by the Browser Automation Tool. - - :ivar project_connection_id: The ID of the project connection to your Azure Playwright - resource. Required. - :vartype project_connection_id: str - """ - - project_connection_id: Required[str] - """The ID of the project connection to your Azure Playwright resource. Required.""" - - -class BrowserAutomationToolParameters(TypedDict, total=False): - """Definition of input parameters for the Browser Automation Tool. - - :ivar connection: The project connection parameters associated with the Browser Automation - Tool. Required. - :vartype connection: "BrowserAutomationToolConnectionParameters" - """ - - connection: Required["BrowserAutomationToolConnectionParameters"] - """The project connection parameters associated with the Browser Automation Tool. Required.""" - - -class CaptureStructuredOutputsTool(TypedDict, total=False): - """A tool for capturing structured outputs. - - :ivar type: The type of the tool. Always ``capture_structured_outputs``. Required. - CAPTURE_STRUCTURED_OUTPUTS. - :vartype type: Literal[ToolType.CAPTURE_STRUCTURED_OUTPUTS] - :ivar name: Deprecated. This property is deprecated and will be removed in a future version. - :vartype name: str - :ivar description: Deprecated. This property is deprecated and will be removed in a future - version. - :vartype description: str - :ivar tool_configs: Deprecated. This property is deprecated and will be removed in a future - version. - :vartype tool_configs: dict[str, "ToolConfig"] - :ivar outputs: The structured outputs to capture from the model. Required. - :vartype outputs: "StructuredOutputDefinition" - """ - - type: Required[Literal[ToolType.CAPTURE_STRUCTURED_OUTPUTS]] - """The type of the tool. Always ``capture_structured_outputs``. Required. - CAPTURE_STRUCTURED_OUTPUTS.""" - name: str - """Deprecated. This property is deprecated and will be removed in a future version.""" - description: str - """Deprecated. This property is deprecated and will be removed in a future version.""" - tool_configs: dict[str, "ToolConfig"] - """Deprecated. This property is deprecated and will be removed in a future version.""" - outputs: Required["StructuredOutputDefinition"] - """The structured outputs to capture from the model. Required.""" - - -class ChartCoordinate(TypedDict, total=False): - """Coordinates for the analysis chart. - - :ivar x: X-axis coordinate. Required. - :vartype x: int - :ivar y: Y-axis coordinate. Required. - :vartype y: int - :ivar size: Size of the chart element. Required. - :vartype size: int - """ - - x: Required[int] - """X-axis coordinate. Required.""" - y: Required[int] - """Y-axis coordinate. Required.""" - size: Required[int] - """Size of the chart element. Required.""" - - -class ClusterInsightResult(TypedDict, total=False): - """Insights from the cluster analysis. - - :ivar summary: Summary of the insights report. Required. - :vartype summary: "InsightSummary" - :ivar clusters: List of clusters identified in the insights. Required. - :vartype clusters: list["InsightCluster"] - :ivar coordinates: Optional mapping of IDs to 2D coordinates used by the UX for - visualization. - - The map keys are string identifiers (for example, a cluster id or a sample id) - and the values are the coordinates and visual size for rendering on a 2D chart. - - This property is omitted unless the client requests coordinates (for example, - by passing ``includeCoordinates=true`` as a query parameter). - - Example: - - .. code-block:: - - { - "cluster-1": { "x": 12, "y": 34, "size": 8 }, - "sample-123": { "x": 18, "y": 22, "size": 4 } - } - - Coordinates are intended only for client-side visualization and do not - modify the canonical insights results. - :vartype coordinates: dict[str, "ChartCoordinate"] - """ - - summary: Required["InsightSummary"] - """Summary of the insights report. Required.""" - clusters: Required[list["InsightCluster"]] - """List of clusters identified in the insights. Required.""" - coordinates: dict[str, "ChartCoordinate"] - """ Optional mapping of IDs to 2D coordinates used by the UX for visualization. - - The map keys are string identifiers (for example, a cluster id or a sample id) - and the values are the coordinates and visual size for rendering on a 2D chart. - - This property is omitted unless the client requests coordinates (for example, - by passing ``includeCoordinates=true`` as a query parameter). - - Example: - - .. code-block:: - - { - \"cluster-1\": { \"x\": 12, \"y\": 34, \"size\": 8 }, - \"sample-123\": { \"x\": 18, \"y\": 22, \"size\": 4 } - } - - Coordinates are intended only for client-side visualization and do not - modify the canonical insights results.""" - - -class ClusterTokenUsage(TypedDict, total=False): - """Token usage for cluster analysis. - - :ivar input_token_usage: input token usage. Required. - :vartype input_token_usage: int - :ivar output_token_usage: output token usage. Required. - :vartype output_token_usage: int - :ivar total_token_usage: total token usage. Required. - :vartype total_token_usage: int - """ - - inputTokenUsage: Required[int] - """input token usage. Required.""" - outputTokenUsage: Required[int] - """output token usage. Required.""" - totalTokenUsage: Required[int] - """total token usage. Required.""" - - -class CodeBasedEvaluatorDefinition(TypedDict, total=False): - """Code-based evaluator definition using python code. - - :ivar init_parameters: The JSON schema (Draft 2020-12) for the evaluator's input parameters. - This includes parameters like type, properties, required. - :vartype init_parameters: dict[str, Any] - :ivar data_schema: The JSON schema (Draft 2020-12) for the evaluator's input data. This - includes parameters like type, properties, required. - :vartype data_schema: dict[str, Any] - :ivar metrics: List of output metrics produced by this evaluator. - :vartype metrics: dict[str, "EvaluatorMetric"] - :ivar type: Required. Code-based definition. - :vartype type: Literal[EvaluatorDefinitionType.CODE] - :ivar code_text: Inline code text for the evaluator. - :vartype code_text: str - :ivar entry_point: The entry point Python file name for the uploaded evaluator code (e.g. - 'answer_length_evaluator.py'). - :vartype entry_point: str - :ivar image_tag: The container image tag to use for evaluator code execution. - :vartype image_tag: str - :ivar blob_uri: The blob URI for the evaluator storage. - :vartype blob_uri: str - """ - - init_parameters: dict[str, Any] - """The JSON schema (Draft 2020-12) for the evaluator's input parameters. This includes parameters - like type, properties, required.""" - data_schema: dict[str, Any] - """The JSON schema (Draft 2020-12) for the evaluator's input data. This includes parameters like - type, properties, required.""" - metrics: dict[str, "EvaluatorMetric"] - """List of output metrics produced by this evaluator.""" - type: Required[Literal[EvaluatorDefinitionType.CODE]] - """Required. Code-based definition.""" - code_text: str - """Inline code text for the evaluator.""" - entry_point: str - """The entry point Python file name for the uploaded evaluator code (e.g. - 'answer_length_evaluator.py').""" - image_tag: str - """The container image tag to use for evaluator code execution.""" - blob_uri: str - """The blob URI for the evaluator storage.""" - - -class CodeConfiguration(TypedDict, total=False): - """Code-based deployment configuration for a hosted agent. - - :ivar runtime: The runtime identifier for code execution (e.g., 'python_3_11', 'python_3_12', - 'python_3_13'). Required. - :vartype runtime: str - :ivar entry_point: The entry point command and arguments for the code execution. Required. - :vartype entry_point: list[str] - :ivar dependency_resolution: How package dependencies are resolved at deployment time. Defaults - to ``bundled``, where the caller bundles all dependencies into the uploaded zip and the service - performs no remote build. ``remote_build`` instructs the service to build dependencies remotely - from the manifest included in the uploaded zip. Required. Known values are: "bundled" and - "remote_build". - :vartype dependency_resolution: Union[str, "CodeDependencyResolution"] - :ivar content_hash: The SHA-256 hex digest of the uploaded code zip. Set by the service from - the ``x-ms-code-zip-sha256`` request header; read-only in responses and never accepted in - request payloads. - :vartype content_hash: str - """ - - runtime: Required[str] - """The runtime identifier for code execution (e.g., 'python_3_11', 'python_3_12', 'python_3_13'). - Required.""" - entry_point: Required[list[str]] - """The entry point command and arguments for the code execution. Required.""" - dependency_resolution: Required[Union[str, "CodeDependencyResolution"]] - """How package dependencies are resolved at deployment time. Defaults to ``bundled``, where the - caller bundles all dependencies into the uploaded zip and the service performs no remote build. - ``remote_build`` instructs the service to build dependencies remotely from the manifest - included in the uploaded zip. Required. Known values are: \"bundled\" and \"remote_build\".""" - content_hash: str - """The SHA-256 hex digest of the uploaded code zip. Set by the service from the - ``x-ms-code-zip-sha256`` request header; read-only in responses and never accepted in request - payloads.""" - - -class CodeInterpreterTool(TypedDict, total=False): - """Code interpreter. - - :ivar type: The type of the code interpreter tool. Always ``code_interpreter``. Required. - CODE_INTERPRETER. - :vartype type: Literal[ToolType.CODE_INTERPRETER] - :ivar name: Deprecated. This property is deprecated and will be removed in a future version. - :vartype name: str - :ivar description: Deprecated. This property is deprecated and will be removed in a future - version. - :vartype description: str - :ivar tool_configs: Deprecated. This property is deprecated and will be removed in a future - version. - :vartype tool_configs: dict[str, "ToolConfig"] - :ivar container: The code interpreter container. Can be a container ID or an object that - specifies uploaded file IDs to make available to your code, along with an optional - ``memory_limit`` setting. If not provided, the service assumes auto. Is either a str type or a - AutoCodeInterpreterToolParam type. - :vartype container: Union[str, "AutoCodeInterpreterToolParam"] - """ - - type: Required[Literal[ToolType.CODE_INTERPRETER]] - """The type of the code interpreter tool. Always ``code_interpreter``. Required. CODE_INTERPRETER.""" - name: str - """Deprecated. This property is deprecated and will be removed in a future version.""" - description: str - """Deprecated. This property is deprecated and will be removed in a future version.""" - tool_configs: dict[str, "ToolConfig"] - """Deprecated. This property is deprecated and will be removed in a future version.""" - container: Union[str, "AutoCodeInterpreterToolParam"] - """The code interpreter container. Can be a container ID or an object that specifies uploaded file - IDs to make available to your code, along with an optional ``memory_limit`` setting. If not - provided, the service assumes auto. Is either a str type or a AutoCodeInterpreterToolParam - type.""" - - -class CodeInterpreterToolboxTool(TypedDict, total=False): - """A code interpreter tool stored in a toolbox. - - :ivar name: Optional user-defined name for this tool or configuration. - :vartype name: str - :ivar description: Optional user-defined description for this tool or configuration. - :vartype description: str - :ivar tool_configs: Per-tool configuration map. Keys are tool names or ``*`` (catch-all - default). Resolution order: exact tool name match takes priority over ``*``. Unknown tool names - are silently ignored at runtime. - :vartype tool_configs: dict[str, "ToolConfig"] - :ivar type: Required. CODE_INTERPRETER. - :vartype type: Literal[ToolboxToolType.CODE_INTERPRETER] - :ivar container: The code interpreter container. Can be a container ID or an object that - specifies uploaded file IDs to make available to your code, along with an optional - ``memory_limit`` setting. If not provided, the service assumes auto. Is either a str type or a - AutoCodeInterpreterToolParam type. - :vartype container: Union[str, "AutoCodeInterpreterToolParam"] - """ - - name: str - """Optional user-defined name for this tool or configuration.""" - description: str - """Optional user-defined description for this tool or configuration.""" - tool_configs: dict[str, "ToolConfig"] - """Per-tool configuration map. Keys are tool names or ``*`` (catch-all default). Resolution order: - exact tool name match takes priority over ``*``. Unknown tool names are silently ignored at - runtime.""" - type: Required[Literal[ToolboxToolType.CODE_INTERPRETER]] - """Required. CODE_INTERPRETER.""" - container: Union[str, "AutoCodeInterpreterToolParam"] - """The code interpreter container. Can be a container ID or an object that specifies uploaded file - IDs to make available to your code, along with an optional ``memory_limit`` setting. If not - provided, the service assumes auto. Is either a str type or a AutoCodeInterpreterToolParam - type.""" - - -class ComparisonFilter(TypedDict, total=False): - """Comparison Filter. - - :ivar type: Specifies the comparison operator: ``eq``, ``ne``, ``gt``, ``gte``, ``lt``, - ``lte``, ``in``, ``nin``. - - * `eq`: equals - * `ne`: not equal - * `gt`: greater than - * `gte`: greater than or equal - * `lt`: less than - * `lte`: less than or equal - * `in`: in - * `nin`: not in. Required. Is one of the following types: Literal["eq"], Literal["ne"], - Literal["gt"], Literal["gte"], Literal["lt"], Literal["lte"], Literal["in"], Literal["nin"] - :vartype type: Literal["eq", "ne", "gt", "gte", "lt", "lte", "in", "nin"] - :ivar key: The key to compare against the value. Required. - :vartype key: str - :ivar value: The value to compare against the attribute key; supports string, number, or - boolean types. Required. Is one of the following types: str, float, bool, [Union[str, float]] - :vartype value: Union[str, float, bool, list[Union[str, float]]] - """ - - type: Required[Literal["eq", "ne", "gt", "gte", "lt", "lte", "in", "nin"]] - """Specifies the comparison operator: ``eq``, ``ne``, ``gt``, ``gte``, ``lt``, ``lte``, ``in``, - ``nin``. - - * `eq`: equals - * `ne`: not equal - * `gt`: greater than - * `gte`: greater than or equal - * `lt`: less than - * `lte`: less than or equal - * `in`: in - * `nin`: not in. Required. Is one of the following types: Literal[\"eq\"], - Literal[\"ne\"], Literal[\"gt\"], Literal[\"gte\"], Literal[\"lt\"], Literal[\"lte\"], - Literal[\"in\"], Literal[\"nin\"]""" - key: Required[str] - """The key to compare against the value. Required.""" - value: Required[Union[str, float, bool, list[Union[str, float]]]] - """The value to compare against the attribute key; supports string, number, or boolean types. - Required. Is one of the following types: str, float, bool, [Union[str, float]]""" - - -class CompoundFilter(TypedDict, total=False): - """Compound Filter. - - :ivar type: Type of operation: ``and`` or ``or``. Required. Is either a Literal["and"] type or - a Literal["or"] type. - :vartype type: Literal["and", "or"] - :ivar filters: Array of filters to combine. Items can be ``ComparisonFilter`` or - ``CompoundFilter``. Required. - :vartype filters: list[Union["ComparisonFilter", Any]] - """ - - type: Required[Literal["and", "or"]] - """Type of operation: ``and`` or ``or``. Required. Is either a Literal[\"and\"] type or a - Literal[\"or\"] type.""" - filters: Required[list[Union["ComparisonFilter", Any]]] - """Array of filters to combine. Items can be ``ComparisonFilter`` or ``CompoundFilter``. Required.""" - - -class ComputerTool(TypedDict, total=False): - """Computer. - - :ivar type: The type of the computer tool. Always ``computer``. Required. COMPUTER. - :vartype type: Literal[ToolType.COMPUTER] - """ - - type: Required[Literal[ToolType.COMPUTER]] - """The type of the computer tool. Always ``computer``. Required. COMPUTER.""" - - -class ComputerUsePreviewTool(TypedDict, total=False): - """Computer use preview. - - :ivar type: The type of the computer use tool. Always ``computer_use_preview``. Required. - COMPUTER_USE_PREVIEW. - :vartype type: Literal[ToolType.COMPUTER_USE_PREVIEW] - :ivar environment: The type of computer environment to control. Required. Known values are: - "windows", "mac", "linux", "ubuntu", and "browser". - :vartype environment: Union[str, "ComputerEnvironment"] - :ivar display_width: The width of the computer display. Required. - :vartype display_width: int - :ivar display_height: The height of the computer display. Required. - :vartype display_height: int - """ - - type: Required[Literal[ToolType.COMPUTER_USE_PREVIEW]] - """The type of the computer use tool. Always ``computer_use_preview``. Required. - COMPUTER_USE_PREVIEW.""" - environment: Required[Union[str, "ComputerEnvironment"]] - """The type of computer environment to control. Required. Known values are: \"windows\", \"mac\", - \"linux\", \"ubuntu\", and \"browser\".""" - display_width: Required[int] - """The width of the computer display. Required.""" - display_height: Required[int] - """The height of the computer display. Required.""" - - -class ContainerAutoParam(TypedDict, total=False): - """ContainerAutoParam. - - :ivar type: Automatically creates a container for this request. Required. CONTAINER_AUTO. - :vartype type: Literal[FunctionShellToolParamEnvironmentType.CONTAINER_AUTO] - :ivar file_ids: An optional list of uploaded files to make available to your code. - :vartype file_ids: list[str] - :ivar memory_limit: Known values are: "1g", "4g", "16g", and "64g". - :vartype memory_limit: Union[str, "ContainerMemoryLimit"] - :ivar skills: An optional list of skills referenced by id or inline data. - :vartype skills: list["ContainerSkill"] - :ivar network_policy: - :vartype network_policy: "ContainerNetworkPolicyParam" - """ - - type: Required[Literal[FunctionShellToolParamEnvironmentType.CONTAINER_AUTO]] - """Automatically creates a container for this request. Required. CONTAINER_AUTO.""" - file_ids: list[str] - """An optional list of uploaded files to make available to your code.""" - memory_limit: Optional[Union[str, "ContainerMemoryLimit"]] - """Known values are: \"1g\", \"4g\", \"16g\", and \"64g\".""" - skills: list["ContainerSkill"] - """An optional list of skills referenced by id or inline data.""" - network_policy: "ContainerNetworkPolicyParam" - - -class ContainerConfiguration(TypedDict, total=False): - """Container-based deployment configuration for a hosted agent. - - :ivar image: The container image for the hosted agent. Required. - :vartype image: str - """ - - image: Required[str] - """The container image for the hosted agent. Required.""" - - -class ContainerNetworkPolicyAllowlistParam(TypedDict, total=False): - """ContainerNetworkPolicyAllowlistParam. - - :ivar type: Allow outbound network access only to specified domains. Always ``allowlist``. - Required. ALLOWLIST. - :vartype type: Literal[ContainerNetworkPolicyParamType.ALLOWLIST] - :ivar allowed_domains: A list of allowed domains when type is ``allowlist``. Required. - :vartype allowed_domains: list[str] - :ivar domain_secrets: Optional domain-scoped secrets for allowlisted domains. - :vartype domain_secrets: list["ContainerNetworkPolicyDomainSecretParam"] - """ - - type: Required[Literal[ContainerNetworkPolicyParamType.ALLOWLIST]] - """Allow outbound network access only to specified domains. Always ``allowlist``. Required. - ALLOWLIST.""" - allowed_domains: Required[list[str]] - """A list of allowed domains when type is ``allowlist``. Required.""" - domain_secrets: list["ContainerNetworkPolicyDomainSecretParam"] - """Optional domain-scoped secrets for allowlisted domains.""" - - -class ContainerNetworkPolicyDisabledParam(TypedDict, total=False): - """ContainerNetworkPolicyDisabledParam. - - :ivar type: Disable outbound network access. Always ``disabled``. Required. DISABLED. - :vartype type: Literal[ContainerNetworkPolicyParamType.DISABLED] - """ - - type: Required[Literal[ContainerNetworkPolicyParamType.DISABLED]] - """Disable outbound network access. Always ``disabled``. Required. DISABLED.""" - - -class ContainerNetworkPolicyDomainSecretParam(TypedDict, total=False): - """ContainerNetworkPolicyDomainSecretParam. - - :ivar domain: The domain associated with the secret. Required. - :vartype domain: str - :ivar name: The name of the secret to inject for the domain. Required. - :vartype name: str - :ivar value: The secret value to inject for the domain. Required. - :vartype value: str - """ - - domain: Required[str] - """The domain associated with the secret. Required.""" - name: Required[str] - """The name of the secret to inject for the domain. Required.""" - value: Required[str] - """The secret value to inject for the domain. Required.""" - - -class ContinuousEvaluationRuleAction(TypedDict, total=False): - """Evaluation rule action for continuous evaluation. - - :ivar type: Required. Continuous evaluation. - :vartype type: Literal[EvaluationRuleActionType.CONTINUOUS_EVALUATION] - :ivar eval_id: Eval Id to add continuous evaluation runs to. Required. - :vartype eval_id: str - :ivar max_hourly_runs: Maximum number of evaluation runs allowed per hour. - :vartype max_hourly_runs: int - :ivar sampling_rate: Percentage (0-100] chance that a matching event triggers an evaluation. - When omitted, the service-default is to evaluate every event, which is equivalent to setting a - sampling rate of 100. - :vartype sampling_rate: float - """ - - type: Required[Literal[EvaluationRuleActionType.CONTINUOUS_EVALUATION]] - """Required. Continuous evaluation.""" - evalId: Required[str] - """Eval Id to add continuous evaluation runs to. Required.""" - maxHourlyRuns: int - """Maximum number of evaluation runs allowed per hour.""" - samplingRate: float - """Percentage (0-100] chance that a matching event triggers an evaluation. When omitted, the - service-default is to evaluate every event, which is equivalent to setting a sampling rate of - 100.""" - - -class CosmosDBIndex(TypedDict, total=False): - """CosmosDB Vector Store Index Definition. - - :ivar id: Asset ID, a unique identifier for the asset. - :vartype id: str - :ivar name: The name of the resource. Required. - :vartype name: str - :ivar version: The version of the resource. Required. - :vartype version: str - :ivar description: The asset description text. - :vartype description: str - :ivar tags: Tag dictionary. Tags can be added, removed, and updated. - :vartype tags: dict[str, str] - :ivar type: Type of index. Required. CosmosDB. - :vartype type: Literal[IndexType.COSMOS_DB] - :ivar connection_name: Name of connection to CosmosDB. Required. - :vartype connection_name: str - :ivar database_name: Name of the CosmosDB Database. Required. - :vartype database_name: str - :ivar container_name: Name of CosmosDB Container. Required. - :vartype container_name: str - :ivar embedding_configuration: Embedding model configuration. Required. - :vartype embedding_configuration: "EmbeddingConfiguration" - :ivar field_mapping: Field mapping configuration. Required. - :vartype field_mapping: "FieldMapping" - """ - - id: str - """Asset ID, a unique identifier for the asset.""" - name: Required[str] - """The name of the resource. Required.""" - version: Required[str] - """The version of the resource. Required.""" - description: str - """The asset description text.""" - tags: dict[str, str] - """Tag dictionary. Tags can be added, removed, and updated.""" - type: Required[Literal[IndexType.COSMOS_DB]] - """Type of index. Required. CosmosDB.""" - connectionName: Required[str] - """Name of connection to CosmosDB. Required.""" - databaseName: Required[str] - """Name of the CosmosDB Database. Required.""" - containerName: Required[str] - """Name of CosmosDB Container. Required.""" - embeddingConfiguration: Required["EmbeddingConfiguration"] - """Embedding model configuration. Required.""" - fieldMapping: Required["FieldMapping"] - """Field mapping configuration. Required.""" - - -class CreateSkillVersionFromFilesBody(TypedDict, total=False): - """Multipart request body for creating a skill version from files. Accepts either a single zip - file or multiple individual skill files (directory upload). For zip uploads, the server - extracts and validates contents. For directory uploads, files are validated as-is. - - :ivar files: Skill files to upload. Upload a single zip file or multiple individual files with - relative paths. Required. - :vartype files: list[FileType] - :ivar default: Whether to set this version as the default. Defaults to false. - :vartype default: bool - """ - - files: Required[list[FileType]] - """Skill files to upload. Upload a single zip file or multiple individual files with relative - paths. Required.""" - default: bool - """Whether to set this version as the default. Defaults to false.""" - - -class CronTrigger(TypedDict, total=False): - """Cron based trigger. - - :ivar type: Required. Cron based trigger. - :vartype type: Literal[TriggerType.CRON] - :ivar expression: Cron expression that defines the schedule frequency. Required. - :vartype expression: str - :ivar time_zone: Time zone for the cron schedule. Defaults to ``UTC``. - :vartype time_zone: str - :ivar start_time: Start time for the cron schedule in ISO 8601 format. - :vartype start_time: str - :ivar end_time: End time for the cron schedule in ISO 8601 format. - :vartype end_time: str - """ - - type: Required[Literal[TriggerType.CRON]] - """Required. Cron based trigger.""" - expression: Required[str] - """Cron expression that defines the schedule frequency. Required.""" - timeZone: str - """Time zone for the cron schedule. Defaults to ``UTC``.""" - startTime: str - """Start time for the cron schedule in ISO 8601 format.""" - endTime: str - """End time for the cron schedule in ISO 8601 format.""" - - -class CustomGrammarFormatParam(TypedDict, total=False): - """Grammar format. - - :ivar type: Grammar format. Always ``grammar``. Required. GRAMMAR. - :vartype type: Literal[CustomToolParamFormatType.GRAMMAR] - :ivar syntax: The syntax of the grammar definition. One of ``lark`` or ``regex``. Required. - Known values are: "lark" and "regex". - :vartype syntax: Union[str, "GrammarSyntax1"] - :ivar definition: The grammar definition. Required. - :vartype definition: str - """ - - type: Required[Literal[CustomToolParamFormatType.GRAMMAR]] - """Grammar format. Always ``grammar``. Required. GRAMMAR.""" - syntax: Required[Union[str, "GrammarSyntax1"]] - """The syntax of the grammar definition. One of ``lark`` or ``regex``. Required. Known values are: - \"lark\" and \"regex\".""" - definition: Required[str] - """The grammar definition. Required.""" - - -class CustomRoutineTrigger(TypedDict, total=False): - """A custom event routine trigger. - - :ivar type: The trigger type. Required. A custom event trigger. - :vartype type: Literal[RoutineTriggerType.CUSTOM] - :ivar provider: The external provider that emits the custom event. Required. - :vartype provider: str - :ivar event_name: The provider-specific event name that fires the routine. - :vartype event_name: str - :ivar parameters: Provider-specific trigger parameters. Required. - :vartype parameters: dict[str, Any] - """ - - type: Required[Literal[RoutineTriggerType.CUSTOM]] - """The trigger type. Required. A custom event trigger.""" - provider: Required[str] - """The external provider that emits the custom event. Required.""" - event_name: str - """The provider-specific event name that fires the routine.""" - parameters: Required[dict[str, Any]] - """Provider-specific trigger parameters. Required.""" - - -class CustomTextFormatParam(TypedDict, total=False): - """Text format. - - :ivar type: Unconstrained text format. Always ``text``. Required. TEXT. - :vartype type: Literal[CustomToolParamFormatType.TEXT] - """ - - type: Required[Literal[CustomToolParamFormatType.TEXT]] - """Unconstrained text format. Always ``text``. Required. TEXT.""" - - -class CustomToolParam(TypedDict, total=False): - """Custom tool. - - :ivar type: The type of the custom tool. Always ``custom``. Required. CUSTOM. - :vartype type: Literal[ToolType.CUSTOM] - :ivar name: The name of the custom tool, used to identify it in tool calls. Required. - :vartype name: str - :ivar description: Optional description of the custom tool, used to provide more context. - :vartype description: str - :ivar format: The input format for the custom tool. Default is unconstrained text. - :vartype format: "CustomToolParamFormat" - :ivar defer_loading: Whether this tool should be deferred and discovered via tool search. - :vartype defer_loading: bool - """ - - type: Required[Literal[ToolType.CUSTOM]] - """The type of the custom tool. Always ``custom``. Required. CUSTOM.""" - name: Required[str] - """The name of the custom tool, used to identify it in tool calls. Required.""" - description: str - """Optional description of the custom tool, used to provide more context.""" - format: "CustomToolParamFormat" - """The input format for the custom tool. Default is unconstrained text.""" - defer_loading: bool - """Whether this tool should be deferred and discovered via tool search.""" - - -class DailyRecurrenceSchedule(TypedDict, total=False): - """Daily recurrence schedule. - - :ivar type: Daily recurrence type. Required. Daily recurrence pattern. - :vartype type: Literal[RecurrenceType.DAILY] - :ivar hours: Hours for the recurrence schedule. Required. - :vartype hours: list[int] - """ - - type: Required[Literal[RecurrenceType.DAILY]] - """Daily recurrence type. Required. Daily recurrence pattern.""" - hours: Required[list[int]] - """Hours for the recurrence schedule. Required.""" - - -class DataGenerationJob(TypedDict, total=False): - """Data Generation Job resource. - - :ivar id: Server-assigned unique identifier. Required. - :vartype id: str - :ivar inputs: Caller-supplied inputs. - :vartype inputs: "DataGenerationJobInputs" - :ivar result: Result produced on success. - :vartype result: "DataGenerationJobResult" - :ivar status: Current lifecycle status. Required. Known values are: "queued", "in_progress", - "succeeded", "failed", and "cancelled". - :vartype status: Union[str, "JobStatus"] - :ivar error: Error details — populated only on failure. - :vartype error: "ApiError" - :ivar created_at: The timestamp when the job was created, represented in Unix time (seconds - since January 1, 1970). Required. - :vartype created_at: int - :ivar finished_at: The timestamp when the job was finished, represented in Unix time (seconds - since January 1, 1970). - :vartype finished_at: int - """ - - id: Required[str] - """Server-assigned unique identifier. Required.""" - inputs: "DataGenerationJobInputs" - """Caller-supplied inputs.""" - result: "DataGenerationJobResult" - """Result produced on success.""" - status: Required[Union[str, "JobStatus"]] - """Current lifecycle status. Required. Known values are: \"queued\", \"in_progress\", - \"succeeded\", \"failed\", and \"cancelled\".""" - error: "ApiError" - """Error details — populated only on failure.""" - created_at: Required[int] - """The timestamp when the job was created, represented in Unix time (seconds since January 1, - 1970). Required.""" - finished_at: int - """The timestamp when the job was finished, represented in Unix time (seconds since January 1, - 1970).""" - - -class DataGenerationJobInputs(TypedDict, total=False): - """Caller-supplied inputs for a data generation job. - - :ivar name: The display name of the data generation job. Required. - :vartype name: str - :ivar sources: The sources used for the data generation job. Required. - :vartype sources: list["DataGenerationJobSource"] - :ivar options: The options for the data generation job. Required. - :vartype options: "DataGenerationJobOptions" - :ivar scenario: The scenario of the data generation job. Either for fine-tuning or evaluation. - Required. Known values are: "supervised_finetuning", "reinforcement_finetuning", and - "evaluation". - :vartype scenario: Union[str, "DataGenerationJobScenario"] - :ivar output_options: Optional caller-supplied metadata for the job's output. See individual - fields for whether they apply to file outputs (fine-tuning scenarios), dataset outputs - (evaluation scenario), or both. - :vartype output_options: "DataGenerationJobOutputOptions" - """ - - name: Required[str] - """The display name of the data generation job. Required.""" - sources: Required[list["DataGenerationJobSource"]] - """The sources used for the data generation job. Required.""" - options: Required["DataGenerationJobOptions"] - """The options for the data generation job. Required.""" - scenario: Required[Union[str, "DataGenerationJobScenario"]] - """The scenario of the data generation job. Either for fine-tuning or evaluation. Required. Known - values are: \"supervised_finetuning\", \"reinforcement_finetuning\", and \"evaluation\".""" - output_options: "DataGenerationJobOutputOptions" - """Optional caller-supplied metadata for the job's output. See individual fields for whether they - apply to file outputs (fine-tuning scenarios), dataset outputs (evaluation scenario), or both.""" - - -class DataGenerationJobOutputOptions(TypedDict, total=False): - """Output options for data generation job. - - :ivar name: Name to assign to the output. Used as the filename for Azure OpenAI file outputs - (fine-tuning scenarios) and as the dataset name for dataset outputs (evaluation scenario). - :vartype name: str - :ivar description: Description to assign to the output. Applies only to dataset outputs - (evaluation scenario); ignored for Azure OpenAI file outputs. - :vartype description: str - :ivar tags: Tags to assign to the output. Applies only to dataset outputs (evaluation - scenario); ignored for Azure OpenAI file outputs. - :vartype tags: dict[str, str] - """ - - name: str - """Name to assign to the output. Used as the filename for Azure OpenAI file outputs (fine-tuning - scenarios) and as the dataset name for dataset outputs (evaluation scenario).""" - description: str - """Description to assign to the output. Applies only to dataset outputs (evaluation scenario); - ignored for Azure OpenAI file outputs.""" - tags: dict[str, str] - """Tags to assign to the output. Applies only to dataset outputs (evaluation scenario); ignored - for Azure OpenAI file outputs.""" - - -class DataGenerationJobResult(TypedDict, total=False): - """Result produced by a successful data generation job. - - :ivar outputs: The final job outputs: Azure OpenAI files for fine-tuning, or datasets for - evaluation. - :vartype outputs: list["DataGenerationJobOutput"] - :ivar generated_samples: The number of samples actually generated. Required. - :vartype generated_samples: int - :ivar token_usage: The token usage information for the data generation job. - :vartype token_usage: "DataGenerationTokenUsage" - """ - - outputs: list["DataGenerationJobOutput"] - """The final job outputs: Azure OpenAI files for fine-tuning, or datasets for evaluation.""" - generated_samples: Required[int] - """The number of samples actually generated. Required.""" - token_usage: "DataGenerationTokenUsage" - """The token usage information for the data generation job.""" - - -class DataGenerationModelOptions(TypedDict, total=False): - """LLM model options for data generation jobs. - - :ivar model: Base model name used to generate data. Required. - :vartype model: str - """ - - model: Required[str] - """Base model name used to generate data. Required.""" - - -class DataGenerationTokenUsage(TypedDict, total=False): - """Token usage information for a data generation job. - - :ivar prompt_tokens: The number of prompt tokens used. Required. - :vartype prompt_tokens: int - :ivar completion_tokens: The number of completion tokens generated. Required. - :vartype completion_tokens: int - :ivar total_tokens: Total number of tokens used. Required. - :vartype total_tokens: int - """ - - prompt_tokens: Required[int] - """The number of prompt tokens used. Required.""" - completion_tokens: Required[int] - """The number of completion tokens generated. Required.""" - total_tokens: Required[int] - """Total number of tokens used. Required.""" - - -class DatasetDataGenerationJobOutput(TypedDict, total=False): - """Dataset output for a data generation job. - - :ivar type: Dataset output. Required. The generated data is a Dataset. - :vartype type: Literal[DataGenerationJobOutputType.DATASET] - :ivar id: The id of the output dataset created. - :vartype id: str - :ivar name: The name of the output dataset. - :vartype name: str - :ivar version: The version of the output dataset. - :vartype version: str - :ivar description: Description of the output dataset. - :vartype description: str - :ivar tags: Tag dictionary of the output dataset. - :vartype tags: dict[str, str] - """ - - type: Required[Literal[DataGenerationJobOutputType.DATASET]] - """Dataset output. Required. The generated data is a Dataset.""" - id: str - """The id of the output dataset created.""" - name: str - """The name of the output dataset.""" - version: str - """The version of the output dataset.""" - description: str - """Description of the output dataset.""" - tags: dict[str, str] - """Tag dictionary of the output dataset.""" - - -class DatasetEvaluatorGenerationJobSource(TypedDict, total=False): - """Dataset source for evaluator generation jobs — reference to a dataset. - - :ivar description: Optional description of what this source represents — helps the pipeline - interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core - capabilities'). - :vartype description: str - :ivar type: The source type for this source, which is Dataset. Required. Dataset source — - reference to a dataset. - :vartype type: Literal[EvaluatorGenerationJobSourceType.DATASET] - :ivar name: The name of the dataset. Required. - :vartype name: str - :ivar version: The version of the dataset. If not specified, the latest version is used. - :vartype version: str - """ - - description: str - """Optional description of what this source represents — helps the pipeline interpret its content - (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities').""" - type: Required[Literal[EvaluatorGenerationJobSourceType.DATASET]] - """The source type for this source, which is Dataset. Required. Dataset source — reference to a - dataset.""" - name: Required[str] - """The name of the dataset. Required.""" - version: str - """The version of the dataset. If not specified, the latest version is used.""" - - -class DatasetReference(TypedDict, total=False): - """Reference to a versioned Foundry Dataset. - - :ivar name: Dataset name. Required. - :vartype name: str - :ivar version: Dataset version. Required. - :vartype version: str - """ - - name: Required[str] - """Dataset name. Required.""" - version: Required[str] - """Dataset version. Required.""" - - -class Dimension(TypedDict, total=False): - """A single dimension — one independent, measurable quality dimension within a rubric evaluator's - scoring blueprint. - - :ivar id: Stable identifier for this dimension (snake_case, e.g., ``correct_resolution``). - Required. Provided by the user when manually creating a rubric evaluator or during - human-in-the-loop review of a generated set; the generation pipeline produces an initial value - the user can edit. Editable when saving new versions. Required. - :vartype id: str - :ivar description: What this dimension measures (e.g., 'Correctly identifies the user's - reservation intent and pursues the appropriate workflow'). Required. - :vartype description: str - :ivar weight: Relative weight of this dimension (1-10). The generation pipeline assigns exactly - one dimension weight 8-10; all others use 1-6. User edits are not constrained by this - heuristic. Required. - :vartype weight: int - :ivar always_applicable: When true, the LLM judge always scores this dimension regardless of - relevance (skips applicability assessment). The service-generated general quality/policy - dimension has this set to true and is non-editable. Users may set this on their own custom - dimensions. The service defaults to ``false`` if a value is not specified by the caller. - :vartype always_applicable: bool - """ - - id: Required[str] - """Stable identifier for this dimension (snake_case, e.g., ``correct_resolution``). Required. - Provided by the user when manually creating a rubric evaluator or during human-in-the-loop - review of a generated set; the generation pipeline produces an initial value the user can edit. - Editable when saving new versions. Required.""" - description: Required[str] - """What this dimension measures (e.g., 'Correctly identifies the user's reservation intent and - pursues the appropriate workflow'). Required.""" - weight: Required[int] - """Relative weight of this dimension (1-10). The generation pipeline assigns exactly one dimension - weight 8-10; all others use 1-6. User edits are not constrained by this heuristic. Required.""" - always_applicable: bool - """When true, the LLM judge always scores this dimension regardless of relevance (skips - applicability assessment). The service-generated general quality/policy dimension has this set - to true and is non-editable. Users may set this on their own custom dimensions. The service - defaults to ``false`` if a value is not specified by the caller.""" - - -class EmbeddingConfiguration(TypedDict, total=False): - """Embedding configuration class. - - :ivar model_deployment_name: Deployment name of embedding model. It can point to a model - deployment either in the parent AIServices or a connection. Required. - :vartype model_deployment_name: str - :ivar embedding_field: Embedding field. Required. - :vartype embedding_field: str - """ - - modelDeploymentName: Required[str] - """Deployment name of embedding model. It can point to a model deployment either in the parent - AIServices or a connection. Required.""" - embeddingField: Required[str] - """Embedding field. Required.""" - - -class EmptyModelParam(TypedDict, total=False): - """EmptyModelParam.""" - - -class EndpointBasedEvaluatorDefinition(TypedDict, total=False): - """Endpoint-based evaluator definition. The customer owns and hosts an HTTP endpoint that - implements the evaluation contract. The evaluator references a Project Connection by name; the - connection stores the endpoint URL and credentials (API Key or Entra ID). At execution time, - the service resolves the connection to obtain the endpoint URL and authentication details, then - calls the endpoint for each evaluation row. - - :ivar init_parameters: The JSON schema (Draft 2020-12) for the evaluator's input parameters. - This includes parameters like type, properties, required. - :vartype init_parameters: dict[str, Any] - :ivar data_schema: The JSON schema (Draft 2020-12) for the evaluator's input data. This - includes parameters like type, properties, required. - :vartype data_schema: dict[str, Any] - :ivar metrics: List of output metrics produced by this evaluator. - :vartype metrics: dict[str, "EvaluatorMetric"] - :ivar type: Required. Endpoint-based evaluator definition. References a customer-owned HTTP - endpoint via a Project Connection. - :vartype type: Literal[EvaluatorDefinitionType.ENDPOINT] - :ivar connection_name: Name of the Project Connection that stores the endpoint URL and - credentials. The connection must exist on the project and have a non-empty target URL. - Supported auth types: ApiKey (sends ``api-key`` header) and AAD/Entra ID (acquires a bearer - token via the project's Managed Identity). Required. - :vartype connection_name: str - """ - - init_parameters: dict[str, Any] - """The JSON schema (Draft 2020-12) for the evaluator's input parameters. This includes parameters - like type, properties, required.""" - data_schema: dict[str, Any] - """The JSON schema (Draft 2020-12) for the evaluator's input data. This includes parameters like - type, properties, required.""" - metrics: dict[str, "EvaluatorMetric"] - """List of output metrics produced by this evaluator.""" - type: Required[Literal[EvaluatorDefinitionType.ENDPOINT]] - """Required. Endpoint-based evaluator definition. References a customer-owned HTTP endpoint via a - Project Connection.""" - connection_name: Required[str] - """Name of the Project Connection that stores the endpoint URL and credentials. The connection - must exist on the project and have a non-empty target URL. Supported auth types: ApiKey (sends - ``api-key`` header) and AAD/Entra ID (acquires a bearer token via the project's Managed - Identity). Required.""" - - -class EntraAuthorizationScheme(TypedDict, total=False): - """EntraAuthorizationScheme. - - :ivar type: Required. ENTRA. - :vartype type: Literal[AgentEndpointAuthorizationSchemeType.ENTRA] - """ - - type: Required[Literal[AgentEndpointAuthorizationSchemeType.ENTRA]] - """Required. ENTRA.""" - - -class EvalResult(TypedDict, total=False): - """Result of the evaluation. - - :ivar name: name of the check. Required. - :vartype name: str - :ivar type: type of the check. Required. - :vartype type: str - :ivar score: score. Required. - :vartype score: float - :ivar passed: indicates if the check passed or failed. Required. - :vartype passed: bool - """ - - name: Required[str] - """name of the check. Required.""" - type: Required[str] - """type of the check. Required.""" - score: Required[float] - """score. Required.""" - passed: Required[bool] - """indicates if the check passed or failed. Required.""" - - -class EvalRunResultCompareItem(TypedDict, total=False): - """Metric comparison for a treatment against the baseline. - - :ivar treatment_run_id: The treatment run ID. Required. - :vartype treatment_run_id: str - :ivar treatment_run_summary: Summary statistics of the treatment run. Required. - :vartype treatment_run_summary: "EvalRunResultSummary" - :ivar delta_estimate: Estimated difference between treatment and baseline. Required. - :vartype delta_estimate: float - :ivar p_value: P-value for the treatment effect. Required. - :vartype p_value: float - :ivar treatment_effect: Type of treatment effect. Required. Known values are: "TooFewSamples", - "Inconclusive", "Changed", "Improved", and "Degraded". - :vartype treatment_effect: Union[str, "TreatmentEffectType"] - """ - - treatmentRunId: Required[str] - """The treatment run ID. Required.""" - treatmentRunSummary: Required["EvalRunResultSummary"] - """Summary statistics of the treatment run. Required.""" - deltaEstimate: Required[float] - """Estimated difference between treatment and baseline. Required.""" - pValue: Required[float] - """P-value for the treatment effect. Required.""" - treatmentEffect: Required[Union[str, "TreatmentEffectType"]] - """Type of treatment effect. Required. Known values are: \"TooFewSamples\", \"Inconclusive\", - \"Changed\", \"Improved\", and \"Degraded\".""" - - -class EvalRunResultComparison(TypedDict, total=False): - """Comparison results for treatment runs against the baseline. - - :ivar testing_criteria: Name of the testing criteria. Required. - :vartype testing_criteria: str - :ivar metric: Metric being evaluated. Required. - :vartype metric: str - :ivar evaluator: Name of the evaluator for this testing criteria. Required. - :vartype evaluator: str - :ivar baseline_run_summary: Summary statistics of the baseline run. Required. - :vartype baseline_run_summary: "EvalRunResultSummary" - :ivar compare_items: List of comparison results for each treatment run. Required. - :vartype compare_items: list["EvalRunResultCompareItem"] - """ - - testingCriteria: Required[str] - """Name of the testing criteria. Required.""" - metric: Required[str] - """Metric being evaluated. Required.""" - evaluator: Required[str] - """Name of the evaluator for this testing criteria. Required.""" - baselineRunSummary: Required["EvalRunResultSummary"] - """Summary statistics of the baseline run. Required.""" - compareItems: Required[list["EvalRunResultCompareItem"]] - """List of comparison results for each treatment run. Required.""" - - -class EvalRunResultSummary(TypedDict, total=False): - """Summary statistics of a metric in an evaluation run. - - :ivar run_id: The evaluation run ID. Required. - :vartype run_id: str - :ivar sample_count: Number of samples in the evaluation run. Required. - :vartype sample_count: int - :ivar average: Average value of the metric in the evaluation run. Required. - :vartype average: float - :ivar standard_deviation: Standard deviation of the metric in the evaluation run. Required. - :vartype standard_deviation: float - """ - - runId: Required[str] - """The evaluation run ID. Required.""" - sampleCount: Required[int] - """Number of samples in the evaluation run. Required.""" - average: Required[float] - """Average value of the metric in the evaluation run. Required.""" - standardDeviation: Required[float] - """Standard deviation of the metric in the evaluation run. Required.""" - - -class EvaluationComparisonInsightRequest(TypedDict, total=False): - """Evaluation Comparison Request. - - :ivar type: The type of request. Required. Evaluation Comparison. - :vartype type: Literal[InsightType.EVALUATION_COMPARISON] - :ivar eval_id: Identifier for the evaluation. Required. - :vartype eval_id: str - :ivar baseline_run_id: The baseline run ID for comparison. Required. - :vartype baseline_run_id: str - :ivar treatment_run_ids: List of treatment run IDs for comparison. Required. - :vartype treatment_run_ids: list[str] - """ - - type: Required[Literal[InsightType.EVALUATION_COMPARISON]] - """The type of request. Required. Evaluation Comparison.""" - evalId: Required[str] - """Identifier for the evaluation. Required.""" - baselineRunId: Required[str] - """The baseline run ID for comparison. Required.""" - treatmentRunIds: Required[list[str]] - """List of treatment run IDs for comparison. Required.""" - - -class EvaluationComparisonInsightResult(TypedDict, total=False): - """Insights from the evaluation comparison. - - :ivar type: The type of insights result. Required. Evaluation Comparison. - :vartype type: Literal[InsightType.EVALUATION_COMPARISON] - :ivar comparisons: Comparison results for each treatment run against the baseline. Required. - :vartype comparisons: list["EvalRunResultComparison"] - :ivar method: The statistical method used for comparison. Required. - :vartype method: str - """ - - type: Required[Literal[InsightType.EVALUATION_COMPARISON]] - """The type of insights result. Required. Evaluation Comparison.""" - comparisons: Required[list["EvalRunResultComparison"]] - """Comparison results for each treatment run against the baseline. Required.""" - method: Required[str] - """The statistical method used for comparison. Required.""" - - -class EvaluationResultSample(TypedDict, total=False): - """A sample from the evaluation result. - - :ivar id: The unique identifier for the analysis sample. Required. - :vartype id: str - :ivar features: Features to help with additional filtering of data in UX. Required. - :vartype features: dict[str, Any] - :ivar correlation_info: Info about the correlation for the analysis sample. Required. - :vartype correlation_info: dict[str, Any] - :ivar type: Evaluation Result Sample Type. Required. A sample from the evaluation result. - :vartype type: Literal[SampleType.EVALUATION_RESULT_SAMPLE] - :ivar evaluation_result: Evaluation result for the analysis sample. Required. - :vartype evaluation_result: "EvalResult" - """ - - id: Required[str] - """The unique identifier for the analysis sample. Required.""" - features: Required[dict[str, Any]] - """Features to help with additional filtering of data in UX. Required.""" - correlationInfo: Required[dict[str, Any]] - """Info about the correlation for the analysis sample. Required.""" - type: Required[Literal[SampleType.EVALUATION_RESULT_SAMPLE]] - """Evaluation Result Sample Type. Required. A sample from the evaluation result.""" - evaluationResult: Required["EvalResult"] - """Evaluation result for the analysis sample. Required.""" - - -class EvaluationRule(TypedDict, total=False): - """Evaluation rule model. - - :ivar id: Unique identifier for the evaluation rule. Required. - :vartype id: str - :ivar display_name: Display Name for the evaluation rule. - :vartype display_name: str - :ivar description: Description for the evaluation rule. - :vartype description: str - :ivar action: Definition of the evaluation rule action. Required. - :vartype action: "EvaluationRuleAction" - :ivar filter: Filter condition of the evaluation rule. - :vartype filter: "EvaluationRuleFilter" - :ivar event_type: Event type that the evaluation rule applies to. Required. Known values are: - "responseCompleted" and "manual". - :vartype event_type: Union[str, "EvaluationRuleEventType"] - :ivar enabled: Indicates whether the evaluation rule is enabled. Default is true. Required. - :vartype enabled: bool - :ivar system_data: System metadata for the evaluation rule. Required. - :vartype system_data: dict[str, str] - """ - - id: Required[str] - """Unique identifier for the evaluation rule. Required.""" - displayName: str - """Display Name for the evaluation rule.""" - description: str - """Description for the evaluation rule.""" - action: Required["EvaluationRuleAction"] - """Definition of the evaluation rule action. Required.""" - filter: "EvaluationRuleFilter" - """Filter condition of the evaluation rule.""" - eventType: Required[Union[str, "EvaluationRuleEventType"]] - """Event type that the evaluation rule applies to. Required. Known values are: - \"responseCompleted\" and \"manual\".""" - enabled: Required[bool] - """Indicates whether the evaluation rule is enabled. Default is true. Required.""" - systemData: Required[dict[str, str]] - """System metadata for the evaluation rule. Required.""" - - -class EvaluationRuleFilter(TypedDict, total=False): - """Evaluation filter model. - - :ivar agent_name: Filter by agent name. Required. - :vartype agent_name: str - """ - - agentName: Required[str] - """Filter by agent name. Required.""" - - -class EvaluationRunClusterInsightRequest(TypedDict, total=False): - """Insights on set of Evaluation Results. - - :ivar type: The type of insights request. Required. Insights on an Evaluation run result. - :vartype type: Literal[InsightType.EVALUATION_RUN_CLUSTER_INSIGHT] - :ivar eval_id: Evaluation Id for the insights. Required. - :vartype eval_id: str - :ivar run_ids: List of evaluation run IDs for the insights. Required. - :vartype run_ids: list[str] - :ivar model_configuration: Configuration of the model used in the insight generation. - :vartype model_configuration: "InsightModelConfiguration" - """ - - type: Required[Literal[InsightType.EVALUATION_RUN_CLUSTER_INSIGHT]] - """The type of insights request. Required. Insights on an Evaluation run result.""" - evalId: Required[str] - """Evaluation Id for the insights. Required.""" - runIds: Required[list[str]] - """List of evaluation run IDs for the insights. Required.""" - modelConfiguration: "InsightModelConfiguration" - """Configuration of the model used in the insight generation.""" - - -class EvaluationRunClusterInsightResult(TypedDict, total=False): - """Insights from the evaluation run cluster analysis. - - :ivar type: The type of insights result. Required. Insights on an Evaluation run result. - :vartype type: Literal[InsightType.EVALUATION_RUN_CLUSTER_INSIGHT] - :ivar cluster_insight: Required. - :vartype cluster_insight: "ClusterInsightResult" - """ - - type: Required[Literal[InsightType.EVALUATION_RUN_CLUSTER_INSIGHT]] - """The type of insights result. Required. Insights on an Evaluation run result.""" - clusterInsight: Required["ClusterInsightResult"] - """Required.""" - - -class EvaluationScheduleTask(TypedDict, total=False): - """Evaluation task for the schedule. - - :ivar configuration: Configuration for the task. - :vartype configuration: dict[str, str] - :ivar type: Required. Evaluation task. - :vartype type: Literal[ScheduleTaskType.EVALUATION] - :ivar eval_id: Identifier of the evaluation group. Required. - :vartype eval_id: str - :ivar eval_run: The evaluation run payload. Required. - :vartype eval_run: dict[str, Any] - """ - - configuration: dict[str, str] - """Configuration for the task.""" - type: Required[Literal[ScheduleTaskType.EVALUATION]] - """Required. Evaluation task.""" - evalId: Required[str] - """Identifier of the evaluation group. Required.""" - evalRun: Required[dict[str, Any]] - """The evaluation run payload. Required.""" - - -class EvaluationTaxonomy(TypedDict, total=False): - """Evaluation Taxonomy Definition. - - :ivar id: Asset ID, a unique identifier for the asset. - :vartype id: str - :ivar name: The name of the resource. Required. - :vartype name: str - :ivar version: The version of the resource. Required. - :vartype version: str - :ivar description: The asset description text. - :vartype description: str - :ivar tags: Tag dictionary. Tags can be added, removed, and updated. - :vartype tags: dict[str, str] - :ivar taxonomy_input: Input configuration for the evaluation taxonomy. Required. - :vartype taxonomy_input: "EvaluationTaxonomyInput" - :ivar taxonomy_categories: List of taxonomy categories. - :vartype taxonomy_categories: list["TaxonomyCategory"] - :ivar properties: Additional properties for the evaluation taxonomy. - :vartype properties: dict[str, str] - """ - - id: str - """Asset ID, a unique identifier for the asset.""" - name: Required[str] - """The name of the resource. Required.""" - version: Required[str] - """The version of the resource. Required.""" - description: str - """The asset description text.""" - tags: dict[str, str] - """Tag dictionary. Tags can be added, removed, and updated.""" - taxonomyInput: Required["EvaluationTaxonomyInput"] - """Input configuration for the evaluation taxonomy. Required.""" - taxonomyCategories: list["TaxonomyCategory"] - """List of taxonomy categories.""" - properties: dict[str, str] - """Additional properties for the evaluation taxonomy.""" - - -class EvaluatorCredentialRequest(TypedDict, total=False): - """Request body for getting evaluator credentials. - - :ivar blob_uri: The blob URI for the evaluator storage. Example: - ``https://account.blob.core.windows.net:443/container``. Required. - :vartype blob_uri: str - """ - - blob_uri: Required[str] - """The blob URI for the evaluator storage. Example: - ``https://account.blob.core.windows.net:443/container``. Required.""" - - -class EvaluatorGenerationArtifacts(TypedDict, total=False): - """Service-managed provenance artifacts produced by an evaluator generation job. Present only on - EvaluatorVersion resources created via the generation pipeline. The combined-JSONL Foundry - Dataset is read-only and resolves to a versioned dataset in a service-reserved namespace. - - :ivar dataset: Reference to the single Foundry Dataset (one combined JSONL file, - version-aligned to ``EvaluatorVersion.version``) holding all artifacts produced by the - generation pipeline. Each row in the JSONL carries a ``kind`` field discriminating its content - (e.g. ``spec``, ``tools``, ``context``). Required. - :vartype dataset: "DatasetReference" - :ivar kinds: The kinds of rows present in ``dataset``. Always contains ``"spec"`` (the - generated evaluation specification, a Markdown document describing what the evaluator - measures). May additionally contain ``"tools"`` (when the generation pipeline produced or - inferred OpenAI tool schemas) and/or ``"context"`` (when supplementary materials such as file - uploads or trace samples were used during generation). Required. - :vartype kinds: list[str] - """ - - dataset: Required["DatasetReference"] - """Reference to the single Foundry Dataset (one combined JSONL file, version-aligned to - ``EvaluatorVersion.version``) holding all artifacts produced by the generation pipeline. Each - row in the JSONL carries a ``kind`` field discriminating its content (e.g. ``spec``, ``tools``, - ``context``). Required.""" - kinds: Required[list[str]] - """The kinds of rows present in ``dataset``. Always contains ``\"spec\"`` (the generated - evaluation specification, a Markdown document describing what the evaluator measures). May - additionally contain ``\"tools\"`` (when the generation pipeline produced or inferred OpenAI - tool schemas) and/or ``\"context\"`` (when supplementary materials such as file uploads or - trace samples were used during generation). Required.""" - - -class EvaluatorGenerationInputs(TypedDict, total=False): - """Caller-supplied inputs for an evaluator generation job. - - :ivar sources: Source materials for generation — agent descriptions, prompts, traces, or - datasets. Each entry is an ``EvaluatorGenerationJobSource`` variant discriminated by ``type``. - Required. - :vartype sources: list["EvaluatorGenerationJobSource"] - :ivar model: The LLM model to use for rubric generation (e.g., 'gpt-4o'). Required — users must - provide their own model rather than relying on service-owned capacity. Required. - :vartype model: str - :ivar evaluator_name: The evaluator name (immutable identifier). 1-256 characters; allowed - characters are ASCII letters, digits, underscore (``_``), period (``.``), tilde (``~``), and - hyphen (``-``). The prefix ``builtin.`` is reserved for system-managed evaluators and is - rejected by the service. If an evaluator with this name already exists in the project (and is - rubric-subtype), the service creates a new version under the same name and uses the prior - version's ``dimensions`` as context for incremental improvement (foundation of the post-//build - adaptive loop). Old versions remain queryable via ``get_version(name, version)``. If the - existing evaluator is not a rubric-subtype evaluator (built-in, prompt-based, code-based), the - request is rejected with ``400 Bad Request``. Required. - :vartype evaluator_name: str - :ivar evaluator_display_name: Optional human-friendly display name for the resulting evaluator. - Surfaced as ``EvaluatorVersion.display_name`` on the persisted evaluator. When omitted, the - service uses ``evaluator_name`` as the display name. The ``evaluator_`` prefix disambiguates - this from the immutable ``evaluator_name`` identifier. - :vartype evaluator_display_name: str - :ivar evaluator_description: Optional human-friendly description for the resulting evaluator. - Surfaced as ``EvaluatorVersion.description`` on the persisted evaluator. Typically collected - from the UI alongside ``evaluator_display_name``. The ``evaluator_`` prefix disambiguates this - from any other description fields on related models. - :vartype evaluator_description: str - """ - - sources: Required[list["EvaluatorGenerationJobSource"]] - """Source materials for generation — agent descriptions, prompts, traces, or datasets. Each entry - is an ``EvaluatorGenerationJobSource`` variant discriminated by ``type``. Required.""" - model: Required[str] - """The LLM model to use for rubric generation (e.g., 'gpt-4o'). Required — users must provide - their own model rather than relying on service-owned capacity. Required.""" - evaluator_name: Required[str] - """The evaluator name (immutable identifier). 1-256 characters; allowed characters are ASCII - letters, digits, underscore (``_``), period (``.``), tilde (``~``), and hyphen (``-``). The - prefix ``builtin.`` is reserved for system-managed evaluators and is rejected by the service. - If an evaluator with this name already exists in the project (and is rubric-subtype), the - service creates a new version under the same name and uses the prior version's ``dimensions`` - as context for incremental improvement (foundation of the post-//build adaptive loop). Old - versions remain queryable via ``get_version(name, version)``. If the existing evaluator is not - a rubric-subtype evaluator (built-in, prompt-based, code-based), the request is rejected with - ``400 Bad Request``. Required.""" - evaluator_display_name: str - """Optional human-friendly display name for the resulting evaluator. Surfaced as - ``EvaluatorVersion.display_name`` on the persisted evaluator. When omitted, the service uses - ``evaluator_name`` as the display name. The ``evaluator_`` prefix disambiguates this from the - immutable ``evaluator_name`` identifier.""" - evaluator_description: str - """Optional human-friendly description for the resulting evaluator. Surfaced as - ``EvaluatorVersion.description`` on the persisted evaluator. Typically collected from the UI - alongside ``evaluator_display_name``. The ``evaluator_`` prefix disambiguates this from any - other description fields on related models.""" - - -class EvaluatorGenerationJob(TypedDict, total=False): - """Evaluator Generation Job resource — a long-running job that generates rubric-based evaluator - definitions from source materials. On success, the result is the persisted EvaluatorVersion. - - :ivar id: Server-assigned unique identifier. Required. - :vartype id: str - :ivar inputs: Caller-supplied inputs. - :vartype inputs: "EvaluatorGenerationInputs" - :ivar result: Result produced on success. - :vartype result: "EvaluatorVersion" - :ivar status: Current lifecycle status. Required. Known values are: "queued", "in_progress", - "succeeded", "failed", and "cancelled". - :vartype status: Union[str, "JobStatus"] - :ivar error: Error details — populated only on failure. - :vartype error: "ApiError" - :ivar created_at: The timestamp when the job was created, represented in Unix time (seconds - since January 1, 1970). Required. - :vartype created_at: int - :ivar finished_at: The timestamp when the job finished, represented in Unix time (seconds since - January 1, 1970). - :vartype finished_at: int - :ivar usage: Token consumption summary. Populated when the job reaches a terminal state. - :vartype usage: "EvaluatorGenerationTokenUsage" - """ - - id: Required[str] - """Server-assigned unique identifier. Required.""" - inputs: "EvaluatorGenerationInputs" - """Caller-supplied inputs.""" - result: "EvaluatorVersion" - """Result produced on success.""" - status: Required[Union[str, "JobStatus"]] - """Current lifecycle status. Required. Known values are: \"queued\", \"in_progress\", - \"succeeded\", \"failed\", and \"cancelled\".""" - error: "ApiError" - """Error details — populated only on failure.""" - created_at: Required[int] - """The timestamp when the job was created, represented in Unix time (seconds since January 1, - 1970). Required.""" - finished_at: int - """The timestamp when the job finished, represented in Unix time (seconds since January 1, 1970).""" - usage: "EvaluatorGenerationTokenUsage" - """Token consumption summary. Populated when the job reaches a terminal state.""" - - -class EvaluatorGenerationTokenUsage(TypedDict, total=False): - """Token consumption summary for an evaluator generation job. Populated when the job reaches a - terminal state. - - :ivar input_tokens: Number of input (prompt) tokens consumed. Required. - :vartype input_tokens: int - :ivar output_tokens: Number of output (completion) tokens generated. Required. - :vartype output_tokens: int - :ivar total_tokens: Total tokens consumed (input + output). Required. - :vartype total_tokens: int - """ - - input_tokens: Required[int] - """Number of input (prompt) tokens consumed. Required.""" - output_tokens: Required[int] - """Number of output (completion) tokens generated. Required.""" - total_tokens: Required[int] - """Total tokens consumed (input + output). Required.""" - - -class EvaluatorMetric(TypedDict, total=False): - """Evaluator Metric. - - :ivar type: Type of the metric. Known values are: "ordinal", "continuous", and "boolean". - :vartype type: Union[str, "EvaluatorMetricType"] - :ivar desirable_direction: It indicates whether a higher value is better or a lower value is - better for this metric. Known values are: "increase", "decrease", and "neutral". - :vartype desirable_direction: Union[str, "EvaluatorMetricDirection"] - :ivar min_value: Minimum value for the metric. - :vartype min_value: float - :ivar max_value: Maximum value for the metric. If not specified, it is assumed to be unbounded. - :vartype max_value: float - :ivar threshold: Default pass/fail threshold for this metric. - :vartype threshold: float - :ivar is_primary: Indicates if this metric is primary when there are multiple metrics. - :vartype is_primary: bool - """ - - type: Union[str, "EvaluatorMetricType"] - """Type of the metric. Known values are: \"ordinal\", \"continuous\", and \"boolean\".""" - desirable_direction: Union[str, "EvaluatorMetricDirection"] - """It indicates whether a higher value is better or a lower value is better for this metric. Known - values are: \"increase\", \"decrease\", and \"neutral\".""" - min_value: float - """Minimum value for the metric.""" - max_value: float - """Maximum value for the metric. If not specified, it is assumed to be unbounded.""" - threshold: float - """Default pass/fail threshold for this metric.""" - is_primary: bool - """Indicates if this metric is primary when there are multiple metrics.""" - - -class EvaluatorVersion(TypedDict, total=False): - """Evaluator Definition. - - :ivar display_name: Display Name for evaluator. It helps to find the evaluator easily in AI - Foundry. It does not need to be unique. - :vartype display_name: str - :ivar metadata: Metadata about the evaluator. - :vartype metadata: dict[str, str] - :ivar evaluator_type: The type of the evaluator. Required. Known values are: "builtin" and - "custom". - :vartype evaluator_type: Union[str, "EvaluatorType"] - :ivar categories: The categories of the evaluator. Required. - :vartype categories: list[Union[str, "EvaluatorCategory"]] - :ivar supported_evaluation_levels: Evaluation levels this evaluator supports (e.g., ``turn``, - ``conversation``). When omitted on create, the service defaults to ``["turn"]``. On update, - omitting this field leaves it unchanged; an empty list is rejected. Custom code-based - evaluators support only ``turn``; custom prompt-based evaluators support exactly one level - (``turn`` or ``conversation``). - :vartype supported_evaluation_levels: list[Union[str, "EvaluationLevel"]] - :ivar definition: Definition of the evaluator. Required. - :vartype definition: "EvaluatorDefinition" - :ivar generation_artifacts: Provenance artifacts from the generation pipeline. Read-only; - present only on evaluator versions created via an EvaluatorGenerationJob. Each artifact - resolves to a versioned Foundry Dataset. - :vartype generation_artifacts: "EvaluatorGenerationArtifacts" - :ivar created_by: Creator of the evaluator. Required. - :vartype created_by: str - :ivar created_at: Creation date/time of the evaluator. Required. - :vartype created_at: str - :ivar modified_at: Last modified date/time of the evaluator. Required. - :vartype modified_at: str - :ivar id: Asset ID, a unique identifier for the asset. - :vartype id: str - :ivar name: The name of the resource. Required. - :vartype name: str - :ivar version: The version of the resource. Required. - :vartype version: str - :ivar description: The asset description text. - :vartype description: str - :ivar tags: Tag dictionary. Tags can be added, removed, and updated. - :vartype tags: dict[str, str] - """ - - display_name: str - """Display Name for evaluator. It helps to find the evaluator easily in AI Foundry. It does not - need to be unique.""" - metadata: dict[str, str] - """Metadata about the evaluator.""" - evaluator_type: Required[Union[str, "EvaluatorType"]] - """The type of the evaluator. Required. Known values are: \"builtin\" and \"custom\".""" - categories: Required[list[Union[str, "EvaluatorCategory"]]] - """The categories of the evaluator. Required.""" - supported_evaluation_levels: list[Union[str, "EvaluationLevel"]] - """Evaluation levels this evaluator supports (e.g., ``turn``, ``conversation``). When omitted on - create, the service defaults to ``[\"turn\"]``. On update, omitting this field leaves it - unchanged; an empty list is rejected. Custom code-based evaluators support only ``turn``; - custom prompt-based evaluators support exactly one level (``turn`` or ``conversation``).""" - definition: Required["EvaluatorDefinition"] - """Definition of the evaluator. Required.""" - generation_artifacts: "EvaluatorGenerationArtifacts" - """Provenance artifacts from the generation pipeline. Read-only; present only on evaluator - versions created via an EvaluatorGenerationJob. Each artifact resolves to a versioned Foundry - Dataset.""" - created_by: Required[str] - """Creator of the evaluator. Required.""" - created_at: Required[str] - """Creation date/time of the evaluator. Required.""" - modified_at: Required[str] - """Last modified date/time of the evaluator. Required.""" - id: str - """Asset ID, a unique identifier for the asset.""" - name: Required[str] - """The name of the resource. Required.""" - version: Required[str] - """The version of the resource. Required.""" - description: str - """The asset description text.""" - tags: dict[str, str] - """Tag dictionary. Tags can be added, removed, and updated.""" - - -class ExternalAgentDefinition(TypedDict, total=False): - """The external agent definition. Represents a third-party agent hosted outside Foundry (for - example, on GCP or AWS). Registration is metadata-only: Foundry records the agent definition to - light up observability experiences (traces, evaluations) over customer-emitted OpenTelemetry - data. - - :ivar rai_config: Configuration for Responsible AI (RAI) content filtering and safety features. - :vartype rai_config: "RaiConfig" - :ivar kind: Required. EXTERNAL. - :vartype kind: Literal[AgentKind.EXTERNAL] - :ivar otel_agent_id: The OpenTelemetry agent identifier used to attribute customer-emitted - spans to this Foundry agent. Spans must include the attribute ``gen_ai.agent.id = - `` to appear under this registration. Defaults to the top-level agent name when - omitted. Provide an explicit value only for migration scenarios where the running external - agent already emits a stable id that differs from the Foundry agent name. The resolved value is - always echoed on read. - :vartype otel_agent_id: str - """ - - rai_config: "RaiConfig" - """Configuration for Responsible AI (RAI) content filtering and safety features.""" - kind: Required[Literal[AgentKind.EXTERNAL]] - """Required. EXTERNAL.""" - otel_agent_id: str - """The OpenTelemetry agent identifier used to attribute customer-emitted spans to this Foundry - agent. Spans must include the attribute ``gen_ai.agent.id = `` to appear under - this registration. Defaults to the top-level agent name when omitted. Provide an explicit value - only for migration scenarios where the running external agent already emits a stable id that - differs from the Foundry agent name. The resolved value is always echoed on read.""" - - -class FabricDataAgentToolParameters(TypedDict, total=False): - """The fabric data agent tool parameters. - - :ivar project_connections: The project connections attached to this tool. There can be a - maximum of 1 connection resource attached to the tool. - :vartype project_connections: list["ToolProjectConnection"] - """ - - project_connections: list["ToolProjectConnection"] - """The project connections attached to this tool. There can be a maximum of 1 connection resource - attached to the tool.""" - - -class FabricIQPreviewTool(TypedDict, total=False): - """A FabricIQ server-side tool. - - :ivar type: The object type, which is always 'fabric_iq_preview'. Required. FABRIC_IQ_PREVIEW. - :vartype type: Literal[ToolType.FABRIC_IQ_PREVIEW] - :ivar project_connection_id: The ID of the FabricIQ project connection. Required. - :vartype project_connection_id: str - :ivar server_label: (Optional) The label of the FabricIQ MCP server to connect to. - :vartype server_label: str - :ivar server_url: (Optional) The URL of the FabricIQ MCP server. If not provided, the URL from - the project connection will be used. - :vartype server_url: str - :ivar require_approval: (Optional) Whether the agent requires approval before executing - actions. Default is always. Is either a MCPToolRequireApproval type or a str type. - :vartype require_approval: Union["MCPToolRequireApproval", str] - """ - - type: Required[Literal[ToolType.FABRIC_IQ_PREVIEW]] - """The object type, which is always 'fabric_iq_preview'. Required. FABRIC_IQ_PREVIEW.""" - project_connection_id: Required[str] - """The ID of the FabricIQ project connection. Required.""" - server_label: str - """(Optional) The label of the FabricIQ MCP server to connect to.""" - server_url: str - """(Optional) The URL of the FabricIQ MCP server. If not provided, the URL from the project - connection will be used.""" - require_approval: Optional[Union["MCPToolRequireApproval", str]] - """(Optional) Whether the agent requires approval before executing actions. Default is always. Is - either a MCPToolRequireApproval type or a str type.""" - - -class FabricIQPreviewToolboxTool(TypedDict, total=False): - """A FabricIQ tool stored in a toolbox. - - :ivar name: Optional user-defined name for this tool or configuration. - :vartype name: str - :ivar description: Optional user-defined description for this tool or configuration. - :vartype description: str - :ivar tool_configs: Per-tool configuration map. Keys are tool names or ``*`` (catch-all - default). Resolution order: exact tool name match takes priority over ``*``. Unknown tool names - are silently ignored at runtime. - :vartype tool_configs: dict[str, "ToolConfig"] - :ivar type: Required. FABRIC_IQ_PREVIEW. - :vartype type: Literal[ToolboxToolType.FABRIC_IQ_PREVIEW] - :ivar project_connection_id: The ID of the FabricIQ project connection. Required. - :vartype project_connection_id: str - :ivar server_label: (Optional) The label of the FabricIQ MCP server to connect to. - :vartype server_label: str - :ivar server_url: (Optional) The URL of the FabricIQ MCP server. If not provided, the URL from - the project connection will be used. - :vartype server_url: str - :ivar require_approval: (Optional) Whether the agent requires approval before executing - actions. Default is always. Is either a MCPToolRequireApproval type or a str type. - :vartype require_approval: Union["MCPToolRequireApproval", str] - """ - - name: str - """Optional user-defined name for this tool or configuration.""" - description: str - """Optional user-defined description for this tool or configuration.""" - tool_configs: dict[str, "ToolConfig"] - """Per-tool configuration map. Keys are tool names or ``*`` (catch-all default). Resolution order: - exact tool name match takes priority over ``*``. Unknown tool names are silently ignored at - runtime.""" - type: Required[Literal[ToolboxToolType.FABRIC_IQ_PREVIEW]] - """Required. FABRIC_IQ_PREVIEW.""" - project_connection_id: Required[str] - """The ID of the FabricIQ project connection. Required.""" - server_label: str - """(Optional) The label of the FabricIQ MCP server to connect to.""" - server_url: str - """(Optional) The URL of the FabricIQ MCP server. If not provided, the URL from the project - connection will be used.""" - require_approval: Optional[Union["MCPToolRequireApproval", str]] - """(Optional) Whether the agent requires approval before executing actions. Default is always. Is - either a MCPToolRequireApproval type or a str type.""" - - -class FieldMapping(TypedDict, total=False): - """Field mapping configuration class. - - :ivar content_fields: List of fields with text content. Required. - :vartype content_fields: list[str] - :ivar filepath_field: Path of file to be used as a source of text content. - :vartype filepath_field: str - :ivar title_field: Field containing the title of the document. - :vartype title_field: str - :ivar url_field: Field containing the url of the document. - :vartype url_field: str - :ivar vector_fields: List of fields with vector content. - :vartype vector_fields: list[str] - :ivar metadata_fields: List of fields with metadata content. - :vartype metadata_fields: list[str] - """ - - contentFields: Required[list[str]] - """List of fields with text content. Required.""" - filepathField: str - """Path of file to be used as a source of text content.""" - titleField: str - """Field containing the title of the document.""" - urlField: str - """Field containing the url of the document.""" - vectorFields: list[str] - """List of fields with vector content.""" - metadataFields: list[str] - """List of fields with metadata content.""" - - -class FileDataGenerationJobOutput(TypedDict, total=False): - """Azure OpenAI file output for a data generation job. - - :ivar type: Azure OpenAI file output. Required. The generated data is an Azure OpenAI File. - :vartype type: Literal[DataGenerationJobOutputType.FILE] - :ivar id: The id of the output Azure OpenAI file. Required. - :vartype id: str - :ivar filename: The filename of the output Azure OpenAI file. Required. - :vartype filename: str - """ - - type: Required[Literal[DataGenerationJobOutputType.FILE]] - """Azure OpenAI file output. Required. The generated data is an Azure OpenAI File.""" - id: Required[str] - """The id of the output Azure OpenAI file. Required.""" - filename: Required[str] - """The filename of the output Azure OpenAI file. Required.""" - - -class FileDataGenerationJobSource(TypedDict, total=False): - """File source for data generation jobs — Azure OpenAI file input. - - :ivar description: Optional description of what this source represents — helps the pipeline - interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core - capabilities'). - :vartype description: str - :ivar type: The source type for this job, which is File. Required. File source — Azure OpenAI - file. - :vartype type: Literal[DataGenerationJobSourceType.FILE] - :ivar id: Input Azure Open AI file id used for data generation. Required. - :vartype id: str - """ - - description: str - """Optional description of what this source represents — helps the pipeline interpret its content - (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities').""" - type: Required[Literal[DataGenerationJobSourceType.FILE]] - """The source type for this job, which is File. Required. File source — Azure OpenAI file.""" - id: Required[str] - """Input Azure Open AI file id used for data generation. Required.""" - - -class FileDatasetVersion(TypedDict, total=False): - """FileDatasetVersion Definition. - - :ivar data_uri: URI of the data (`example `_). - Required. - :vartype data_uri: str - :ivar is_reference: Indicates if the dataset holds a reference to the storage, or the dataset - manages storage itself. If true, the underlying data will not be deleted when the dataset - version is deleted. - :vartype is_reference: bool - :ivar connection_name: The Azure Storage Account connection name. Required if - startPendingUploadVersion was not called before creating the Dataset. - :vartype connection_name: str - :ivar id: Asset ID, a unique identifier for the asset. - :vartype id: str - :ivar name: The name of the resource. Required. - :vartype name: str - :ivar version: The version of the resource. Required. - :vartype version: str - :ivar description: The asset description text. - :vartype description: str - :ivar tags: Tag dictionary. Tags can be added, removed, and updated. - :vartype tags: dict[str, str] - :ivar type: Dataset type. Required. URI file. - :vartype type: Literal[DatasetType.URI_FILE] - """ - - dataUri: Required[str] - """URI of the data (`example `_). Required.""" - isReference: bool - """Indicates if the dataset holds a reference to the storage, or the dataset manages storage - itself. If true, the underlying data will not be deleted when the dataset version is deleted.""" - connectionName: str - """The Azure Storage Account connection name. Required if startPendingUploadVersion was not called - before creating the Dataset.""" - id: str - """Asset ID, a unique identifier for the asset.""" - name: Required[str] - """The name of the resource. Required.""" - version: Required[str] - """The version of the resource. Required.""" - description: str - """The asset description text.""" - tags: dict[str, str] - """Tag dictionary. Tags can be added, removed, and updated.""" - type: Required[Literal[DatasetType.URI_FILE]] - """Dataset type. Required. URI file.""" - - -class FileSearchTool(TypedDict, total=False): - """File search. - - :ivar type: The type of the file search tool. Always ``file_search``. Required. FILE_SEARCH. - :vartype type: Literal[ToolType.FILE_SEARCH] - :ivar vector_store_ids: The IDs of the vector stores to search. Required. - :vartype vector_store_ids: list[str] - :ivar max_num_results: The maximum number of results to return. This number should be between 1 - and 50 inclusive. - :vartype max_num_results: int - :ivar ranking_options: Ranking options for search. - :vartype ranking_options: "RankingOptions" - :ivar filters: Is either a ComparisonFilter type or a CompoundFilter type. - :vartype filters: "_unions.Filters" - :ivar name: Deprecated. This property is deprecated and will be removed in a future version. - :vartype name: str - :ivar description: Deprecated. This property is deprecated and will be removed in a future - version. - :vartype description: str - :ivar tool_configs: Deprecated. This property is deprecated and will be removed in a future - version. - :vartype tool_configs: dict[str, "ToolConfig"] - """ - - type: Required[Literal[ToolType.FILE_SEARCH]] - """The type of the file search tool. Always ``file_search``. Required. FILE_SEARCH.""" - vector_store_ids: Required[list[str]] - """The IDs of the vector stores to search. Required.""" - max_num_results: int - """The maximum number of results to return. This number should be between 1 and 50 inclusive.""" - ranking_options: "RankingOptions" - """Ranking options for search.""" - filters: Optional["_unions.Filters"] - """Is either a ComparisonFilter type or a CompoundFilter type.""" - name: str - """Deprecated. This property is deprecated and will be removed in a future version.""" - description: str - """Deprecated. This property is deprecated and will be removed in a future version.""" - tool_configs: dict[str, "ToolConfig"] - """Deprecated. This property is deprecated and will be removed in a future version.""" - - -class FileSearchToolboxTool(TypedDict, total=False): - """A file search tool stored in a toolbox. - - :ivar name: Optional user-defined name for this tool or configuration. - :vartype name: str - :ivar description: Optional user-defined description for this tool or configuration. - :vartype description: str - :ivar tool_configs: Per-tool configuration map. Keys are tool names or ``*`` (catch-all - default). Resolution order: exact tool name match takes priority over ``*``. Unknown tool names - are silently ignored at runtime. - :vartype tool_configs: dict[str, "ToolConfig"] - :ivar type: Required. FILE_SEARCH. - :vartype type: Literal[ToolboxToolType.FILE_SEARCH] - :ivar max_num_results: The maximum number of results to return. This number should be between 1 - and 50 inclusive. - :vartype max_num_results: int - :ivar ranking_options: Ranking options for search. - :vartype ranking_options: "RankingOptions" - :ivar filters: Is either a ComparisonFilter type or a CompoundFilter type. - :vartype filters: "_unions.Filters" - :ivar vector_store_ids: The IDs of the vector stores to search. - :vartype vector_store_ids: list[str] - """ - - name: str - """Optional user-defined name for this tool or configuration.""" - description: str - """Optional user-defined description for this tool or configuration.""" - tool_configs: dict[str, "ToolConfig"] - """Per-tool configuration map. Keys are tool names or ``*`` (catch-all default). Resolution order: - exact tool name match takes priority over ``*``. Unknown tool names are silently ignored at - runtime.""" - type: Required[Literal[ToolboxToolType.FILE_SEARCH]] - """Required. FILE_SEARCH.""" - max_num_results: int - """The maximum number of results to return. This number should be between 1 and 50 inclusive.""" - ranking_options: "RankingOptions" - """Ranking options for search.""" - filters: Optional["_unions.Filters"] - """Is either a ComparisonFilter type or a CompoundFilter type.""" - vector_store_ids: list[str] - """The IDs of the vector stores to search.""" - - -class FixedRatioVersionSelectionRule(TypedDict, total=False): - """FixedRatioVersionSelectionRule. - - :ivar agent_version: The agent version to route traffic to. Required. - :vartype agent_version: str - :ivar type: Required. FIXED_RATIO. - :vartype type: Literal[VersionSelectorType.FIXED_RATIO] - :ivar traffic_percentage: The percentage of traffic to route to the version. Must be between 0 - and 100. Required. - :vartype traffic_percentage: int - """ - - agent_version: Required[str] - """The agent version to route traffic to. Required.""" - type: Required[Literal[VersionSelectorType.FIXED_RATIO]] - """Required. FIXED_RATIO.""" - traffic_percentage: Required[int] - """The percentage of traffic to route to the version. Must be between 0 and 100. Required.""" - - -class FolderDatasetVersion(TypedDict, total=False): - """FileDatasetVersion Definition. - - :ivar data_uri: URI of the data (`example `_). - Required. - :vartype data_uri: str - :ivar is_reference: Indicates if the dataset holds a reference to the storage, or the dataset - manages storage itself. If true, the underlying data will not be deleted when the dataset - version is deleted. - :vartype is_reference: bool - :ivar connection_name: The Azure Storage Account connection name. Required if - startPendingUploadVersion was not called before creating the Dataset. - :vartype connection_name: str - :ivar id: Asset ID, a unique identifier for the asset. - :vartype id: str - :ivar name: The name of the resource. Required. - :vartype name: str - :ivar version: The version of the resource. Required. - :vartype version: str - :ivar description: The asset description text. - :vartype description: str - :ivar tags: Tag dictionary. Tags can be added, removed, and updated. - :vartype tags: dict[str, str] - :ivar type: Dataset type. Required. URI folder. - :vartype type: Literal[DatasetType.URI_FOLDER] - """ - - dataUri: Required[str] - """URI of the data (`example `_). Required.""" - isReference: bool - """Indicates if the dataset holds a reference to the storage, or the dataset manages storage - itself. If true, the underlying data will not be deleted when the dataset version is deleted.""" - connectionName: str - """The Azure Storage Account connection name. Required if startPendingUploadVersion was not called - before creating the Dataset.""" - id: str - """Asset ID, a unique identifier for the asset.""" - name: Required[str] - """The name of the resource. Required.""" - version: Required[str] - """The version of the resource. Required.""" - description: str - """The asset description text.""" - tags: dict[str, str] - """Tag dictionary. Tags can be added, removed, and updated.""" - type: Required[Literal[DatasetType.URI_FOLDER]] - """Dataset type. Required. URI folder.""" - - -class FoundryModelWarning(TypedDict, total=False): - """A warning associated with a model. - - :ivar code: The warning code. Known values are: "RuntimeDependentArtifact" and - "UnclassifiedArtifact". - :vartype code: Union[str, "FoundryModelWarningCode"] - :ivar message: The warning message. - :vartype message: str - """ - - code: Union[str, "FoundryModelWarningCode"] - """The warning code. Known values are: \"RuntimeDependentArtifact\" and \"UnclassifiedArtifact\".""" - message: str - """The warning message.""" - - -class FunctionShellToolParam(TypedDict, total=False): - """Shell tool. - - :ivar type: The type of the shell tool. Always ``shell``. Required. SHELL. - :vartype type: Literal[ToolType.SHELL] - :ivar environment: - :vartype environment: "FunctionShellToolParamEnvironment" - :ivar name: Deprecated. This property is deprecated and will be removed in a future version. - :vartype name: str - :ivar description: Deprecated. This property is deprecated and will be removed in a future - version. - :vartype description: str - :ivar tool_configs: Deprecated. This property is deprecated and will be removed in a future - version. - :vartype tool_configs: dict[str, "ToolConfig"] - """ - - type: Required[Literal[ToolType.SHELL]] - """The type of the shell tool. Always ``shell``. Required. SHELL.""" - environment: Optional["FunctionShellToolParamEnvironment"] - name: str - """Deprecated. This property is deprecated and will be removed in a future version.""" - description: str - """Deprecated. This property is deprecated and will be removed in a future version.""" - tool_configs: dict[str, "ToolConfig"] - """Deprecated. This property is deprecated and will be removed in a future version.""" - - -class FunctionShellToolParamEnvironmentContainerReferenceParam(TypedDict, total=False): # pylint: disable=name-too-long - """FunctionShellToolParamEnvironmentContainerReferenceParam. - - :ivar type: References a container created with the /v1/containers endpoint. Required. - CONTAINER_REFERENCE. - :vartype type: Literal[FunctionShellToolParamEnvironmentType.CONTAINER_REFERENCE] - :ivar container_id: The ID of the referenced container. Required. - :vartype container_id: str - """ - - type: Required[Literal[FunctionShellToolParamEnvironmentType.CONTAINER_REFERENCE]] - """References a container created with the /v1/containers endpoint. Required. CONTAINER_REFERENCE.""" - container_id: Required[str] - """The ID of the referenced container. Required.""" - - -class FunctionShellToolParamEnvironmentLocalEnvironmentParam(TypedDict, total=False): # pylint: disable=name-too-long - """FunctionShellToolParamEnvironmentLocalEnvironmentParam. - - :ivar type: Use a local computer environment. Required. LOCAL. - :vartype type: Literal[FunctionShellToolParamEnvironmentType.LOCAL] - :ivar skills: An optional list of skills. - :vartype skills: list["LocalSkillParam"] - """ - - type: Required[Literal[FunctionShellToolParamEnvironmentType.LOCAL]] - """Use a local computer environment. Required. LOCAL.""" - skills: list["LocalSkillParam"] - """An optional list of skills.""" - - -class FunctionTool(TypedDict, total=False): - """Function. - - :ivar type: The type of the function tool. Always ``function``. Required. FUNCTION. - :vartype type: Literal[ToolType.FUNCTION] - :ivar name: The name of the function to call. Required. - :vartype name: str - :ivar description: - :vartype description: str - :ivar parameters: Required. - :vartype parameters: dict[str, Any] - :ivar strict: Required. - :vartype strict: bool - :ivar defer_loading: Whether this function is deferred and loaded via tool search. - :vartype defer_loading: bool - """ - - type: Required[Literal[ToolType.FUNCTION]] - """The type of the function tool. Always ``function``. Required. FUNCTION.""" - name: Required[str] - """The name of the function to call. Required.""" - description: Optional[str] - parameters: Required[Optional[dict[str, Any]]] - """Required.""" - strict: Required[Optional[bool]] - """Required.""" - defer_loading: bool - """Whether this function is deferred and loaded via tool search.""" - - -class FunctionToolParam(TypedDict, total=False): - """FunctionToolParam. - - :ivar name: Required. - :vartype name: str - :ivar description: - :vartype description: str - :ivar parameters: - :vartype parameters: "EmptyModelParam" - :ivar strict: - :vartype strict: bool - :ivar type: Required. Default value is "function". - :vartype type: Literal["function"] - :ivar defer_loading: Whether this function should be deferred and discovered via tool search. - :vartype defer_loading: bool - """ - - name: Required[str] - """Required.""" - description: Optional[str] - parameters: Optional["EmptyModelParam"] - strict: Optional[bool] - type: Required[Literal["function"]] - """Required. Default value is \"function\".""" - defer_loading: bool - """Whether this function should be deferred and discovered via tool search.""" - - -class GitHubIssueRoutineTrigger(TypedDict, total=False): - """A GitHub issue routine trigger. - - :ivar type: The trigger type. Required. A GitHub issue trigger. - :vartype type: Literal[RoutineTriggerType.GITHUB_ISSUE] - :ivar connection_id: The workspace connection identifier that resolves the GitHub configuration - for the trigger. Required. - :vartype connection_id: str - :ivar owner: The GitHub owner or organization that scopes which issues can fire the trigger. - Required. - :vartype owner: str - :ivar repository: The GitHub repository filter that scopes which issues can fire the trigger. - Required. - :vartype repository: str - :ivar issue_event: The GitHub issue event that fires the routine. Required. Known values are: - "opened" and "closed". - :vartype issue_event: Union[str, "GitHubIssueEvent"] - """ - - type: Required[Literal[RoutineTriggerType.GITHUB_ISSUE]] - """The trigger type. Required. A GitHub issue trigger.""" - connection_id: Required[str] - """The workspace connection identifier that resolves the GitHub configuration for the trigger. - Required.""" - owner: Required[str] - """The GitHub owner or organization that scopes which issues can fire the trigger. Required.""" - repository: Required[str] - """The GitHub repository filter that scopes which issues can fire the trigger. Required.""" - issue_event: Required[Union[str, "GitHubIssueEvent"]] - """The GitHub issue event that fires the routine. Required. Known values are: \"opened\" and - \"closed\".""" - - -class HeaderTelemetryEndpointAuth(TypedDict, total=False): - """Header-based secret authentication for a telemetry endpoint. The resolved secret value is - injected as an HTTP header. - - :ivar type: The authentication type, always 'header' for header-based secret authentication. - Required. Header-based secret authentication. - :vartype type: Literal[TelemetryEndpointAuthType.HEADER] - :ivar header_name: The name of the HTTP header to inject the secret value into. Required. - :vartype header_name: str - :ivar secret_id: The identifier of the secret store or connection. Required. - :vartype secret_id: str - :ivar secret_key: The key within the secret to retrieve the authentication value. Required. - :vartype secret_key: str - """ - - type: Required[Literal[TelemetryEndpointAuthType.HEADER]] - """The authentication type, always 'header' for header-based secret authentication. Required. - Header-based secret authentication.""" - header_name: Required[str] - """The name of the HTTP header to inject the secret value into. Required.""" - secret_id: Required[str] - """The identifier of the secret store or connection. Required.""" - secret_key: Required[str] - """The key within the secret to retrieve the authentication value. Required.""" - - -class HostedAgentDefinition(TypedDict, total=False): - """The hosted agent definition. - - :ivar rai_config: Configuration for Responsible AI (RAI) content filtering and safety features. - :vartype rai_config: "RaiConfig" - :ivar kind: Required. HOSTED. - :vartype kind: Literal[AgentKind.HOSTED] - :ivar cpu: The CPU configuration for the hosted agent. Required. - :vartype cpu: str - :ivar memory: The memory configuration for the hosted agent. Required. - :vartype memory: str - :ivar environment_variables: Environment variables to set in the hosted agent container. - :vartype environment_variables: dict[str, str] - :ivar container_configuration: Container-based deployment configuration. Provide this for - image-based deployments. Mutually exclusive with code_configuration — the service validates - that exactly one is set. - :vartype container_configuration: "ContainerConfiguration" - :ivar protocol_versions: The protocols that the agent supports for ingress communication. - :vartype protocol_versions: list["ProtocolVersionRecord"] - :ivar code_configuration: Code-based deployment configuration. Provide this for code-based - deployments. Mutually exclusive with container_configuration — the service validates that - exactly one is set. - :vartype code_configuration: "CodeConfiguration" - :ivar telemetry_config: Optional customer-supplied telemetry configuration for exporting - container logs, traces, and metrics. - :vartype telemetry_config: "TelemetryConfig" - """ - - rai_config: "RaiConfig" - """Configuration for Responsible AI (RAI) content filtering and safety features.""" - kind: Required[Literal[AgentKind.HOSTED]] - """Required. HOSTED.""" - cpu: Required[str] - """The CPU configuration for the hosted agent. Required.""" - memory: Required[str] - """The memory configuration for the hosted agent. Required.""" - environment_variables: dict[str, str] - """Environment variables to set in the hosted agent container.""" - container_configuration: "ContainerConfiguration" - """Container-based deployment configuration. Provide this for image-based deployments. Mutually - exclusive with code_configuration — the service validates that exactly one is set.""" - protocol_versions: list["ProtocolVersionRecord"] - """The protocols that the agent supports for ingress communication.""" - code_configuration: "CodeConfiguration" - """Code-based deployment configuration. Provide this for code-based deployments. Mutually - exclusive with container_configuration — the service validates that exactly one is set.""" - telemetry_config: "TelemetryConfig" - """Optional customer-supplied telemetry configuration for exporting container logs, traces, and - metrics.""" - - -class HourlyRecurrenceSchedule(TypedDict, total=False): - """Hourly recurrence schedule. - - :ivar type: Required. Hourly recurrence pattern. - :vartype type: Literal[RecurrenceType.HOURLY] - """ - - type: Required[Literal[RecurrenceType.HOURLY]] - """Required. Hourly recurrence pattern.""" - - -class HumanEvaluationPreviewRuleAction(TypedDict, total=False): - """Evaluation rule action for human evaluation. - - :ivar type: Required. Human evaluation preview. - :vartype type: Literal[EvaluationRuleActionType.HUMAN_EVALUATION_PREVIEW] - :ivar template_id: Human evaluation template Id. Required. - :vartype template_id: str - """ - - type: Required[Literal[EvaluationRuleActionType.HUMAN_EVALUATION_PREVIEW]] - """Required. Human evaluation preview.""" - templateId: Required[str] - """Human evaluation template Id. Required.""" - - -class HybridSearchOptions(TypedDict, total=False): - """HybridSearchOptions. - - :ivar embedding_weight: The weight of the embedding in the reciprocal ranking fusion. Required. - :vartype embedding_weight: float - :ivar text_weight: The weight of the text in the reciprocal ranking fusion. Required. - :vartype text_weight: float - """ - - embedding_weight: Required[float] - """The weight of the embedding in the reciprocal ranking fusion. Required.""" - text_weight: Required[float] - """The weight of the text in the reciprocal ranking fusion. Required.""" - - -class ImageGenTool(TypedDict, total=False): - """Image generation tool. - - :ivar type: The type of the image generation tool. Always ``image_generation``. Required. - IMAGE_GENERATION. - :vartype type: Literal[ToolType.IMAGE_GENERATION] - :ivar model: Is one of the following types: Literal["gpt-image-1"], - Literal["gpt-image-1-mini"], Literal["gpt-image-1.5"], str - :vartype model: Union[Literal["gpt-image-1"], Literal["gpt-image-1-mini"], - Literal["gpt-image-1.5"], str] - :ivar quality: The quality of the generated image. One of ``low``, ``medium``, ``high``, or - ``auto``. Default: ``auto``. Is one of the following types: Literal["low"], Literal["medium"], - Literal["high"], Literal["auto"] - :vartype quality: Literal["low", "medium", "high", "auto"] - :ivar size: The size of the generated images. For ``gpt-image-2`` and - ``gpt-image-2-2026-04-21``, arbitrary resolutions are supported as ``WIDTHxHEIGHT`` strings, - for example ``1536x864``. Width and height must both be divisible by 16 and the requested - aspect ratio must be between 1:3 and 3:1. Resolutions above ``2560x1440`` are experimental, and - the maximum supported resolution is ``3840x2160``. The requested size must also satisfy the - model's current pixel and edge limits. The standard sizes ``1024x1024``, ``1536x1024``, and - ``1024x1536`` are supported by the GPT image models; ``auto`` is supported for models that - allow automatic sizing. For ``dall-e-2``, use one of ``256x256``, ``512x512``, or - ``1024x1024``. For ``dall-e-3``, use one of ``1024x1024``, ``1792x1024``, or ``1024x1792``. Is - one of the following types: Literal["1024x1024"], Literal["1024x1536"], Literal["1536x1024"], - Literal["auto"], str - :vartype size: Union[Literal["1024x1024"], Literal["1024x1536"], Literal["1536x1024"], - Literal["auto"], str] - :ivar output_format: The output format of the generated image. One of ``png``, ``webp``, or - ``jpeg``. Default: ``png``. Is one of the following types: Literal["png"], Literal["webp"], - Literal["jpeg"] - :vartype output_format: Literal["png", "webp", "jpeg"] - :ivar output_compression: Compression level for the output image. Default: 100. - :vartype output_compression: int - :ivar moderation: Moderation level for the generated image. Default: ``auto``. Is either a - Literal["auto"] type or a Literal["low"] type. - :vartype moderation: Literal["auto", "low"] - :ivar background: Background type for the generated image. One of ``transparent``, ``opaque``, - or ``auto``. Default: ``auto``. Is one of the following types: Literal["transparent"], - Literal["opaque"], Literal["auto"] - :vartype background: Literal["transparent", "opaque", "auto"] - :ivar input_fidelity: Known values are: "high" and "low". - :vartype input_fidelity: Union[str, "InputFidelity"] - :ivar input_image_mask: Optional mask for inpainting. Contains ``image_url`` (string, optional) - and ``file_id`` (string, optional). - :vartype input_image_mask: "ImageGenToolInputImageMask" - :ivar partial_images: Number of partial images to generate in streaming mode, from 0 (default - value) to 3. - :vartype partial_images: int - :ivar action: Whether to generate a new image or edit an existing image. Default: ``auto``. - Known values are: "generate", "edit", and "auto". - :vartype action: Union[str, "ImageGenAction"] - :ivar name: Deprecated. This property is deprecated and will be removed in a future version. - :vartype name: str - :ivar description: Deprecated. This property is deprecated and will be removed in a future - version. - :vartype description: str - :ivar tool_configs: Deprecated. This property is deprecated and will be removed in a future - version. - :vartype tool_configs: dict[str, "ToolConfig"] - """ - - type: Required[Literal[ToolType.IMAGE_GENERATION]] - """The type of the image generation tool. Always ``image_generation``. Required. IMAGE_GENERATION.""" - model: Union[Literal["gpt-image-1"], Literal["gpt-image-1-mini"], Literal["gpt-image-1.5"], str] - """Is one of the following types: Literal[\"gpt-image-1\"], Literal[\"gpt-image-1-mini\"], - Literal[\"gpt-image-1.5\"], str""" - quality: Literal["low", "medium", "high", "auto"] - """The quality of the generated image. One of ``low``, ``medium``, ``high``, or ``auto``. Default: - ``auto``. Is one of the following types: Literal[\"low\"], Literal[\"medium\"], - Literal[\"high\"], Literal[\"auto\"]""" - size: Union[Literal["1024x1024"], Literal["1024x1536"], Literal["1536x1024"], Literal["auto"], str] - """The size of the generated images. For ``gpt-image-2`` and ``gpt-image-2-2026-04-21``, arbitrary - resolutions are supported as ``WIDTHxHEIGHT`` strings, for example ``1536x864``. Width and - height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. - Resolutions above ``2560x1440`` are experimental, and the maximum supported resolution is - ``3840x2160``. The requested size must also satisfy the model's current pixel and edge limits. - The standard sizes ``1024x1024``, ``1536x1024``, and ``1024x1536`` are supported by the GPT - image models; ``auto`` is supported for models that allow automatic sizing. For ``dall-e-2``, - use one of ``256x256``, ``512x512``, or ``1024x1024``. For ``dall-e-3``, use one of - ``1024x1024``, ``1792x1024``, or ``1024x1792``. Is one of the following types: - Literal[\"1024x1024\"], Literal[\"1024x1536\"], Literal[\"1536x1024\"], Literal[\"auto\"], str""" - output_format: Literal["png", "webp", "jpeg"] - """The output format of the generated image. One of ``png``, ``webp``, or ``jpeg``. Default: - ``png``. Is one of the following types: Literal[\"png\"], Literal[\"webp\"], Literal[\"jpeg\"]""" - output_compression: int - """Compression level for the output image. Default: 100.""" - moderation: Literal["auto", "low"] - """Moderation level for the generated image. Default: ``auto``. Is either a Literal[\"auto\"] type - or a Literal[\"low\"] type.""" - background: Literal["transparent", "opaque", "auto"] - """Background type for the generated image. One of ``transparent``, ``opaque``, or ``auto``. - Default: ``auto``. Is one of the following types: Literal[\"transparent\"], - Literal[\"opaque\"], Literal[\"auto\"]""" - input_fidelity: Optional[Union[str, "InputFidelity"]] - """Known values are: \"high\" and \"low\".""" - input_image_mask: "ImageGenToolInputImageMask" - """Optional mask for inpainting. Contains ``image_url`` (string, optional) and ``file_id`` - (string, optional).""" - partial_images: int - """Number of partial images to generate in streaming mode, from 0 (default value) to 3.""" - action: Union[str, "ImageGenAction"] - """Whether to generate a new image or edit an existing image. Default: ``auto``. Known values are: - \"generate\", \"edit\", and \"auto\".""" - name: str - """Deprecated. This property is deprecated and will be removed in a future version.""" - description: str - """Deprecated. This property is deprecated and will be removed in a future version.""" - tool_configs: dict[str, "ToolConfig"] - """Deprecated. This property is deprecated and will be removed in a future version.""" - - -class ImageGenToolInputImageMask(TypedDict, total=False): - """ImageGenToolInputImageMask. - - :ivar image_url: - :vartype image_url: str - :ivar file_id: - :vartype file_id: str - """ - - image_url: str - file_id: str - - -class InlineSkillParam(TypedDict, total=False): - """InlineSkillParam. - - :ivar type: Defines an inline skill for this request. Required. INLINE. - :vartype type: Literal[ContainerSkillType.INLINE] - :ivar name: The name of the skill. Required. - :vartype name: str - :ivar description: The description of the skill. Required. - :vartype description: str - :ivar source: Inline skill payload. Required. - :vartype source: "InlineSkillSourceParam" - """ - - type: Required[Literal[ContainerSkillType.INLINE]] - """Defines an inline skill for this request. Required. INLINE.""" - name: Required[str] - """The name of the skill. Required.""" - description: Required[str] - """The description of the skill. Required.""" - source: Required["InlineSkillSourceParam"] - """Inline skill payload. Required.""" - - -class InlineSkillSourceParam(TypedDict, total=False): - """Inline skill payload. - - :ivar type: The type of the inline skill source. Must be ``base64``. Required. Default value is - "base64". - :vartype type: Literal["base64"] - :ivar media_type: The media type of the inline skill payload. Must be ``application/zip``. - Required. Default value is "application/zip". - :vartype media_type: Literal["application/zip"] - :ivar data: Base64-encoded skill zip bundle. Required. - :vartype data: str - """ - - type: Required[Literal["base64"]] - """The type of the inline skill source. Must be ``base64``. Required. Default value is \"base64\".""" - media_type: Required[Literal["application/zip"]] - """The media type of the inline skill payload. Must be ``application/zip``. Required. Default - value is \"application/zip\".""" - data: Required[str] - """Base64-encoded skill zip bundle. Required.""" - - -class Insight(TypedDict, total=False): - """The response body for cluster insights. - - :ivar insight_id: The unique identifier for the insights report. Required. - :vartype insight_id: str - :ivar metadata: Metadata about the insights report. Required. - :vartype metadata: "InsightsMetadata" - :ivar state: The current state of the insights. Required. Known values are: "NotStarted", - "Running", "Succeeded", "Failed", and "Canceled". - :vartype state: Union[str, "OperationState"] - :ivar display_name: User friendly display name for the insight. Required. - :vartype display_name: str - :ivar request: Request for the insights analysis. Required. - :vartype request: "InsightRequest" - :ivar result: The result of the insights report. - :vartype result: "InsightResult" - """ - - id: Required[str] - """The unique identifier for the insights report. Required.""" - metadata: Required["InsightsMetadata"] - """Metadata about the insights report. Required.""" - state: Required[Union[str, "OperationState"]] - """The current state of the insights. Required. Known values are: \"NotStarted\", \"Running\", - \"Succeeded\", \"Failed\", and \"Canceled\".""" - displayName: Required[str] - """User friendly display name for the insight. Required.""" - request: Required["InsightRequest"] - """Request for the insights analysis. Required.""" - result: "InsightResult" - """The result of the insights report.""" - - -class InsightCluster(TypedDict, total=False): - """A cluster of analysis samples. - - :ivar id: The id of the analysis cluster. Required. - :vartype id: str - :ivar label: Label for the cluster. Required. - :vartype label: str - :ivar suggestion: Suggestion for the cluster. Required. - :vartype suggestion: str - :ivar suggestion_title: The title of the suggestion for the cluster. Required. - :vartype suggestion_title: str - :ivar description: Description of the analysis cluster. Required. - :vartype description: str - :ivar weight: The weight of the analysis cluster. This indicate number of samples in the - cluster. Required. - :vartype weight: int - :ivar sub_clusters: List of subclusters within this cluster. Empty if no subclusters exist. - :vartype sub_clusters: list["InsightCluster"] - :ivar samples: List of samples that belong to this cluster. Empty if samples are part of - subclusters. - :vartype samples: list["InsightSample"] - """ - - id: Required[str] - """The id of the analysis cluster. Required.""" - label: Required[str] - """Label for the cluster. Required.""" - suggestion: Required[str] - """Suggestion for the cluster. Required.""" - suggestionTitle: Required[str] - """The title of the suggestion for the cluster. Required.""" - description: Required[str] - """Description of the analysis cluster. Required.""" - weight: Required[int] - """The weight of the analysis cluster. This indicate number of samples in the cluster. Required.""" - subClusters: list["InsightCluster"] - """List of subclusters within this cluster. Empty if no subclusters exist.""" - samples: list["InsightSample"] - """List of samples that belong to this cluster. Empty if samples are part of subclusters.""" - - -class InsightModelConfiguration(TypedDict, total=False): - """Configuration of the model used in the insight generation. - - :ivar model_deployment_name: The model deployment to be evaluated. Accepts either the - deployment name alone or with the connection name as '{connectionName}/'. - Required. - :vartype model_deployment_name: str - """ - - modelDeploymentName: Required[str] - """The model deployment to be evaluated. Accepts either the deployment name alone or with the - connection name as '{connectionName}/'. Required.""" - - -class InsightScheduleTask(TypedDict, total=False): - """Insight task for the schedule. - - :ivar configuration: Configuration for the task. - :vartype configuration: dict[str, str] - :ivar type: Required. Insight task. - :vartype type: Literal[ScheduleTaskType.INSIGHT] - :ivar insight: The insight payload. Required. - :vartype insight: "Insight" - """ - - configuration: dict[str, str] - """Configuration for the task.""" - type: Required[Literal[ScheduleTaskType.INSIGHT]] - """Required. Insight task.""" - insight: Required["Insight"] - """The insight payload. Required.""" - - -class InsightsMetadata(TypedDict, total=False): - """Metadata about the insights. - - :ivar created_at: The timestamp when the insights were created. Required. - :vartype created_at: str - :ivar completed_at: The timestamp when the insights were completed. - :vartype completed_at: str - """ - - createdAt: Required[str] - """The timestamp when the insights were created. Required.""" - completedAt: str - """The timestamp when the insights were completed.""" - - -class InsightSummary(TypedDict, total=False): - """Summary of the error cluster analysis. - - :ivar sample_count: Total number of samples analyzed. Required. - :vartype sample_count: int - :ivar unique_subcluster_count: Total number of unique subcluster labels. Required. - :vartype unique_subcluster_count: int - :ivar unique_cluster_count: Total number of unique clusters. Required. - :vartype unique_cluster_count: int - :ivar method: Method used for clustering. Required. - :vartype method: str - :ivar usage: Token usage while performing clustering analysis. Required. - :vartype usage: "ClusterTokenUsage" - """ - - sampleCount: Required[int] - """Total number of samples analyzed. Required.""" - uniqueSubclusterCount: Required[int] - """Total number of unique subcluster labels. Required.""" - uniqueClusterCount: Required[int] - """Total number of unique clusters. Required.""" - method: Required[str] - """Method used for clustering. Required.""" - usage: Required["ClusterTokenUsage"] - """Token usage while performing clustering analysis. Required.""" - - -class InvocationsProtocolConfiguration(TypedDict, total=False): - """Configuration specific to the invocations protocol.""" - - -class InvocationsWsProtocolConfiguration(TypedDict, total=False): - """Configuration specific to the WebSocket-based invocations protocol.""" - - -class InvokeAgentInvocationsApiDispatchPayload(TypedDict, total=False): - """A manual payload used to test an invocations API routine dispatch. - - :ivar type: The manual dispatch payload type. Required. A manual payload for an invocations API - routine dispatch. - :vartype type: Literal[RoutineDispatchPayloadType.INVOKE_AGENT_INVOCATIONS_API] - :ivar input: The JSON value sent as the complete downstream invocations input. The value is - passed through as-is and can be an object, string, number, boolean, array, or null. Required. - :vartype input: Any - """ - - type: Required[Literal[RoutineDispatchPayloadType.INVOKE_AGENT_INVOCATIONS_API]] - """The manual dispatch payload type. Required. A manual payload for an invocations API routine - dispatch.""" - input: Required[Any] - """The JSON value sent as the complete downstream invocations input. The value is passed through - as-is and can be an object, string, number, boolean, array, or null. Required.""" - - -class InvokeAgentInvocationsApiRoutineAction(TypedDict, total=False): - """Dispatches a routine through the raw invocations API. Exactly one of agent_name or - agent_endpoint_id must be provided. - - :ivar type: The action type. Required. Dispatches through the raw invocations API. - :vartype type: Literal[RoutineActionType.INVOKE_AGENT_INVOCATIONS_API] - :ivar agent_name: The project-scoped agent name for routine dispatch. - :vartype agent_name: str - :ivar agent_endpoint_id: Legacy endpoint-scoped agent identifier for routine dispatch. - :vartype agent_endpoint_id: str - :ivar input: Static JSON value sent as the complete downstream input when the routine fires. - The value is passed through as-is; no templating is applied. - :vartype input: Any - :ivar session_id: An optional existing hosted-agent session identifier to continue during the - downstream dispatch. - :vartype session_id: str - """ - - type: Required[Literal[RoutineActionType.INVOKE_AGENT_INVOCATIONS_API]] - """The action type. Required. Dispatches through the raw invocations API.""" - agent_name: str - """The project-scoped agent name for routine dispatch.""" - agent_endpoint_id: str - """Legacy endpoint-scoped agent identifier for routine dispatch.""" - input: Any - """Static JSON value sent as the complete downstream input when the routine fires. The value is - passed through as-is; no templating is applied.""" - session_id: str - """An optional existing hosted-agent session identifier to continue during the downstream - dispatch.""" - - -class InvokeAgentResponsesApiDispatchPayload(TypedDict, total=False): - """A manual payload used to test a responses API routine dispatch. - - :ivar type: The manual dispatch payload type. Required. A manual payload for a responses API - routine dispatch. - :vartype type: Literal[RoutineDispatchPayloadType.INVOKE_AGENT_RESPONSES_API] - :ivar input: The JSON value sent as the complete downstream responses input. The value is - passed through as-is and can be an object, string, number, boolean, array, or null. Required. - :vartype input: Any - """ - - type: Required[Literal[RoutineDispatchPayloadType.INVOKE_AGENT_RESPONSES_API]] - """The manual dispatch payload type. Required. A manual payload for a responses API routine - dispatch.""" - input: Required[Any] - """The JSON value sent as the complete downstream responses input. The value is passed through - as-is and can be an object, string, number, boolean, array, or null. Required.""" - - -class InvokeAgentResponsesApiRoutineAction(TypedDict, total=False): - """Dispatches a routine through the responses API. Exactly one of agent_name or agent_endpoint_id - must be provided. - - :ivar type: The action type. Required. Dispatches through the responses API. - :vartype type: Literal[RoutineActionType.INVOKE_AGENT_RESPONSES_API] - :ivar agent_name: The project-scoped agent name for routine dispatch. - :vartype agent_name: str - :ivar agent_endpoint_id: Legacy endpoint-scoped agent identifier for routine dispatch. - :vartype agent_endpoint_id: str - :ivar input: Static JSON value sent as the complete downstream input when the routine fires. - The value is passed through as-is; no templating is applied. - :vartype input: Any - :ivar conversation: An optional existing conversation identifier to continue during the - downstream dispatch. - :vartype conversation: str - """ - - type: Required[Literal[RoutineActionType.INVOKE_AGENT_RESPONSES_API]] - """The action type. Required. Dispatches through the responses API.""" - agent_name: str - """The project-scoped agent name for routine dispatch.""" - agent_endpoint_id: str - """Legacy endpoint-scoped agent identifier for routine dispatch.""" - input: Any - """Static JSON value sent as the complete downstream input when the routine fires. The value is - passed through as-is; no templating is applied.""" - conversation: str - """An optional existing conversation identifier to continue during the downstream dispatch.""" - - -class LocalShellToolParam(TypedDict, total=False): - """Local shell tool. - - :ivar type: The type of the local shell tool. Always ``local_shell``. Required. LOCAL_SHELL. - :vartype type: Literal[ToolType.LOCAL_SHELL] - :ivar name: Deprecated. This property is deprecated and will be removed in a future version. - :vartype name: str - :ivar description: Deprecated. This property is deprecated and will be removed in a future - version. - :vartype description: str - :ivar tool_configs: Deprecated. This property is deprecated and will be removed in a future - version. - :vartype tool_configs: dict[str, "ToolConfig"] - """ - - type: Required[Literal[ToolType.LOCAL_SHELL]] - """The type of the local shell tool. Always ``local_shell``. Required. LOCAL_SHELL.""" - name: str - """Deprecated. This property is deprecated and will be removed in a future version.""" - description: str - """Deprecated. This property is deprecated and will be removed in a future version.""" - tool_configs: dict[str, "ToolConfig"] - """Deprecated. This property is deprecated and will be removed in a future version.""" - - -class LocalSkillParam(TypedDict, total=False): - """LocalSkillParam. - - :ivar name: The name of the skill. Required. - :vartype name: str - :ivar description: The description of the skill. Required. - :vartype description: str - :ivar path: The path to the directory containing the skill. Required. - :vartype path: str - """ - - name: Required[str] - """The name of the skill. Required.""" - description: Required[str] - """The description of the skill. Required.""" - path: Required[str] - """The path to the directory containing the skill. Required.""" - - -class LoraConfig(TypedDict, total=False): - """Adapter-specific metadata for LoRA models. Drives serving engine configuration at deployment - time. - - :ivar rank: LoRA rank (r). Positive integer. Common values: 8, 16, 32, 64. - :vartype rank: int - :ivar alpha: LoRA scaling factor (α). Positive integer; typically 2× the rank. - :vartype alpha: int - :ivar target_modules: Model layers modified by the adapter (e.g., q_proj, v_proj). - Auto-detected from adapter_config.json if omitted. - :vartype target_modules: list[str] - :ivar dropout: Dropout rate used during training. Informational — not used at serving time. - :vartype dropout: float - """ - - rank: int - """LoRA rank (r). Positive integer. Common values: 8, 16, 32, 64.""" - alpha: int - """LoRA scaling factor (α). Positive integer; typically 2× the rank.""" - targetModules: list[str] - """Model layers modified by the adapter (e.g., q_proj, v_proj). Auto-detected from - adapter_config.json if omitted.""" - dropout: float - """Dropout rate used during training. Informational — not used at serving time.""" - - -class ManagedAgentIdentityBlueprintReference(TypedDict, total=False): - """ManagedAgentIdentityBlueprintReference. - - :ivar type: Required. MANAGED_AGENT_IDENTITY_BLUEPRINT. - :vartype type: Literal[AgentBlueprintReferenceType.MANAGED_AGENT_IDENTITY_BLUEPRINT] - :ivar blueprint_id: The ID of the managed blueprint. Required. - :vartype blueprint_id: str - """ - - type: Required[Literal[AgentBlueprintReferenceType.MANAGED_AGENT_IDENTITY_BLUEPRINT]] - """Required. MANAGED_AGENT_IDENTITY_BLUEPRINT.""" - blueprint_id: Required[str] - """The ID of the managed blueprint. Required.""" - - -class ManagedAzureAISearchIndex(TypedDict, total=False): - """Managed Azure AI Search Index Definition. - - :ivar id: Asset ID, a unique identifier for the asset. - :vartype id: str - :ivar name: The name of the resource. Required. - :vartype name: str - :ivar version: The version of the resource. Required. - :vartype version: str - :ivar description: The asset description text. - :vartype description: str - :ivar tags: Tag dictionary. Tags can be added, removed, and updated. - :vartype tags: dict[str, str] - :ivar type: Type of index. Required. Managed Azure Search. - :vartype type: Literal[IndexType.MANAGED_AZURE_SEARCH] - :ivar vector_store_id: Vector store id of managed index. Required. - :vartype vector_store_id: str - """ - - id: str - """Asset ID, a unique identifier for the asset.""" - name: Required[str] - """The name of the resource. Required.""" - version: Required[str] - """The version of the resource. Required.""" - description: str - """The asset description text.""" - tags: dict[str, str] - """Tag dictionary. Tags can be added, removed, and updated.""" - type: Required[Literal[IndexType.MANAGED_AZURE_SEARCH]] - """Type of index. Required. Managed Azure Search.""" - vectorStoreId: Required[str] - """Vector store id of managed index. Required.""" - - -class McpProtocolConfiguration(TypedDict, total=False): - """Configuration specific to the MCP protocol.""" - - -class MCPTool(TypedDict, total=False): - """MCP tool. - - :ivar type: The type of the MCP tool. Always ``mcp``. Required. MCP. - :vartype type: Literal[ToolType.MCP] - :ivar server_label: A label for this MCP server, used to identify it in tool calls. Required. - :vartype server_label: str - :ivar server_url: The URL for the MCP server. One of ``server_url``, ``connector_id``, or - ``tunnel_id`` must be provided. - :vartype server_url: str - :ivar connector_id: Identifier for service connectors, like those available in ChatGPT. One of - ``server_url``, ``connector_id``, or ``tunnel_id`` must be provided. Learn more about service - connectors `here `_. Currently supported - ``connector_id`` values are: - - * Dropbox: `connector_dropbox` - * Gmail: `connector_gmail` - * Google Calendar: `connector_googlecalendar` - * Google Drive: `connector_googledrive` - * Microsoft Teams: `connector_microsoftteams` - * Outlook Calendar: `connector_outlookcalendar` - * Outlook Email: `connector_outlookemail` - * SharePoint: `connector_sharepoint`. Is one of the following types: - Literal["connector_dropbox"], Literal["connector_gmail"], Literal["connector_googlecalendar"], - Literal["connector_googledrive"], Literal["connector_microsoftteams"], - Literal["connector_outlookcalendar"], Literal["connector_outlookemail"], - Literal["connector_sharepoint"] - :vartype connector_id: Literal["connector_dropbox", "connector_gmail", - "connector_googlecalendar", "connector_googledrive", "connector_microsoftteams", - "connector_outlookcalendar", "connector_outlookemail", "connector_sharepoint"] - :ivar tunnel_id: The Secure MCP Tunnel ID to use instead of a direct server URL. One of - ``server_url``, ``connector_id``, or ``tunnel_id`` must be provided. - :vartype tunnel_id: str - :ivar authorization: An OAuth access token that can be used with a remote MCP server, either - with a custom MCP server URL or a service connector. Your application must handle the OAuth - authorization flow and provide the token here. - :vartype authorization: str - :ivar server_description: Optional description of the MCP server, used to provide more context. - :vartype server_description: str - :ivar headers: - :vartype headers: dict[str, str] - :ivar allowed_tools: Is either a [str] type or a MCPToolFilter type. - :vartype allowed_tools: Union[list[str], "MCPToolFilter"] - :ivar require_approval: Is one of the following types: MCPToolRequireApproval, - Literal["always"], Literal["never"] - :vartype require_approval: Union["MCPToolRequireApproval", Literal["always"], Literal["never"]] - :ivar defer_loading: Whether this MCP tool is deferred and discovered via tool search. - :vartype defer_loading: bool - :ivar project_connection_id: The connection ID in the project for the MCP server. The - connection stores authentication and other connection details needed to connect to the MCP - server. - :vartype project_connection_id: str - :ivar tool_configs: Deprecated. This property is deprecated and will be removed in a future - version. - :vartype tool_configs: dict[str, "ToolConfig"] - """ - - type: Required[Literal[ToolType.MCP]] - """The type of the MCP tool. Always ``mcp``. Required. MCP.""" - server_label: Required[str] - """A label for this MCP server, used to identify it in tool calls. Required.""" - server_url: str - """The URL for the MCP server. One of ``server_url``, ``connector_id``, or ``tunnel_id`` must be - provided.""" - connector_id: Literal[ - "connector_dropbox", - "connector_gmail", - "connector_googlecalendar", - "connector_googledrive", - "connector_microsoftteams", - "connector_outlookcalendar", - "connector_outlookemail", - "connector_sharepoint", - ] - """Identifier for service connectors, like those available in ChatGPT. One of ``server_url``, - ``connector_id``, or ``tunnel_id`` must be provided. Learn more about service connectors `here - `_. Currently supported ``connector_id`` values are: - - * Dropbox: `connector_dropbox` - * Gmail: `connector_gmail` - * Google Calendar: `connector_googlecalendar` - * Google Drive: `connector_googledrive` - * Microsoft Teams: `connector_microsoftteams` - * Outlook Calendar: `connector_outlookcalendar` - * Outlook Email: `connector_outlookemail` - * SharePoint: `connector_sharepoint`. Is one of the following types: - Literal[\"connector_dropbox\"], Literal[\"connector_gmail\"], - Literal[\"connector_googlecalendar\"], Literal[\"connector_googledrive\"], - Literal[\"connector_microsoftteams\"], Literal[\"connector_outlookcalendar\"], - Literal[\"connector_outlookemail\"], Literal[\"connector_sharepoint\"]""" - tunnel_id: str - """The Secure MCP Tunnel ID to use instead of a direct server URL. One of ``server_url``, - ``connector_id``, or ``tunnel_id`` must be provided.""" - authorization: str - """An OAuth access token that can be used with a remote MCP server, either with a custom MCP - server URL or a service connector. Your application must handle the OAuth authorization flow - and provide the token here.""" - server_description: str - """Optional description of the MCP server, used to provide more context.""" - headers: Optional[dict[str, str]] - allowed_tools: Optional[Union[list[str], "MCPToolFilter"]] - """Is either a [str] type or a MCPToolFilter type.""" - require_approval: Optional[Union["MCPToolRequireApproval", Literal["always"], Literal["never"]]] - """Is one of the following types: MCPToolRequireApproval, Literal[\"always\"], Literal[\"never\"]""" - defer_loading: bool - """Whether this MCP tool is deferred and discovered via tool search.""" - project_connection_id: str - """The connection ID in the project for the MCP server. The connection stores authentication and - other connection details needed to connect to the MCP server.""" - tool_configs: dict[str, "ToolConfig"] - """Deprecated. This property is deprecated and will be removed in a future version.""" - - -class MCPToolboxTool(TypedDict, total=False): - """An MCP tool stored in a toolbox. - - :ivar name: Optional user-defined name for this tool or configuration. - :vartype name: str - :ivar description: Optional user-defined description for this tool or configuration. - :vartype description: str - :ivar tool_configs: Per-tool configuration map. Keys are tool names or ``*`` (catch-all - default). Resolution order: exact tool name match takes priority over ``*``. Unknown tool names - are silently ignored at runtime. - :vartype tool_configs: dict[str, "ToolConfig"] - :ivar type: Required. MCP. - :vartype type: Literal[ToolboxToolType.MCP] - :ivar server_label: A label for this MCP server, used to identify it in tool calls. Required. - :vartype server_label: str - :ivar server_url: The URL for the MCP server. One of ``server_url``, ``connector_id``, or - ``tunnel_id`` must be provided. - :vartype server_url: str - :ivar connector_id: Identifier for service connectors, like those available in ChatGPT. One of - ``server_url``, ``connector_id``, or ``tunnel_id`` must be provided. Learn more about service - connectors `here `_. Currently supported - ``connector_id`` values are: - - * Dropbox: `connector_dropbox` - * Gmail: `connector_gmail` - * Google Calendar: `connector_googlecalendar` - * Google Drive: `connector_googledrive` - * Microsoft Teams: `connector_microsoftteams` - * Outlook Calendar: `connector_outlookcalendar` - * Outlook Email: `connector_outlookemail` - * SharePoint: `connector_sharepoint`. Is one of the following types: - Literal["connector_dropbox"], Literal["connector_gmail"], Literal["connector_googlecalendar"], - Literal["connector_googledrive"], Literal["connector_microsoftteams"], - Literal["connector_outlookcalendar"], Literal["connector_outlookemail"], - Literal["connector_sharepoint"] - :vartype connector_id: Literal["connector_dropbox", "connector_gmail", - "connector_googlecalendar", "connector_googledrive", "connector_microsoftteams", - "connector_outlookcalendar", "connector_outlookemail", "connector_sharepoint"] - :ivar tunnel_id: The Secure MCP Tunnel ID to use instead of a direct server URL. One of - ``server_url``, ``connector_id``, or ``tunnel_id`` must be provided. - :vartype tunnel_id: str - :ivar authorization: An OAuth access token that can be used with a remote MCP server, either - with a custom MCP server URL or a service connector. Your application must handle the OAuth - authorization flow and provide the token here. - :vartype authorization: str - :ivar server_description: Optional description of the MCP server, used to provide more context. - :vartype server_description: str - :ivar headers: - :vartype headers: dict[str, str] - :ivar allowed_tools: Is either a [str] type or a MCPToolFilter type. - :vartype allowed_tools: Union[list[str], "MCPToolFilter"] - :ivar require_approval: Is one of the following types: MCPToolRequireApproval, - Literal["always"], Literal["never"] - :vartype require_approval: Union["MCPToolRequireApproval", Literal["always"], Literal["never"]] - :ivar defer_loading: Whether this MCP tool is deferred and discovered via tool search. - :vartype defer_loading: bool - :ivar project_connection_id: The connection ID in the project for the MCP server. The - connection stores authentication and other connection details needed to connect to the MCP - server. - :vartype project_connection_id: str - """ - - name: str - """Optional user-defined name for this tool or configuration.""" - description: str - """Optional user-defined description for this tool or configuration.""" - tool_configs: dict[str, "ToolConfig"] - """Per-tool configuration map. Keys are tool names or ``*`` (catch-all default). Resolution order: - exact tool name match takes priority over ``*``. Unknown tool names are silently ignored at - runtime.""" - type: Required[Literal[ToolboxToolType.MCP]] - """Required. MCP.""" - server_label: Required[str] - """A label for this MCP server, used to identify it in tool calls. Required.""" - server_url: str - """The URL for the MCP server. One of ``server_url``, ``connector_id``, or ``tunnel_id`` must be - provided.""" - connector_id: Literal[ - "connector_dropbox", - "connector_gmail", - "connector_googlecalendar", - "connector_googledrive", - "connector_microsoftteams", - "connector_outlookcalendar", - "connector_outlookemail", - "connector_sharepoint", - ] - """Identifier for service connectors, like those available in ChatGPT. One of ``server_url``, - ``connector_id``, or ``tunnel_id`` must be provided. Learn more about service connectors `here - `_. Currently supported ``connector_id`` values are: - - * Dropbox: `connector_dropbox` - * Gmail: `connector_gmail` - * Google Calendar: `connector_googlecalendar` - * Google Drive: `connector_googledrive` - * Microsoft Teams: `connector_microsoftteams` - * Outlook Calendar: `connector_outlookcalendar` - * Outlook Email: `connector_outlookemail` - * SharePoint: `connector_sharepoint`. Is one of the following types: - Literal[\"connector_dropbox\"], Literal[\"connector_gmail\"], - Literal[\"connector_googlecalendar\"], Literal[\"connector_googledrive\"], - Literal[\"connector_microsoftteams\"], Literal[\"connector_outlookcalendar\"], - Literal[\"connector_outlookemail\"], Literal[\"connector_sharepoint\"]""" - tunnel_id: str - """The Secure MCP Tunnel ID to use instead of a direct server URL. One of ``server_url``, - ``connector_id``, or ``tunnel_id`` must be provided.""" - authorization: str - """An OAuth access token that can be used with a remote MCP server, either with a custom MCP - server URL or a service connector. Your application must handle the OAuth authorization flow - and provide the token here.""" - server_description: str - """Optional description of the MCP server, used to provide more context.""" - headers: Optional[dict[str, str]] - allowed_tools: Optional[Union[list[str], "MCPToolFilter"]] - """Is either a [str] type or a MCPToolFilter type.""" - require_approval: Optional[Union["MCPToolRequireApproval", Literal["always"], Literal["never"]]] - """Is one of the following types: MCPToolRequireApproval, Literal[\"always\"], Literal[\"never\"]""" - defer_loading: bool - """Whether this MCP tool is deferred and discovered via tool search.""" - project_connection_id: str - """The connection ID in the project for the MCP server. The connection stores authentication and - other connection details needed to connect to the MCP server.""" - - -class MCPToolFilter(TypedDict, total=False): - """MCP tool filter. - - :ivar tool_names: MCP allowed tools. - :vartype tool_names: list[str] - :ivar read_only: Indicates whether or not a tool modifies data or is read-only. If an MCP - server is `annotated with `readOnlyHint` - `_, - it will match this filter. - :vartype read_only: bool - """ - - tool_names: list[str] - """MCP allowed tools.""" - read_only: bool - """Indicates whether or not a tool modifies data or is read-only. If an MCP server is `annotated - with `readOnlyHint` - `_, - it will match this filter.""" - - -class MCPToolRequireApproval(TypedDict, total=False): - """MCPToolRequireApproval. - - :ivar always: - :vartype always: "MCPToolFilter" - :ivar never: - :vartype never: "MCPToolFilter" - """ - - always: "MCPToolFilter" - never: "MCPToolFilter" - - -class MemorySearchOptions(TypedDict, total=False): - """Memory search options. - - :ivar max_memories: Maximum number of memory items to return. - :vartype max_memories: int - """ - - max_memories: int - """Maximum number of memory items to return.""" - - -class MemorySearchPreviewTool(TypedDict, total=False): - """A tool for integrating memories into the agent. - - :ivar type: The type of the tool. Always ``memory_search_preview``. Required. - MEMORY_SEARCH_PREVIEW. - :vartype type: Literal[ToolType.MEMORY_SEARCH_PREVIEW] - :ivar memory_store_name: The name of the memory store to use. Required. - :vartype memory_store_name: str - :ivar scope: The namespace used to group and isolate memories, such as a user ID. Limits which - memories can be retrieved or updated. Use special variable ``{{$userId}}`` to scope memories to - the current signed-in user. Required. - :vartype scope: str - :ivar search_options: Options for searching the memory store. - :vartype search_options: "MemorySearchOptions" - :ivar update_delay: Time to wait before updating memories after inactivity (seconds). Default - 300. - :vartype update_delay: int - """ - - type: Required[Literal[ToolType.MEMORY_SEARCH_PREVIEW]] - """The type of the tool. Always ``memory_search_preview``. Required. MEMORY_SEARCH_PREVIEW.""" - memory_store_name: Required[str] - """The name of the memory store to use. Required.""" - scope: Required[str] - """The namespace used to group and isolate memories, such as a user ID. Limits which memories can - be retrieved or updated. Use special variable ``{{$userId}}`` to scope memories to the current - signed-in user. Required.""" - search_options: "MemorySearchOptions" - """Options for searching the memory store.""" - update_delay: int - """Time to wait before updating memories after inactivity (seconds). Default 300.""" - - -class MemoryStoreDefaultDefinition(TypedDict, total=False): - """Default memory store implementation. - - :ivar kind: The kind of the memory store. Required. The default memory store implementation. - :vartype kind: Literal[MemoryStoreKind.DEFAULT] - :ivar chat_model: The name or identifier of the chat completion model deployment used for - memory processing. Required. - :vartype chat_model: str - :ivar embedding_model: The name or identifier of the embedding model deployment used for memory - processing. Required. - :vartype embedding_model: str - :ivar options: Default memory store options. - :vartype options: "MemoryStoreDefaultOptions" - """ - - kind: Required[Literal[MemoryStoreKind.DEFAULT]] - """The kind of the memory store. Required. The default memory store implementation.""" - chat_model: Required[str] - """The name or identifier of the chat completion model deployment used for memory processing. - Required.""" - embedding_model: Required[str] - """The name or identifier of the embedding model deployment used for memory processing. Required.""" - options: "MemoryStoreDefaultOptions" - """Default memory store options.""" - - -class MemoryStoreDefaultOptions(TypedDict, total=False): - """Default memory store configurations. - - :ivar user_profile_enabled: Whether to enable user profile extraction and storage. Default is - true. Required. - :vartype user_profile_enabled: bool - :ivar user_profile_details: Specific categories or types of user profile information to extract - and store. - :vartype user_profile_details: str - :ivar chat_summary_enabled: Whether to enable chat summary extraction and storage. Defaults to - ``true``. Required. - :vartype chat_summary_enabled: bool - :ivar procedural_memory_enabled: Whether to enable procedural memory extraction and storage. - The service defaults to ``true`` if a value is not specified by the caller. - :vartype procedural_memory_enabled: bool - :ivar default_ttl_seconds: The default time-to-live for memories in seconds. A value of ``0`` - indicates that memories do not expire. Defaults to ``0``. - :vartype default_ttl_seconds: str - """ - - user_profile_enabled: Required[bool] - """Whether to enable user profile extraction and storage. Default is true. Required.""" - user_profile_details: str - """Specific categories or types of user profile information to extract and store.""" - chat_summary_enabled: Required[bool] - """Whether to enable chat summary extraction and storage. Defaults to ``true``. Required.""" - procedural_memory_enabled: bool - """Whether to enable procedural memory extraction and storage. The service defaults to ``true`` if - a value is not specified by the caller.""" - default_ttl_seconds: str - """The default time-to-live for memories in seconds. A value of ``0`` indicates that memories do - not expire. Defaults to ``0``.""" - - -class MicrosoftFabricPreviewTool(TypedDict, total=False): - """The input definition information for a Microsoft Fabric tool as used to configure an agent. - - :ivar type: The object type, which is always 'fabric_dataagent_preview'. Required. - FABRIC_DATAAGENT_PREVIEW. - :vartype type: Literal[ToolType.FABRIC_DATAAGENT_PREVIEW] - :ivar fabric_dataagent_preview: The fabric data agent tool parameters. Required. - :vartype fabric_dataagent_preview: "FabricDataAgentToolParameters" - """ - - type: Required[Literal[ToolType.FABRIC_DATAAGENT_PREVIEW]] - """The object type, which is always 'fabric_dataagent_preview'. Required. - FABRIC_DATAAGENT_PREVIEW.""" - fabric_dataagent_preview: Required["FabricDataAgentToolParameters"] - """The fabric data agent tool parameters. Required.""" - - -class ModelCredentialRequest(TypedDict, total=False): - """Request to fetch credentials for a model asset. - - :ivar blob_uri: Blob URI of the model asset to fetch credentials for. Required. - :vartype blob_uri: str - """ - - blobUri: Required[str] - """Blob URI of the model asset to fetch credentials for. Required.""" - - -class ModelPendingUploadRequest(TypedDict, total=False): - """Represents a request for a pending upload of a model version. - - :ivar pending_upload_id: If PendingUploadId is not provided, a random GUID will be used. - :vartype pending_upload_id: str - :ivar connection_name: Azure Storage Account connection name to use for generating temporary - SAS token. - :vartype connection_name: str - :ivar pending_upload_type: The type of pending upload. Only TemporaryBlobReference is supported - for models. Required. Temporary blob reference. - :vartype pending_upload_type: Literal[PendingUploadType.TEMPORARY_BLOB_REFERENCE] - """ - - pendingUploadId: str - """If PendingUploadId is not provided, a random GUID will be used.""" - connectionName: str - """Azure Storage Account connection name to use for generating temporary SAS token.""" - pendingUploadType: Required[Literal[PendingUploadType.TEMPORARY_BLOB_REFERENCE]] - """The type of pending upload. Only TemporaryBlobReference is supported for models. Required. - Temporary blob reference.""" - - -class ModelSamplingParams(TypedDict, total=False): - """Represents a set of parameters used to control the sampling behavior of a language model during - text generation. - - :ivar temperature: The temperature parameter for sampling. Defaults to 1.0. - :vartype temperature: float - :ivar top_p: The top-p parameter for nucleus sampling. Defaults to 1.0. - :vartype top_p: float - :ivar seed: The random seed for reproducibility. Defaults to 42. - :vartype seed: int - :ivar max_completion_tokens: The maximum number of tokens allowed in the completion. - :vartype max_completion_tokens: int - """ - - temperature: float - """The temperature parameter for sampling. Defaults to 1.0.""" - top_p: float - """The top-p parameter for nucleus sampling. Defaults to 1.0.""" - seed: int - """The random seed for reproducibility. Defaults to 42.""" - max_completion_tokens: int - """The maximum number of tokens allowed in the completion.""" - - -class ModelSourceData(TypedDict, total=False): - """Source information for the model. - - :ivar source_type: The source type of the model. Known values are: "LocalUpload" and - "TrainingJob". - :vartype source_type: Union[str, "FoundryModelSourceType"] - :ivar job_id: The job ID that produced this model. - :vartype job_id: str - """ - - sourceType: Union[str, "FoundryModelSourceType"] - """The source type of the model. Known values are: \"LocalUpload\" and \"TrainingJob\".""" - jobId: str - """The job ID that produced this model.""" - - -class ModelVersion(TypedDict, total=False): - """Model Version Definition. - - :ivar blob_uri: URI of the model artifact in blob storage. Required. - :vartype blob_uri: str - :ivar weight_type: The weight type of the model. Known values are: "FullWeight", "LoRA", and - "DraftModel". - :vartype weight_type: Union[str, "FoundryModelWeightType"] - :ivar base_model: Base model asset ID. - :vartype base_model: str - :ivar source: The source of the model. - :vartype source: "ModelSourceData" - :ivar lora_config: Adapter-specific configuration. Required when weight_type is lora; ignored - otherwise. May be auto-populated from adapter_config.json when present in the uploaded files — - user-provided values take precedence over auto-detected values. - :vartype lora_config: "LoraConfig" - :ivar artifact_profile: The artifact profile of the model. - :vartype artifact_profile: "ArtifactProfile" - :ivar warnings: Service-computed advisory warnings derived from the artifact profile. - :vartype warnings: list["FoundryModelWarning"] - :ivar id: Asset ID, a unique identifier for the asset. - :vartype id: str - :ivar name: The name of the resource. Required. - :vartype name: str - :ivar version: The version of the resource. Required. - :vartype version: str - :ivar description: The asset description text. - :vartype description: str - :ivar tags: Tag dictionary. Tags can be added, removed, and updated. - :vartype tags: dict[str, str] - """ - - blobUri: Required[str] - """URI of the model artifact in blob storage. Required.""" - weightType: Union[str, "FoundryModelWeightType"] - """The weight type of the model. Known values are: \"FullWeight\", \"LoRA\", and \"DraftModel\".""" - baseModel: str - """Base model asset ID.""" - source: "ModelSourceData" - """The source of the model.""" - loraConfig: "LoraConfig" - """Adapter-specific configuration. Required when weight_type is lora; ignored otherwise. May be - auto-populated from adapter_config.json when present in the uploaded files — user-provided - values take precedence over auto-detected values.""" - artifactProfile: "ArtifactProfile" - """The artifact profile of the model.""" - warnings: list["FoundryModelWarning"] - """Service-computed advisory warnings derived from the artifact profile.""" - id: str - """Asset ID, a unique identifier for the asset.""" - name: Required[str] - """The name of the resource. Required.""" - version: Required[str] - """The version of the resource. Required.""" - description: str - """The asset description text.""" - tags: dict[str, str] - """Tag dictionary. Tags can be added, removed, and updated.""" - - -class MonthlyRecurrenceSchedule(TypedDict, total=False): - """Monthly recurrence schedule. - - :ivar type: Monthly recurrence type. Required. Monthly recurrence pattern. - :vartype type: Literal[RecurrenceType.MONTHLY] - :ivar days_of_month: Days of the month for the recurrence schedule. Required. - :vartype days_of_month: list[int] - """ - - type: Required[Literal[RecurrenceType.MONTHLY]] - """Monthly recurrence type. Required. Monthly recurrence pattern.""" - daysOfMonth: Required[list[int]] - """Days of the month for the recurrence schedule. Required.""" - - -class NamespaceToolParam(TypedDict, total=False): - """Namespace. - - :ivar type: The type of the tool. Always ``namespace``. Required. NAMESPACE. - :vartype type: Literal[ToolType.NAMESPACE] - :ivar name: The namespace name used in tool calls (for example, ``crm``). Required. - :vartype name: str - :ivar description: A description of the namespace shown to the model. Required. - :vartype description: str - :ivar tools: The function/custom tools available inside this namespace. Required. - :vartype tools: list[Union["FunctionToolParam", "CustomToolParam"]] - """ - - type: Required[Literal[ToolType.NAMESPACE]] - """The type of the tool. Always ``namespace``. Required. NAMESPACE.""" - name: Required[str] - """The namespace name used in tool calls (for example, ``crm``). Required.""" - description: Required[str] - """A description of the namespace shown to the model. Required.""" - tools: Required[list[Union["FunctionToolParam", "CustomToolParam"]]] - """The function/custom tools available inside this namespace. Required.""" - - -class OneTimeTrigger(TypedDict, total=False): - """One-time trigger. - - :ivar type: Required. One-time trigger. - :vartype type: Literal[TriggerType.ONE_TIME] - :ivar trigger_at: Date and time for the one-time trigger in ISO 8601 format. Required. - :vartype trigger_at: str - :ivar time_zone: Time zone for the one-time trigger. Defaults to ``UTC``. - :vartype time_zone: str - """ - - type: Required[Literal[TriggerType.ONE_TIME]] - """Required. One-time trigger.""" - triggerAt: Required[str] - """Date and time for the one-time trigger in ISO 8601 format. Required.""" - timeZone: str - """Time zone for the one-time trigger. Defaults to ``UTC``.""" - - -class OpenApiAnonymousAuthDetails(TypedDict, total=False): - """Security details for OpenApi anonymous authentication. - - :ivar type: The object type, which is always 'anonymous'. Required. ANONYMOUS. - :vartype type: Literal[OpenApiAuthType.ANONYMOUS] - """ - - type: Required[Literal[OpenApiAuthType.ANONYMOUS]] - """The object type, which is always 'anonymous'. Required. ANONYMOUS.""" - - -class OpenApiFunctionDefinition(TypedDict, total=False): - """The input definition information for an openapi function. - - :ivar name: The name of the function to be called. Required. - :vartype name: str - :ivar description: A description of what the function does, used by the model to choose when - and how to call the function. - :vartype description: str - :ivar spec: The openapi function shape, described as a JSON Schema object. Required. - :vartype spec: dict[str, Any] - :ivar auth: Open API authentication details. Required. - :vartype auth: "OpenApiAuthDetails" - :ivar default_params: List of OpenAPI spec parameters that will use user-provided defaults. - :vartype default_params: list[str] - :ivar functions: List of function definitions used by OpenApi tool. - :vartype functions: list["OpenApiFunctionDefinitionFunction"] - """ - - name: Required[str] - """The name of the function to be called. Required.""" - description: str - """A description of what the function does, used by the model to choose when and how to call the - function.""" - spec: Required[dict[str, Any]] - """The openapi function shape, described as a JSON Schema object. Required.""" - auth: Required["OpenApiAuthDetails"] - """Open API authentication details. Required.""" - default_params: list[str] - """List of OpenAPI spec parameters that will use user-provided defaults.""" - functions: list["OpenApiFunctionDefinitionFunction"] - """List of function definitions used by OpenApi tool.""" - - -class OpenApiFunctionDefinitionFunction(TypedDict, total=False): - """OpenApiFunctionDefinitionFunction. - - :ivar name: The name of the function to be called. Required. - :vartype name: str - :ivar description: A description of what the function does, used by the model to choose when - and how to call the function. - :vartype description: str - :ivar parameters: The parameters the functions accepts, described as a JSON Schema object. - Required. - :vartype parameters: dict[str, Any] - """ - - name: Required[str] - """The name of the function to be called. Required.""" - description: str - """A description of what the function does, used by the model to choose when and how to call the - function.""" - parameters: Required[dict[str, Any]] - """The parameters the functions accepts, described as a JSON Schema object. Required.""" - - -class OpenApiManagedAuthDetails(TypedDict, total=False): - """Security details for OpenApi managed_identity authentication. - - :ivar type: The object type, which is always 'managed_identity'. Required. MANAGED_IDENTITY. - :vartype type: Literal[OpenApiAuthType.MANAGED_IDENTITY] - :ivar security_scheme: Connection auth security details. Required. - :vartype security_scheme: "OpenApiManagedSecurityScheme" - """ - - type: Required[Literal[OpenApiAuthType.MANAGED_IDENTITY]] - """The object type, which is always 'managed_identity'. Required. MANAGED_IDENTITY.""" - security_scheme: Required["OpenApiManagedSecurityScheme"] - """Connection auth security details. Required.""" - - -class OpenApiManagedSecurityScheme(TypedDict, total=False): - """Security scheme for OpenApi managed_identity authentication. - - :ivar audience: Authentication scope for managed_identity auth type. Required. - :vartype audience: str - """ - - audience: Required[str] - """Authentication scope for managed_identity auth type. Required.""" - - -class OpenApiProjectConnectionAuthDetails(TypedDict, total=False): - """Security details for OpenApi project connection authentication. - - :ivar type: The object type, which is always 'project_connection'. Required. - PROJECT_CONNECTION. - :vartype type: Literal[OpenApiAuthType.PROJECT_CONNECTION] - :ivar security_scheme: Project connection auth security details. Required. - :vartype security_scheme: "OpenApiProjectConnectionSecurityScheme" - """ - - type: Required[Literal[OpenApiAuthType.PROJECT_CONNECTION]] - """The object type, which is always 'project_connection'. Required. PROJECT_CONNECTION.""" - security_scheme: Required["OpenApiProjectConnectionSecurityScheme"] - """Project connection auth security details. Required.""" - - -class OpenApiProjectConnectionSecurityScheme(TypedDict, total=False): - """Security scheme for OpenApi managed_identity authentication. - - :ivar project_connection_id: Project connection id for Project Connection auth type. Required. - :vartype project_connection_id: str - """ - - project_connection_id: Required[str] - """Project connection id for Project Connection auth type. Required.""" - - -class OpenApiTool(TypedDict, total=False): - """The input definition information for an OpenAPI tool as used to configure an agent. - - :ivar type: The object type, which is always 'openapi'. Required. OPENAPI. - :vartype type: Literal[ToolType.OPENAPI] - :ivar tool_configs: Deprecated. This property is deprecated and will be removed in a future - version. - :vartype tool_configs: dict[str, "ToolConfig"] - :ivar openapi: The openapi function definition. Required. - :vartype openapi: "OpenApiFunctionDefinition" - """ - - type: Required[Literal[ToolType.OPENAPI]] - """The object type, which is always 'openapi'. Required. OPENAPI.""" - tool_configs: dict[str, "ToolConfig"] - """Deprecated. This property is deprecated and will be removed in a future version.""" - openapi: Required["OpenApiFunctionDefinition"] - """The openapi function definition. Required.""" - - -class OpenApiToolboxTool(TypedDict, total=False): - """An OpenAPI tool stored in a toolbox. - - :ivar name: Optional user-defined name for this tool or configuration. - :vartype name: str - :ivar description: Optional user-defined description for this tool or configuration. - :vartype description: str - :ivar tool_configs: Per-tool configuration map. Keys are tool names or ``*`` (catch-all - default). Resolution order: exact tool name match takes priority over ``*``. Unknown tool names - are silently ignored at runtime. - :vartype tool_configs: dict[str, "ToolConfig"] - :ivar type: Required. OPENAPI. - :vartype type: Literal[ToolboxToolType.OPENAPI] - :ivar openapi: The openapi function definition. Required. - :vartype openapi: "OpenApiFunctionDefinition" - """ - - name: str - """Optional user-defined name for this tool or configuration.""" - description: str - """Optional user-defined description for this tool or configuration.""" - tool_configs: dict[str, "ToolConfig"] - """Per-tool configuration map. Keys are tool names or ``*`` (catch-all default). Resolution order: - exact tool name match takes priority over ``*``. Unknown tool names are silently ignored at - runtime.""" - type: Required[Literal[ToolboxToolType.OPENAPI]] - """Required. OPENAPI.""" - openapi: Required["OpenApiFunctionDefinition"] - """The openapi function definition. Required.""" - - -class OptimizationAgentIdentifier(TypedDict, total=False): - """Identifies the registered Foundry agent to optimize (request-only). Skills, tools, and - system_prompt are specified in options.optimization_config. - - :ivar agent_name: Registered Foundry agent name (required). Required. - :vartype agent_name: str - :ivar agent_version: Pinned agent version. Defaults to latest if omitted. - :vartype agent_version: str - """ - - agent_name: Required[str] - """Registered Foundry agent name (required). Required.""" - agent_version: str - """Pinned agent version. Defaults to latest if omitted.""" - - -class OptimizationCandidate(TypedDict, total=False): - """Aggregated evaluation result for a single candidate agent configuration across all tasks. - - :ivar candidate_id: Server-assigned candidate identifier. Use with GET /candidates/{id} - sub-endpoints. - :vartype candidate_id: str - :ivar name: Display name of the candidate (e.g., 'baseline', 'instruction-v2'). Required. - :vartype name: str - :ivar mutations: What was mutated from the baseline (e.g., {system_prompt: 'new prompt'}). - :vartype mutations: dict[str, Any] - :ivar avg_score: Average composite score across all tasks. Required. - :vartype avg_score: float - :ivar avg_tokens: Average token usage across all tasks. Required. - :vartype avg_tokens: float - :ivar eval_id: Foundry evaluation identifier used to score this candidate. - :vartype eval_id: str - :ivar eval_run_id: Foundry evaluation run identifier for this candidate's scoring run. - :vartype eval_run_id: str - :ivar promotion: Promotion metadata. Null if the candidate has not been promoted. - :vartype promotion: "PromotionInfo" - """ - - candidate_id: str - """Server-assigned candidate identifier. Use with GET /candidates/{id} sub-endpoints.""" - name: Required[str] - """Display name of the candidate (e.g., 'baseline', 'instruction-v2'). Required.""" - mutations: dict[str, Any] - """What was mutated from the baseline (e.g., {system_prompt: 'new prompt'}).""" - avg_score: Required[float] - """Average composite score across all tasks. Required.""" - avg_tokens: Required[float] - """Average token usage across all tasks. Required.""" - eval_id: str - """Foundry evaluation identifier used to score this candidate.""" - eval_run_id: str - """Foundry evaluation run identifier for this candidate's scoring run.""" - promotion: "PromotionInfo" - """Promotion metadata. Null if the candidate has not been promoted.""" - - -class OptimizationDatasetCriterion(TypedDict, total=False): - """Evaluation criterion: a name + instruction pair used for per-item scoring. - - :ivar name: Criterion name. Required. - :vartype name: str - :ivar instruction: Criterion instruction / description. Required. - :vartype instruction: str - """ - - name: Required[str] - """Criterion name. Required.""" - instruction: Required[str] - """Criterion instruction / description. Required.""" - - -class OptimizationDatasetItem(TypedDict, total=False): - """A single item in an inline dataset. - - :ivar query: The user query / prompt. - :vartype query: str - :ivar ground_truth: Expected ground truth answer. - :vartype ground_truth: str - :ivar desired_num_turns: Desired number of conversation turns for simulation mode (1-20). - :vartype desired_num_turns: int - :ivar criteria: Per-item evaluation criteria. - :vartype criteria: list["OptimizationDatasetCriterion"] - """ - - query: str - """The user query / prompt.""" - ground_truth: str - """Expected ground truth answer.""" - desired_num_turns: int - """Desired number of conversation turns for simulation mode (1-20).""" - criteria: list["OptimizationDatasetCriterion"] - """Per-item evaluation criteria.""" - - -class OptimizationEvaluatorRef(TypedDict, total=False): - """Reference to a named evaluator, optionally pinned to a version. - - :ivar name: Evaluator name. Required. - :vartype name: str - :ivar version: Evaluator version. If not specified, the latest version is used. - :vartype version: str - """ - - name: Required[str] - """Evaluator name. Required.""" - version: str - """Evaluator version. If not specified, the latest version is used.""" - - -class OptimizationInlineDatasetInput(TypedDict, total=False): - """Inline dataset — items supplied directly in the request body. - - :ivar type: Dataset input type discriminator. Required. Inline dataset — items are provided - directly in the request body. - :vartype type: Literal[OptimizationDatasetInputType.INLINE] - :ivar dataset_items: Dataset items. Required. - :vartype dataset_items: list["OptimizationDatasetItem"] - """ - - type: Required[Literal[OptimizationDatasetInputType.INLINE]] - """Dataset input type discriminator. Required. Inline dataset — items are provided directly in the - request body.""" - items: Required[list["OptimizationDatasetItem"]] - """Dataset items. Required.""" - - -class OptimizationJob(TypedDict, total=False): - """Agent optimization job resource — a long-running job that optimizes an agent's configuration - (instructions, model, skills, tools) to maximize evaluation scores. On success, the result - contains scored candidates. - - :ivar id: Server-assigned unique identifier. Required. - :vartype id: str - :ivar inputs: Caller-supplied inputs. - :vartype inputs: "OptimizationJobInputs" - :ivar result: Result produced on success. - :vartype result: "OptimizationJobResult" - :ivar status: Current lifecycle status. Required. Known values are: "queued", "in_progress", - "succeeded", "failed", and "cancelled". - :vartype status: Union[str, "JobStatus"] - :ivar error: Error details — populated only on failure. - :vartype error: "ApiError" - :ivar created_at: The timestamp when the job was created, represented in Unix time. Required. - :vartype created_at: int - :ivar updated_at: The timestamp when the job was last updated, represented in Unix time. - Required. - :vartype updated_at: int - :ivar progress: Progress snapshot. May be present in terminal states reflecting last-known - progress. - :vartype progress: "OptimizationJobProgress" - :ivar warnings: Non-fatal warnings emitted at any point during optimization. - :vartype warnings: list[str] - """ - - id: Required[str] - """Server-assigned unique identifier. Required.""" - inputs: "OptimizationJobInputs" - """Caller-supplied inputs.""" - result: "OptimizationJobResult" - """Result produced on success.""" - status: Required[Union[str, "JobStatus"]] - """Current lifecycle status. Required. Known values are: \"queued\", \"in_progress\", - \"succeeded\", \"failed\", and \"cancelled\".""" - error: "ApiError" - """Error details — populated only on failure.""" - created_at: Required[int] - """The timestamp when the job was created, represented in Unix time. Required.""" - updated_at: Required[int] - """The timestamp when the job was last updated, represented in Unix time. Required.""" - progress: "OptimizationJobProgress" - """Progress snapshot. May be present in terminal states reflecting last-known progress.""" - warnings: list[str] - """Non-fatal warnings emitted at any point during optimization.""" - - -class OptimizationJobInputs(TypedDict, total=False): - """Caller-supplied inputs for an optimization job. - - :ivar agent: The agent (and pinned version) being optimized. Required. - :vartype agent: "OptimizationAgentIdentifier" - :ivar train_dataset: Training dataset — either inline items or a reference to a registered - dataset. Required. Required. - :vartype train_dataset: "OptimizationDatasetInput" - :ivar validation_dataset: Optional held-out validation dataset for measuring generalization of - the final candidate. - :vartype validation_dataset: "OptimizationDatasetInput" - :ivar evaluators: Job-level evaluators referenced by name and optional version. Required; at - least one must be provided. Required. - :vartype evaluators: list["OptimizationEvaluatorRef"] - :ivar options: Tuning knobs and run-mode. - :vartype options: "OptimizationOptions" - """ - - agent: Required["OptimizationAgentIdentifier"] - """The agent (and pinned version) being optimized. Required.""" - train_dataset: Required["OptimizationDatasetInput"] - """Training dataset — either inline items or a reference to a registered dataset. Required. - Required.""" - validation_dataset: "OptimizationDatasetInput" - """Optional held-out validation dataset for measuring generalization of the final candidate.""" - evaluators: Required[list["OptimizationEvaluatorRef"]] - """Job-level evaluators referenced by name and optional version. Required; at least one must be - provided. Required.""" - options: "OptimizationOptions" - """Tuning knobs and run-mode.""" - - -class OptimizationJobProgress(TypedDict, total=False): - """In-flight progress; only populated while status is queued or in_progress. - - :ivar candidates_completed: Number of candidates whose evaluation has completed so far. - Required. - :vartype candidates_completed: int - :ivar best_score: Best score observed so far across all candidates. Required. - :vartype best_score: float - :ivar elapsed_seconds: Wall-clock time elapsed in seconds since the job began executing. - Required. - :vartype elapsed_seconds: float - """ - - candidates_completed: Required[int] - """Number of candidates whose evaluation has completed so far. Required.""" - best_score: Required[float] - """Best score observed so far across all candidates. Required.""" - elapsed_seconds: Required[float] - """Wall-clock time elapsed in seconds since the job began executing. Required.""" - - -class OptimizationJobResult(TypedDict, total=False): - """Terminal-state result body. Populated when status is succeeded or failed. - - :ivar baseline: Candidate ID of the original (un-optimized) baseline evaluation. - :vartype baseline: str - :ivar best: Candidate ID of the highest-scoring candidate found during optimization. - :vartype best: str - :ivar candidates: All evaluated candidates including baseline. - :vartype candidates: list["OptimizationCandidate"] - """ - - baseline: str - """Candidate ID of the original (un-optimized) baseline evaluation.""" - best: str - """Candidate ID of the highest-scoring candidate found during optimization.""" - candidates: list["OptimizationCandidate"] - """All evaluated candidates including baseline.""" - - -class OptimizationOptions(TypedDict, total=False): - """Tuning knobs and run-mode for an optimization job. - - :ivar max_candidates: Maximum number of optimization candidates to generate. Must be >= 1. - Default: 5. - :vartype max_candidates: int - :ivar optimization_config: Per-target-attribute configuration overrides. Contains skills, - tools, system_prompt for the agent, plus model space for model optimization. - :vartype optimization_config: dict[str, Any] - :ivar eval_model: Model deployment used for evaluation. Defaults to server config (typically - 'gpt-4o'). - :vartype eval_model: str - :ivar optimization_model: Model deployment for optimization reasoning (must be gpt-5 family). - Falls back to the default eval model when not set. - :vartype optimization_model: str - :ivar evaluation_level: Evaluation granularity. Null/omitted means per-item single-turn. Set to - 'conversation' for per-conversation multi-turn simulation scoring. Known values are: "turn" and - "conversation". - :vartype evaluation_level: Union[str, "EvaluationLevel"] - """ - - max_candidates: int - """Maximum number of optimization candidates to generate. Must be >= 1. Default: 5.""" - optimization_config: dict[str, Any] - """Per-target-attribute configuration overrides. Contains skills, tools, system_prompt for the - agent, plus model space for model optimization.""" - eval_model: str - """Model deployment used for evaluation. Defaults to server config (typically 'gpt-4o').""" - optimization_model: str - """Model deployment for optimization reasoning (must be gpt-5 family). Falls back to the default - eval model when not set.""" - evaluation_level: Union[str, "EvaluationLevel"] - """Evaluation granularity. Null/omitted means per-item single-turn. Set to 'conversation' for - per-conversation multi-turn simulation scoring. Known values are: \"turn\" and - \"conversation\".""" - - -class OptimizationReferenceDatasetInput(TypedDict, total=False): - """Reference to a registered Foundry dataset. - - :ivar type: Dataset input type discriminator. Required. Reference to a registered Foundry - dataset by name and version. - :vartype type: Literal[OptimizationDatasetInputType.REFERENCE] - :ivar name: Registered dataset name. Required. - :vartype name: str - :ivar version: Dataset version. If not specified, the latest version is used. - :vartype version: str - """ - - type: Required[Literal[OptimizationDatasetInputType.REFERENCE]] - """Dataset input type discriminator. Required. Reference to a registered Foundry dataset by name - and version.""" - name: Required[str] - """Registered dataset name. Required.""" - version: str - """Dataset version. If not specified, the latest version is used.""" - - -class OtlpTelemetryEndpoint(TypedDict, total=False): - """An OTLP (OpenTelemetry Protocol) telemetry export endpoint. - - :ivar data: Data types to export to this endpoint. Use an empty array to export no data. - Required. - :vartype data: list[Union[str, "TelemetryDataKind"]] - :ivar auth: Optional authentication configuration. - :vartype auth: "TelemetryEndpointAuth" - :ivar kind: The endpoint kind, always 'OTLP' for OpenTelemetry Protocol endpoints. Required. - OpenTelemetry Protocol (OTLP) endpoint. - :vartype kind: Literal[TelemetryEndpointKind.OTLP] - :ivar endpoint: The OTLP collector endpoint URL. Required. - :vartype endpoint: str - :ivar protocol: The transport protocol for the OTLP endpoint. Required. Known values are: - "Http" and "Grpc". - :vartype protocol: Union[str, "TelemetryTransportProtocol"] - """ - - data: Required[list[Union[str, "TelemetryDataKind"]]] - """Data types to export to this endpoint. Use an empty array to export no data. Required.""" - auth: "TelemetryEndpointAuth" - """Optional authentication configuration.""" - kind: Required[Literal[TelemetryEndpointKind.OTLP]] - """The endpoint kind, always 'OTLP' for OpenTelemetry Protocol endpoints. Required. OpenTelemetry - Protocol (OTLP) endpoint.""" - endpoint: Required[str] - """The OTLP collector endpoint URL. Required.""" - protocol: Required[Union[str, "TelemetryTransportProtocol"]] - """The transport protocol for the OTLP endpoint. Required. Known values are: \"Http\" and - \"Grpc\".""" - - -class PendingUploadRequest(TypedDict, total=False): - """Represents a request for a pending upload. - - :ivar pending_upload_id: If PendingUploadId is not provided, a random GUID will be used. - :vartype pending_upload_id: str - :ivar connection_name: Azure Storage Account connection name to use for generating temporary - SAS token. - :vartype connection_name: str - :ivar pending_upload_type: The type of pending upload. Required. Deprecated: the service never - read this value and silently ignored it. Use TemporaryBlobReference instead. - :vartype pending_upload_type: Literal[PendingUploadType.BLOB_REFERENCE] - """ - - pendingUploadId: str - """If PendingUploadId is not provided, a random GUID will be used.""" - connectionName: str - """Azure Storage Account connection name to use for generating temporary SAS token.""" - pendingUploadType: Required[Literal[PendingUploadType.BLOB_REFERENCE]] - """The type of pending upload. Required. Deprecated: the service never read this value and - silently ignored it. Use TemporaryBlobReference instead.""" - - -class PromotionInfo(TypedDict, total=False): - """Promotion metadata recorded when a candidate is deployed to a Foundry agent. - - :ivar promoted_at: Timestamp when promotion occurred, represented in Unix time. Required. - :vartype promoted_at: int - :ivar agent_name: Name of the Foundry agent this candidate was promoted to. Required. - :vartype agent_name: str - :ivar agent_version: Version of the Foundry agent this candidate was promoted to. Required. - :vartype agent_version: str - """ - - promoted_at: Required[int] - """Timestamp when promotion occurred, represented in Unix time. Required.""" - agent_name: Required[str] - """Name of the Foundry agent this candidate was promoted to. Required.""" - agent_version: Required[str] - """Version of the Foundry agent this candidate was promoted to. Required.""" - - -class PromptAgentDefinition(TypedDict, total=False): - """The prompt agent definition. - - :ivar rai_config: Configuration for Responsible AI (RAI) content filtering and safety features. - :vartype rai_config: "RaiConfig" - :ivar kind: Required. PROMPT. - :vartype kind: Literal[AgentKind.PROMPT] - :ivar model: The model deployment to use for this agent. Required. - :vartype model: str - :ivar instructions: A system (or developer) message inserted into the model's context. - :vartype instructions: str - :ivar temperature: What sampling temperature to use, between 0 and 2. Higher values like 0.8 - will make the output more random, while lower values like 0.2 will make it more focused and - deterministic. We generally recommend altering this or ``top_p`` but not both. Defaults to - ``1``. - :vartype temperature: float - :ivar top_p: An alternative to sampling with temperature, called nucleus sampling, where the - model considers the results of the tokens with top_p probability mass. So 0.1 means only the - tokens comprising the top 10% probability mass are considered. We generally recommend altering - this or ``temperature`` but not both. Defaults to ``1``. - :vartype top_p: float - :ivar reasoning: - :vartype reasoning: "Reasoning" - :ivar tools: An array of tools the model may call while generating a response. You can specify - which tool to use by setting the ``tool_choice`` parameter. - :vartype tools: list["Tool"] - :ivar tool_choice: How the model should select which tool (or tools) to use when generating a - response. See the ``tools`` parameter to see how to specify which tools the model can call. Is - either a str type or a ToolChoiceParam type. - :vartype tool_choice: Union[str, "ToolChoiceParam"] - :ivar text: Configuration options for a text response from the model. Can be plain text or - structured JSON data. - :vartype text: "PromptAgentDefinitionTextOptions" - :ivar structured_inputs: Set of structured inputs that can participate in prompt template - substitution or tool argument bindings. - :vartype structured_inputs: dict[str, "StructuredInputDefinition"] - """ - - rai_config: "RaiConfig" - """Configuration for Responsible AI (RAI) content filtering and safety features.""" - kind: Required[Literal[AgentKind.PROMPT]] - """Required. PROMPT.""" - model: Required[str] - """The model deployment to use for this agent. Required.""" - instructions: Optional[str] - """A system (or developer) message inserted into the model's context.""" - temperature: Optional[float] - """What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output - more random, while lower values like 0.2 will make it more focused and deterministic. We - generally recommend altering this or ``top_p`` but not both. Defaults to ``1``.""" - top_p: Optional[float] - """An alternative to sampling with temperature, called nucleus sampling, where the model considers - the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising - the top 10% probability mass are considered. We generally recommend altering this or - ``temperature`` but not both. Defaults to ``1``.""" - reasoning: Optional["Reasoning"] - tools: list["Tool"] - """An array of tools the model may call while generating a response. You can specify which tool to - use by setting the ``tool_choice`` parameter.""" - tool_choice: Union[str, "ToolChoiceParam"] - """How the model should select which tool (or tools) to use when generating a response. See the - ``tools`` parameter to see how to specify which tools the model can call. Is either a str type - or a ToolChoiceParam type.""" - text: "PromptAgentDefinitionTextOptions" - """Configuration options for a text response from the model. Can be plain text or structured JSON - data.""" - structured_inputs: dict[str, "StructuredInputDefinition"] - """Set of structured inputs that can participate in prompt template substitution or tool argument - bindings.""" - - -class PromptAgentDefinitionTextOptions(TypedDict, total=False): - """Configuration options for a text response from the model. Can be plain text or structured JSON - data. - - :ivar format: - :vartype format: "TextResponseFormat" - """ - - format: "TextResponseFormat" - - -class PromptBasedEvaluatorDefinition(TypedDict, total=False): - """Prompt-based evaluator. - - :ivar init_parameters: The JSON schema (Draft 2020-12) for the evaluator's input parameters. - This includes parameters like type, properties, required. - :vartype init_parameters: dict[str, Any] - :ivar data_schema: The JSON schema (Draft 2020-12) for the evaluator's input data. This - includes parameters like type, properties, required. - :vartype data_schema: dict[str, Any] - :ivar metrics: List of output metrics produced by this evaluator. - :vartype metrics: dict[str, "EvaluatorMetric"] - :ivar type: Required. Prompt-based definition. - :vartype type: Literal[EvaluatorDefinitionType.PROMPT] - :ivar prompt_text: The prompt text used for evaluation. Required. - :vartype prompt_text: str - """ - - init_parameters: dict[str, Any] - """The JSON schema (Draft 2020-12) for the evaluator's input parameters. This includes parameters - like type, properties, required.""" - data_schema: dict[str, Any] - """The JSON schema (Draft 2020-12) for the evaluator's input data. This includes parameters like - type, properties, required.""" - metrics: dict[str, "EvaluatorMetric"] - """List of output metrics produced by this evaluator.""" - type: Required[Literal[EvaluatorDefinitionType.PROMPT]] - """Required. Prompt-based definition.""" - prompt_text: Required[str] - """The prompt text used for evaluation. Required.""" - - -class PromptDataGenerationJobSource(TypedDict, total=False): - """Prompt source for data generation jobs — inline text provided by the user. - - :ivar description: Optional description of what this source represents — helps the pipeline - interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core - capabilities'). - :vartype description: str - :ivar type: The source type for this source, which is Prompt. Required. Prompt source — inline - text provided by the user. - :vartype type: Literal[DataGenerationJobSourceType.PROMPT] - :ivar prompt: Inline prompt text (e.g., agent description, policy text, supplementary context). - Required. - :vartype prompt: str - """ - - description: str - """Optional description of what this source represents — helps the pipeline interpret its content - (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities').""" - type: Required[Literal[DataGenerationJobSourceType.PROMPT]] - """The source type for this source, which is Prompt. Required. Prompt source — inline text - provided by the user.""" - prompt: Required[str] - """Inline prompt text (e.g., agent description, policy text, supplementary context). Required.""" - - -class PromptEvaluatorGenerationJobSource(TypedDict, total=False): - """Prompt source for evaluator generation jobs — inline text provided by the user. - - :ivar description: Optional description of what this source represents — helps the pipeline - interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core - capabilities'). - :vartype description: str - :ivar type: The source type for this source, which is Prompt. Required. Prompt source — inline - text provided by the user. - :vartype type: Literal[EvaluatorGenerationJobSourceType.PROMPT] - :ivar prompt: Inline prompt text (e.g., agent description, policy text, supplementary context). - Required. - :vartype prompt: str - """ - - description: str - """Optional description of what this source represents — helps the pipeline interpret its content - (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities').""" - type: Required[Literal[EvaluatorGenerationJobSourceType.PROMPT]] - """The source type for this source, which is Prompt. Required. Prompt source — inline text - provided by the user.""" - prompt: Required[str] - """Inline prompt text (e.g., agent description, policy text, supplementary context). Required.""" - - -class ProtocolConfiguration(TypedDict, total=False): - """Per-protocol configuration for the agent endpoint. - - :ivar activity: Configuration for the activity protocol. - :vartype activity: "ActivityProtocolConfiguration" - :ivar responses: Configuration for the responses protocol. - :vartype responses: "ResponsesProtocolConfiguration" - :ivar a2a: Configuration for the A2A protocol. - :vartype a2a: "A2AProtocolConfiguration" - :ivar mcp: Configuration for the MCP protocol. - :vartype mcp: "McpProtocolConfiguration" - :ivar invocations: Configuration for the invocations protocol. - :vartype invocations: "InvocationsProtocolConfiguration" - :ivar invocations_ws: Configuration for the WebSocket-based invocations protocol. - :vartype invocations_ws: "InvocationsWsProtocolConfiguration" - """ - - activity: "ActivityProtocolConfiguration" - """Configuration for the activity protocol.""" - responses: "ResponsesProtocolConfiguration" - """Configuration for the responses protocol.""" - a2a: "A2AProtocolConfiguration" - """Configuration for the A2A protocol.""" - mcp: "McpProtocolConfiguration" - """Configuration for the MCP protocol.""" - invocations: "InvocationsProtocolConfiguration" - """Configuration for the invocations protocol.""" - invocations_ws: "InvocationsWsProtocolConfiguration" - """Configuration for the WebSocket-based invocations protocol.""" - - -class ProtocolVersionRecord(TypedDict, total=False): - """A record mapping for a single protocol and its version. - - :ivar protocol: The protocol type. Required. Known values are: "activity", "responses", "a2a", - "mcp", "invocations", and "invocations_ws". - :vartype protocol: Union[str, "AgentEndpointProtocol"] - :ivar version: The version string for the protocol, e.g. 'v0.1.1'. Required. - :vartype version: str - """ - - protocol: Required[Union[str, "AgentEndpointProtocol"]] - """The protocol type. Required. Known values are: \"activity\", \"responses\", \"a2a\", \"mcp\", - \"invocations\", and \"invocations_ws\".""" - version: Required[str] - """The version string for the protocol, e.g. 'v0.1.1'. Required.""" - - -class RaiConfig(TypedDict, total=False): - """Configuration for Responsible AI (RAI) content filtering and safety features. - - :ivar rai_policy_name: The name of the RAI policy to apply. Required. - :vartype rai_policy_name: str - """ - - rai_policy_name: Required[str] - """The name of the RAI policy to apply. Required.""" - - -class RankingOptions(TypedDict, total=False): - """RankingOptions. - - :ivar ranker: The ranker to use for the file search. Known values are: "auto" and - "default-2024-11-15". - :vartype ranker: Union[str, "RankerVersionType"] - :ivar score_threshold: The score threshold for the file search, a number between 0 and 1. - Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer - results. - :vartype score_threshold: float - :ivar hybrid_search: Weights that control how reciprocal rank fusion balances semantic - embedding matches versus sparse keyword matches when hybrid search is enabled. - :vartype hybrid_search: "HybridSearchOptions" - """ - - ranker: Union[str, "RankerVersionType"] - """The ranker to use for the file search. Known values are: \"auto\" and \"default-2024-11-15\".""" - score_threshold: float - """The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will - attempt to return only the most relevant results, but may return fewer results.""" - hybrid_search: "HybridSearchOptions" - """Weights that control how reciprocal rank fusion balances semantic embedding matches versus - sparse keyword matches when hybrid search is enabled.""" - - -class Reasoning(TypedDict, total=False): - """Reasoning. - - :ivar effort: Is one of the following types: Literal["none"], Literal["minimal"], - Literal["low"], Literal["medium"], Literal["high"], Literal["xhigh"] - :vartype effort: Literal["none", "minimal", "low", "medium", "high", "xhigh"] - :ivar summary: Is one of the following types: Literal["auto"], Literal["concise"], - Literal["detailed"] - :vartype summary: Literal["auto", "concise", "detailed"] - :ivar context: Is one of the following types: Literal["auto"], Literal["current_turn"], - Literal["all_turns"] - :vartype context: Literal["auto", "current_turn", "all_turns"] - :ivar generate_summary: Is one of the following types: Literal["auto"], Literal["concise"], - Literal["detailed"] - :vartype generate_summary: Literal["auto", "concise", "detailed"] - """ - - effort: Optional[Literal["none", "minimal", "low", "medium", "high", "xhigh"]] - """Is one of the following types: Literal[\"none\"], Literal[\"minimal\"], Literal[\"low\"], - Literal[\"medium\"], Literal[\"high\"], Literal[\"xhigh\"]""" - summary: Optional[Literal["auto", "concise", "detailed"]] - """Is one of the following types: Literal[\"auto\"], Literal[\"concise\"], Literal[\"detailed\"]""" - context: Optional[Literal["auto", "current_turn", "all_turns"]] - """Is one of the following types: Literal[\"auto\"], Literal[\"current_turn\"], - Literal[\"all_turns\"]""" - generate_summary: Optional[Literal["auto", "concise", "detailed"]] - """Is one of the following types: Literal[\"auto\"], Literal[\"concise\"], Literal[\"detailed\"]""" - - -class RecurrenceTrigger(TypedDict, total=False): - """Recurrence based trigger. - - :ivar type: Type of the trigger. Required. Recurrence based trigger. - :vartype type: Literal[TriggerType.RECURRENCE] - :ivar start_time: Start time for the recurrence schedule in ISO 8601 format. - :vartype start_time: str - :ivar end_time: End time for the recurrence schedule in ISO 8601 format. - :vartype end_time: str - :ivar time_zone: Time zone for the recurrence schedule. Defaults to ``UTC``. - :vartype time_zone: str - :ivar interval: Interval for the recurrence schedule. Required. - :vartype interval: int - :ivar schedule: Recurrence schedule for the recurrence trigger. Required. - :vartype schedule: "RecurrenceSchedule" - """ - - type: Required[Literal[TriggerType.RECURRENCE]] - """Type of the trigger. Required. Recurrence based trigger.""" - startTime: str - """Start time for the recurrence schedule in ISO 8601 format.""" - endTime: str - """End time for the recurrence schedule in ISO 8601 format.""" - timeZone: str - """Time zone for the recurrence schedule. Defaults to ``UTC``.""" - interval: Required[int] - """Interval for the recurrence schedule. Required.""" - schedule: Required["RecurrenceSchedule"] - """Recurrence schedule for the recurrence trigger. Required.""" - - -class RedTeam(TypedDict, total=False): - """Red team details. - - :ivar name: Identifier of the red team run. Required. - :vartype name: str - :ivar display_name: Name of the red-team run. - :vartype display_name: str - :ivar num_turns: Number of simulation rounds. - :vartype num_turns: int - :ivar attack_strategies: List of attack strategies or nested lists of attack strategies. - :vartype attack_strategies: list[Union[str, "AttackStrategy"]] - :ivar simulation_only: Simulation-only or Simulation + Evaluation. If ``true`` the scan outputs - conversation not evaluation result. The service defaults to ``false`` if a value is not - specified by the caller. - :vartype simulation_only: bool - :ivar risk_categories: List of risk categories to generate attack objectives for. - :vartype risk_categories: list[Union[str, "RiskCategory"]] - :ivar application_scenario: Application scenario for the red team operation, to generate - scenario specific attacks. - :vartype application_scenario: str - :ivar tags: Red team's tags. Unlike properties, tags are fully mutable. - :vartype tags: dict[str, str] - :ivar properties: Red team's properties. Unlike tags, properties are add-only. Once added, a - property cannot be removed. - :vartype properties: dict[str, str] - :ivar status: Status of the red-team. It is set by service and is read-only. - :vartype status: str - :ivar target: Target configuration for the red-team run. Required. - :vartype target: "RedTeamTargetConfig" - """ - - id: Required[str] - """Identifier of the red team run. Required.""" - displayName: str - """Name of the red-team run.""" - numTurns: int - """Number of simulation rounds.""" - attackStrategies: list[Union[str, "AttackStrategy"]] - """List of attack strategies or nested lists of attack strategies.""" - simulationOnly: bool - """Simulation-only or Simulation + Evaluation. If ``true`` the scan outputs conversation not - evaluation result. The service defaults to ``false`` if a value is not specified by the caller.""" - riskCategories: list[Union[str, "RiskCategory"]] - """List of risk categories to generate attack objectives for.""" - applicationScenario: str - """Application scenario for the red team operation, to generate scenario specific attacks.""" - tags: dict[str, str] - """Red team's tags. Unlike properties, tags are fully mutable.""" - properties: dict[str, str] - """Red team's properties. Unlike tags, properties are add-only. Once added, a property cannot be - removed.""" - status: str - """Status of the red-team. It is set by service and is read-only.""" - target: Required["RedTeamTargetConfig"] - """Target configuration for the red-team run. Required.""" - - -class ReminderPreviewToolboxTool(TypedDict, total=False): - """A reminder tool stored in a toolbox. - - :ivar name: Optional user-defined name for this tool or configuration. - :vartype name: str - :ivar description: Optional user-defined description for this tool or configuration. - :vartype description: str - :ivar tool_configs: Per-tool configuration map. Keys are tool names or ``*`` (catch-all - default). Resolution order: exact tool name match takes priority over ``*``. Unknown tool names - are silently ignored at runtime. - :vartype tool_configs: dict[str, "ToolConfig"] - :ivar type: Required. REMINDER_PREVIEW. - :vartype type: Literal[ToolboxToolType.REMINDER_PREVIEW] - """ - - name: str - """Optional user-defined name for this tool or configuration.""" - description: str - """Optional user-defined description for this tool or configuration.""" - tool_configs: dict[str, "ToolConfig"] - """Per-tool configuration map. Keys are tool names or ``*`` (catch-all default). Resolution order: - exact tool name match takes priority over ``*``. Unknown tool names are silently ignored at - runtime.""" - type: Required[Literal[ToolboxToolType.REMINDER_PREVIEW]] - """Required. REMINDER_PREVIEW.""" - - -class ResponsesProtocolConfiguration(TypedDict, total=False): - """Configuration specific to the responses protocol.""" - - -class RubricBasedEvaluatorDefinition(TypedDict, total=False): - """Rubric-based evaluator definition — stores dimensions produced by the generate API. Used for - both quality and safety evaluators. - - :ivar init_parameters: The JSON schema (Draft 2020-12) for the evaluator's input parameters. - This includes parameters like type, properties, required. - :vartype init_parameters: dict[str, Any] - :ivar data_schema: The JSON schema (Draft 2020-12) for the evaluator's input data. This - includes parameters like type, properties, required. - :vartype data_schema: dict[str, Any] - :ivar metrics: List of output metrics produced by this evaluator. - :vartype metrics: dict[str, "EvaluatorMetric"] - :ivar type: Required. Rubric-based evaluator definition. Stores dimensions (the scoring - blueprint) for both quality and safety evaluators. Can be created via the generate API or - manually via createVersion. - :vartype type: Literal[EvaluatorDefinitionType.RUBRIC] - :ivar dimensions: The set of dimensions — the scoring blueprint used by the LLM judge. Quality - evaluators include a non-editable residual dimension with id 'general_quality' - (always_applicable: true); safety evaluators include 'general_policy_compliance'. Both use the - same Dimension structure. Required. - :vartype dimensions: list["Dimension"] - :ivar pass_threshold: Pass/fail threshold for the aggregate rubric score, on the same - normalized 0.0-1.0 scale as the emitted ``score``. When the runtime weighted average meets or - exceeds this value, the result is ``pass``. Defaults to 0.5 (equivalent to a raw 1-5 weighted - average of 3.0). The 'any dimension scored 1 → fail' rule still applies regardless of this - threshold. - :vartype pass_threshold: float - """ - - init_parameters: dict[str, Any] - """The JSON schema (Draft 2020-12) for the evaluator's input parameters. This includes parameters - like type, properties, required.""" - data_schema: dict[str, Any] - """The JSON schema (Draft 2020-12) for the evaluator's input data. This includes parameters like - type, properties, required.""" - metrics: dict[str, "EvaluatorMetric"] - """List of output metrics produced by this evaluator.""" - type: Required[Literal[EvaluatorDefinitionType.RUBRIC]] - """Required. Rubric-based evaluator definition. Stores dimensions (the scoring blueprint) for both - quality and safety evaluators. Can be created via the generate API or manually via - createVersion.""" - dimensions: Required[list["Dimension"]] - """The set of dimensions — the scoring blueprint used by the LLM judge. Quality evaluators include - a non-editable residual dimension with id 'general_quality' (always_applicable: true); safety - evaluators include 'general_policy_compliance'. Both use the same Dimension structure. - Required.""" - pass_threshold: float - """Pass/fail threshold for the aggregate rubric score, on the same normalized 0.0-1.0 scale as the - emitted ``score``. When the runtime weighted average meets or exceeds this value, the result is - ``pass``. Defaults to 0.5 (equivalent to a raw 1-5 weighted average of 3.0). The 'any dimension - scored 1 → fail' rule still applies regardless of this threshold.""" - - -class Schedule(TypedDict, total=False): - """Schedule model. - - :ivar schedule_id: Identifier of the schedule. Required. - :vartype schedule_id: str - :ivar display_name: Name of the schedule. - :vartype display_name: str - :ivar description: Description of the schedule. - :vartype description: str - :ivar enabled: Enabled status of the schedule. Required. - :vartype enabled: bool - :ivar provisioning_status: Provisioning status of the schedule. Known values are: "Creating", - "Updating", "Deleting", "Succeeded", and "Failed". - :vartype provisioning_status: Union[str, "ScheduleProvisioningStatus"] - :ivar trigger: Trigger for the schedule. Required. - :vartype trigger: "Trigger" - :ivar task: Task for the schedule. Required. - :vartype task: "ScheduleTask" - :ivar tags: Schedule's tags. Unlike properties, tags are fully mutable. - :vartype tags: dict[str, str] - :ivar properties: Schedule's properties. Unlike tags, properties are add-only. Once added, a - property cannot be removed. - :vartype properties: dict[str, str] - :ivar system_data: System metadata for the resource. Required. - :vartype system_data: dict[str, str] - """ - - id: Required[str] - """Identifier of the schedule. Required.""" - displayName: str - """Name of the schedule.""" - description: str - """Description of the schedule.""" - enabled: Required[bool] - """Enabled status of the schedule. Required.""" - provisioningStatus: Union[str, "ScheduleProvisioningStatus"] - """Provisioning status of the schedule. Known values are: \"Creating\", \"Updating\", - \"Deleting\", \"Succeeded\", and \"Failed\".""" - trigger: Required["Trigger"] - """Trigger for the schedule. Required.""" - task: Required["ScheduleTask"] - """Task for the schedule. Required.""" - tags: dict[str, str] - """Schedule's tags. Unlike properties, tags are fully mutable.""" - properties: dict[str, str] - """Schedule's properties. Unlike tags, properties are add-only. Once added, a property cannot be - removed.""" - systemData: Required[dict[str, str]] - """System metadata for the resource. Required.""" - - -class ScheduleRoutineTrigger(TypedDict, total=False): - """A recurring cron-based routine trigger. - - :ivar type: The trigger type. Required. A recurring cron-based trigger. - :vartype type: Literal[RoutineTriggerType.SCHEDULE] - :ivar cron_expression: A 5-field cron expression. The service enforces a minimum interval of - five minutes by default. Required. - :vartype cron_expression: str - :ivar time_zone: An IANA or Windows time zone identifier for the schedule. Required. - :vartype time_zone: str - """ - - type: Required[Literal[RoutineTriggerType.SCHEDULE]] - """The trigger type. Required. A recurring cron-based trigger.""" - cron_expression: Required[str] - """A 5-field cron expression. The service enforces a minimum interval of five minutes by default. - Required.""" - time_zone: Required[str] - """An IANA or Windows time zone identifier for the schedule. Required.""" - - -class SharepointGroundingToolParameters(TypedDict, total=False): - """The sharepoint grounding tool parameters. - - :ivar project_connections: The project connections attached to this tool. There can be a - maximum of 1 connection resource attached to the tool. - :vartype project_connections: list["ToolProjectConnection"] - """ - - project_connections: list["ToolProjectConnection"] - """The project connections attached to this tool. There can be a maximum of 1 connection resource - attached to the tool.""" - - -class SharepointPreviewTool(TypedDict, total=False): - """The input definition information for a sharepoint tool as used to configure an agent. - - :ivar type: The object type, which is always 'sharepoint_grounding_preview'. Required. - SHAREPOINT_GROUNDING_PREVIEW. - :vartype type: Literal[ToolType.SHAREPOINT_GROUNDING_PREVIEW] - :ivar sharepoint_grounding_preview: The sharepoint grounding tool parameters. Required. - :vartype sharepoint_grounding_preview: "SharepointGroundingToolParameters" - """ - - type: Required[Literal[ToolType.SHAREPOINT_GROUNDING_PREVIEW]] - """The object type, which is always 'sharepoint_grounding_preview'. Required. - SHAREPOINT_GROUNDING_PREVIEW.""" - sharepoint_grounding_preview: Required["SharepointGroundingToolParameters"] - """The sharepoint grounding tool parameters. Required.""" - - -class SimpleQnADataGenerationJobOptions(TypedDict, total=False): - """The options for a data generation job with SimpleQnA type. - - :ivar max_samples: Maximum number of samples to generate. Required. - :vartype max_samples: int - :ivar train_split: The proportion of the generated data to be used for training when the data - is used for fine-tuning. The rest will be used for validation. Value should be between 0 and 1. - :vartype train_split: float - :ivar model_options: The LLM model options. - :vartype model_options: "DataGenerationModelOptions" - :ivar type: The data generation job type, which is SimpleQnA for this model. Required. Simple - question and answers between user and agent. - :vartype type: Literal[DataGenerationJobType.SIMPLE_QNA] - :ivar question_types: The question types to generate. Used only for fine-tuning scenarios. - :vartype question_types: list[Union[str, "SimpleQnAFineTuningQuestionType"]] - """ - - max_samples: Required[int] - """Maximum number of samples to generate. Required.""" - train_split: float - """The proportion of the generated data to be used for training when the data is used for - fine-tuning. The rest will be used for validation. Value should be between 0 and 1.""" - model_options: "DataGenerationModelOptions" - """The LLM model options.""" - type: Required[Literal[DataGenerationJobType.SIMPLE_QNA]] - """The data generation job type, which is SimpleQnA for this model. Required. Simple question and - answers between user and agent.""" - question_types: list[Union[str, "SimpleQnAFineTuningQuestionType"]] - """The question types to generate. Used only for fine-tuning scenarios.""" - - -class SkillInlineContent(TypedDict, total=False): - """Inline content for defining a simple skill without uploading files. Follows the agentskills.io - SKILL.md specification. - - :ivar description: A human-readable description of what the skill does and when to use it. - Required. - :vartype description: str - :ivar instructions: The skill instructions in markdown format. This is the body content of the - SKILL.md file. Required. - :vartype instructions: str - :ivar license: License name or reference to a bundled license file. - :vartype license: str - :ivar compatibility: Environment requirements or compatibility notes for the skill. - :vartype compatibility: str - :ivar metadata: Arbitrary key-value metadata for additional properties. - :vartype metadata: dict[str, str] - :ivar allowed_tools: List of pre-approved tools the skill may use. Experimental. - :vartype allowed_tools: list[str] - """ - - description: Required[str] - """A human-readable description of what the skill does and when to use it. Required.""" - instructions: Required[str] - """The skill instructions in markdown format. This is the body content of the SKILL.md file. - Required.""" - license: str - """License name or reference to a bundled license file.""" - compatibility: str - """Environment requirements or compatibility notes for the skill.""" - metadata: dict[str, str] - """Arbitrary key-value metadata for additional properties.""" - allowed_tools: list[str] - """List of pre-approved tools the skill may use. Experimental.""" - - -class SkillReferenceParam(TypedDict, total=False): - """SkillReferenceParam. - - :ivar type: References a skill created with the /v1/skills endpoint. Required. SKILL_REFERENCE. - :vartype type: Literal[ContainerSkillType.SKILL_REFERENCE] - :ivar skill_id: The ID of the referenced skill. Required. - :vartype skill_id: str - :ivar version: Optional skill version. Use a positive integer or 'latest'. Omit for default. - :vartype version: str - """ - - type: Required[Literal[ContainerSkillType.SKILL_REFERENCE]] - """References a skill created with the /v1/skills endpoint. Required. SKILL_REFERENCE.""" - skill_id: Required[str] - """The ID of the referenced skill. Required.""" - version: str - """Optional skill version. Use a positive integer or 'latest'. Omit for default.""" - - -class SpecificApplyPatchParam(TypedDict, total=False): - """Specific apply patch tool choice. - - :ivar type: The tool to call. Always ``apply_patch``. Required. APPLY_PATCH. - :vartype type: Literal[ToolChoiceParamType.APPLY_PATCH] - """ - - type: Required[Literal[ToolChoiceParamType.APPLY_PATCH]] - """The tool to call. Always ``apply_patch``. Required. APPLY_PATCH.""" - - -class SpecificFunctionShellParam(TypedDict, total=False): - """Specific shell tool choice. - - :ivar type: The tool to call. Always ``shell``. Required. SHELL. - :vartype type: Literal[ToolChoiceParamType.SHELL] - """ - - type: Required[Literal[ToolChoiceParamType.SHELL]] - """The tool to call. Always ``shell``. Required. SHELL.""" - - -class StructuredInputDefinition(TypedDict, total=False): - """An structured input that can participate in prompt template substitutions and tool argument - binding. - - :ivar description: A human-readable description of the input. - :vartype description: str - :ivar default_value: The default value for the input if no run-time value is provided. - :vartype default_value: Any - :ivar schema: The JSON schema for the structured input (optional). - :vartype schema: dict[str, Any] - :ivar required: Whether the input property is required when the agent is invoked. The service - defaults to ``false`` if a value is not specified by the caller. - :vartype required: bool - """ - - description: str - """A human-readable description of the input.""" - default_value: Any - """The default value for the input if no run-time value is provided.""" - schema: dict[str, Any] - """The JSON schema for the structured input (optional).""" - required: bool - """Whether the input property is required when the agent is invoked. The service defaults to - ``false`` if a value is not specified by the caller.""" - - -class StructuredOutputDefinition(TypedDict, total=False): - """A structured output that can be produced by the agent. - - :ivar name: The name of the structured output. Required. - :vartype name: str - :ivar description: A description of the output to emit. Used by the model to determine when to - emit the output. Required. - :vartype description: str - :ivar schema: The JSON schema for the structured output. Required. - :vartype schema: dict[str, Any] - :ivar strict: Whether to enforce strict validation. Default ``true``. Required. - :vartype strict: bool - """ - - name: Required[str] - """The name of the structured output. Required.""" - description: Required[str] - """A description of the output to emit. Used by the model to determine when to emit the output. - Required.""" - schema: Required[dict[str, Any]] - """The JSON schema for the structured output. Required.""" - strict: Required[Optional[bool]] - """Whether to enforce strict validation. Default ``true``. Required.""" - - -class TaxonomyCategory(TypedDict, total=False): - """Taxonomy category definition. - - :ivar id: Unique identifier of the taxonomy category. Required. - :vartype id: str - :ivar name: Name of the taxonomy category. Required. - :vartype name: str - :ivar description: Description of the taxonomy category. - :vartype description: str - :ivar risk_category: Risk category associated with this taxonomy category. Required. Known - values are: "HateUnfairness", "Violence", "Sexual", "SelfHarm", "ProtectedMaterial", - "CodeVulnerability", "UngroundedAttributes", "ProhibitedActions", "SensitiveDataLeakage", and - "TaskAdherence". - :vartype risk_category: Union[str, "RiskCategory"] - :ivar sub_categories: List of taxonomy sub categories. Required. - :vartype sub_categories: list["TaxonomySubCategory"] - :ivar properties: Additional properties for the taxonomy category. - :vartype properties: dict[str, str] - """ - - id: Required[str] - """Unique identifier of the taxonomy category. Required.""" - name: Required[str] - """Name of the taxonomy category. Required.""" - description: str - """Description of the taxonomy category.""" - riskCategory: Required[Union[str, "RiskCategory"]] - """Risk category associated with this taxonomy category. Required. Known values are: - \"HateUnfairness\", \"Violence\", \"Sexual\", \"SelfHarm\", \"ProtectedMaterial\", - \"CodeVulnerability\", \"UngroundedAttributes\", \"ProhibitedActions\", - \"SensitiveDataLeakage\", and \"TaskAdherence\".""" - subCategories: Required[list["TaxonomySubCategory"]] - """List of taxonomy sub categories. Required.""" - properties: dict[str, str] - """Additional properties for the taxonomy category.""" - - -class TaxonomySubCategory(TypedDict, total=False): - """Taxonomy sub-category definition. - - :ivar id: Unique identifier of the taxonomy sub-category. Required. - :vartype id: str - :ivar name: Name of the taxonomy sub-category. Required. - :vartype name: str - :ivar description: Description of the taxonomy sub-category. - :vartype description: str - :ivar enabled: List of taxonomy items under this sub-category. Required. - :vartype enabled: bool - :ivar properties: Additional properties for the taxonomy sub-category. - :vartype properties: dict[str, str] - """ - - id: Required[str] - """Unique identifier of the taxonomy sub-category. Required.""" - name: Required[str] - """Name of the taxonomy sub-category. Required.""" - description: str - """Description of the taxonomy sub-category.""" - enabled: Required[bool] - """List of taxonomy items under this sub-category. Required.""" - properties: dict[str, str] - """Additional properties for the taxonomy sub-category.""" - - -class TelemetryConfig(TypedDict, total=False): - """Customer-supplied telemetry configuration for exporting container logs, traces, and metrics. - - :ivar endpoints: Customer-supplied telemetry export endpoint configurations. Required. - :vartype endpoints: list["TelemetryEndpoint"] - """ - - endpoints: Required[list["TelemetryEndpoint"]] - """Customer-supplied telemetry export endpoint configurations. Required.""" - - -class TextResponseFormatJsonObject(TypedDict, total=False): - """JSON object. - - :ivar type: The type of response format being defined. Always ``json_object``. Required. - JSON_OBJECT. - :vartype type: Literal[TextResponseFormatConfigurationType.JSON_OBJECT] - """ - - type: Required[Literal[TextResponseFormatConfigurationType.JSON_OBJECT]] - """The type of response format being defined. Always ``json_object``. Required. JSON_OBJECT.""" - - -class TextResponseFormatJsonSchema(TypedDict, total=False): - """JSON schema. - - :ivar type: The type of response format being defined. Always ``json_schema``. Required. - JSON_SCHEMA. - :vartype type: Literal[TextResponseFormatConfigurationType.JSON_SCHEMA] - :ivar description: A description of what the response format is for, used by the model to - determine how to respond in the format. - :vartype description: str - :ivar name: The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and - dashes, with a maximum length of 64. Required. - :vartype name: str - :ivar schema: Required. - :vartype schema: dict[str, Any] - :ivar strict: - :vartype strict: bool - """ - - type: Required[Literal[TextResponseFormatConfigurationType.JSON_SCHEMA]] - """The type of response format being defined. Always ``json_schema``. Required. JSON_SCHEMA.""" - description: str - """A description of what the response format is for, used by the model to determine how to respond - in the format.""" - name: Required[str] - """The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with - a maximum length of 64. Required.""" - schema: Required[dict[str, Any]] - """Required.""" - strict: Optional[bool] - - -class TextResponseFormatText(TypedDict, total=False): - """Text. - - :ivar type: The type of response format being defined. Always ``text``. Required. TEXT. - :vartype type: Literal[TextResponseFormatConfigurationType.TEXT] - """ - - type: Required[Literal[TextResponseFormatConfigurationType.TEXT]] - """The type of response format being defined. Always ``text``. Required. TEXT.""" - - -class TimerRoutineTrigger(TypedDict, total=False): - """A one-shot timer routine trigger. - - :ivar type: The trigger type. Required. A one-shot timer trigger. - :vartype type: Literal[RoutineTriggerType.TIMER] - :ivar at: The UTC date and time at which the timer fires. - :vartype at: int - """ - - type: Required[Literal[RoutineTriggerType.TIMER]] - """The trigger type. Required. A one-shot timer trigger.""" - at: int - """The UTC date and time at which the timer fires.""" - - -class ToolboxPolicies(TypedDict, total=False): - """Policy configuration for a toolbox, including content safety and other governance settings. - - :ivar rai_config: Responsible AI content filtering configuration. - :vartype rai_config: "RaiConfig" - """ - - rai_config: "RaiConfig" - """Responsible AI content filtering configuration.""" - - -class ToolboxSearchPreviewToolboxTool(TypedDict, total=False): - """A toolbox search tool stored in a toolbox. - - :ivar name: Optional user-defined name for this tool or configuration. - :vartype name: str - :ivar description: Optional user-defined description for this tool or configuration. - :vartype description: str - :ivar tool_configs: Per-tool configuration map. Keys are tool names or ``*`` (catch-all - default). Resolution order: exact tool name match takes priority over ``*``. Unknown tool names - are silently ignored at runtime. - :vartype tool_configs: dict[str, "ToolConfig"] - :ivar type: The type of the tool. Always ``toolbox_search_preview``. Required. - TOOLBOX_SEARCH_PREVIEW. - :vartype type: Literal[ToolboxToolType.TOOLBOX_SEARCH_PREVIEW] - """ - - name: str - """Optional user-defined name for this tool or configuration.""" - description: str - """Optional user-defined description for this tool or configuration.""" - tool_configs: dict[str, "ToolConfig"] - """Per-tool configuration map. Keys are tool names or ``*`` (catch-all default). Resolution order: - exact tool name match takes priority over ``*``. Unknown tool names are silently ignored at - runtime.""" - type: Required[Literal[ToolboxToolType.TOOLBOX_SEARCH_PREVIEW]] - """The type of the tool. Always ``toolbox_search_preview``. Required. TOOLBOX_SEARCH_PREVIEW.""" - - -class ToolboxSkillReference(TypedDict, total=False): - """A reference to an existing skill to include in a toolbox. - - :ivar type: The type of skill source. Required. Default value is "skill_reference". - :vartype type: Literal["skill_reference"] - :ivar name: The name of the skill. Required. - :vartype name: str - :ivar version: The version of the skill. If not specified, the skill's default version is used. - When a version is specified, the reference is pinned to that immutable version. - :vartype version: str - """ - - type: Required[Literal["skill_reference"]] - """The type of skill source. Required. Default value is \"skill_reference\".""" - name: Required[str] - """The name of the skill. Required.""" - version: str - """The version of the skill. If not specified, the skill's default version is used. When a version - is specified, the reference is pinned to that immutable version.""" - - -class ToolChoiceAllowed(TypedDict, total=False): - """Allowed tools. - - :ivar type: Allowed tool configuration type. Always ``allowed_tools``. Required. ALLOWED_TOOLS. - :vartype type: Literal[ToolChoiceParamType.ALLOWED_TOOLS] - :ivar mode: Constrains the tools available to the model to a pre-defined set. ``auto`` allows - the model to pick from among the allowed tools and generate a message. ``required`` requires - the model to call one or more of the allowed tools. Required. Is either a Literal["auto"] type - or a Literal["required"] type. - :vartype mode: Literal["auto", "required"] - :ivar tools: Required. A list of tool definitions that the model should be allowed to call. For - the Responses API, the list of tool definitions might look like: - - .. code-block:: json - - [ - { "type": "function", "name": "get_weather" }, - { "type": "mcp", "server_label": "deepwiki" }, - { "type": "image_generation" } - ] - :vartype tools: list[dict[str, Any]] - """ - - type: Required[Literal[ToolChoiceParamType.ALLOWED_TOOLS]] - """Allowed tool configuration type. Always ``allowed_tools``. Required. ALLOWED_TOOLS.""" - mode: Required[Literal["auto", "required"]] - """Constrains the tools available to the model to a pre-defined set. ``auto`` allows the model to - pick from among the allowed tools and generate a message. ``required`` requires the model to - call one or more of the allowed tools. Required. Is either a Literal[\"auto\"] type or a - Literal[\"required\"] type.""" - tools: Required[list[dict[str, Any]]] - """Required. A list of tool definitions that the model should be allowed to call. For the - Responses API, the list of tool definitions might look like: - - .. code-block:: json - - [ - { \"type\": \"function\", \"name\": \"get_weather\" }, - { \"type\": \"mcp\", \"server_label\": \"deepwiki\" }, - { \"type\": \"image_generation\" } - ]""" - - -class ToolChoiceCodeInterpreter(TypedDict, total=False): - """Indicates that the model should use a built-in tool to generate a response. `Learn more about - built-in tools `_. - - :ivar type: Required. CODE_INTERPRETER. - :vartype type: Literal[ToolChoiceParamType.CODE_INTERPRETER] - """ - - type: Required[Literal[ToolChoiceParamType.CODE_INTERPRETER]] - """Required. CODE_INTERPRETER.""" - - -class ToolChoiceComputer(TypedDict, total=False): - """Indicates that the model should use a built-in tool to generate a response. `Learn more about - built-in tools `_. - - :ivar type: Required. COMPUTER. - :vartype type: Literal[ToolChoiceParamType.COMPUTER] - """ - - type: Required[Literal[ToolChoiceParamType.COMPUTER]] - """Required. COMPUTER.""" - - -class ToolChoiceComputerUse(TypedDict, total=False): - """Indicates that the model should use a built-in tool to generate a response. `Learn more about - built-in tools `_. - - :ivar type: Required. COMPUTER_USE. - :vartype type: Literal[ToolChoiceParamType.COMPUTER_USE] - """ - - type: Required[Literal[ToolChoiceParamType.COMPUTER_USE]] - """Required. COMPUTER_USE.""" - - -class ToolChoiceComputerUsePreview(TypedDict, total=False): - """Indicates that the model should use a built-in tool to generate a response. `Learn more about - built-in tools `_. - - :ivar type: Required. COMPUTER_USE_PREVIEW. - :vartype type: Literal[ToolChoiceParamType.COMPUTER_USE_PREVIEW] - """ - - type: Required[Literal[ToolChoiceParamType.COMPUTER_USE_PREVIEW]] - """Required. COMPUTER_USE_PREVIEW.""" - - -class ToolChoiceCustom(TypedDict, total=False): - """Custom tool. - - :ivar type: For custom tool calling, the type is always ``custom``. Required. CUSTOM. - :vartype type: Literal[ToolChoiceParamType.CUSTOM] - :ivar name: The name of the custom tool to call. Required. - :vartype name: str - """ - - type: Required[Literal[ToolChoiceParamType.CUSTOM]] - """For custom tool calling, the type is always ``custom``. Required. CUSTOM.""" - name: Required[str] - """The name of the custom tool to call. Required.""" - - -class ToolChoiceFileSearch(TypedDict, total=False): - """Indicates that the model should use a built-in tool to generate a response. `Learn more about - built-in tools `_. - - :ivar type: Required. FILE_SEARCH. - :vartype type: Literal[ToolChoiceParamType.FILE_SEARCH] - """ - - type: Required[Literal[ToolChoiceParamType.FILE_SEARCH]] - """Required. FILE_SEARCH.""" - - -class ToolChoiceFunction(TypedDict, total=False): - """Function tool. - - :ivar type: For function calling, the type is always ``function``. Required. FUNCTION. - :vartype type: Literal[ToolChoiceParamType.FUNCTION] - :ivar name: The name of the function to call. Required. - :vartype name: str - """ - - type: Required[Literal[ToolChoiceParamType.FUNCTION]] - """For function calling, the type is always ``function``. Required. FUNCTION.""" - name: Required[str] - """The name of the function to call. Required.""" - - -class ToolChoiceImageGeneration(TypedDict, total=False): - """Indicates that the model should use a built-in tool to generate a response. `Learn more about - built-in tools `_. - - :ivar type: Required. IMAGE_GENERATION. - :vartype type: Literal[ToolChoiceParamType.IMAGE_GENERATION] - """ - - type: Required[Literal[ToolChoiceParamType.IMAGE_GENERATION]] - """Required. IMAGE_GENERATION.""" - - -class ToolChoiceMCP(TypedDict, total=False): - """MCP tool. - - :ivar type: For MCP tools, the type is always ``mcp``. Required. MCP. - :vartype type: Literal[ToolChoiceParamType.MCP] - :ivar server_label: The label of the MCP server to use. Required. - :vartype server_label: str - :ivar name: - :vartype name: str - """ - - type: Required[Literal[ToolChoiceParamType.MCP]] - """For MCP tools, the type is always ``mcp``. Required. MCP.""" - server_label: Required[str] - """The label of the MCP server to use. Required.""" - name: Optional[str] - - -class ToolChoiceWebSearchPreview(TypedDict, total=False): - """Indicates that the model should use a built-in tool to generate a response. `Learn more about - built-in tools `_. - - :ivar type: Required. WEB_SEARCH_PREVIEW. - :vartype type: Literal[ToolChoiceParamType.WEB_SEARCH_PREVIEW] - """ - - type: Required[Literal[ToolChoiceParamType.WEB_SEARCH_PREVIEW]] - """Required. WEB_SEARCH_PREVIEW.""" - - -class ToolChoiceWebSearchPreview20250311(TypedDict, total=False): - """Indicates that the model should use a built-in tool to generate a response. `Learn more about - built-in tools `_. - - :ivar type: Required. WEB_SEARCH_PREVIEW_2025_03_11. - :vartype type: Literal[ToolChoiceParamType.WEB_SEARCH_PREVIEW_2025_03_11] - """ - - type: Required[Literal[ToolChoiceParamType.WEB_SEARCH_PREVIEW_2025_03_11]] - """Required. WEB_SEARCH_PREVIEW_2025_03_11.""" - - -class ToolConfig(TypedDict, total=False): - """Per-tool configuration that controls tool visibility and search behavior. - - :ivar pin: When true, the tool is always included in agent context and visible in - ``tools/list``. When false (default), the tool is hidden from ``tools/list`` and only - discoverable via ``tool_search``. - :vartype pin: bool - :ivar additional_search_text: Additional text indexed for tool_search. Supplements the native - tool description to improve discoverability. Does not alter ``tools/list`` output. - :vartype additional_search_text: str - """ - - pin: bool - """When true, the tool is always included in agent context and visible in ``tools/list``. When - false (default), the tool is hidden from ``tools/list`` and only discoverable via - ``tool_search``.""" - additional_search_text: str - """Additional text indexed for tool_search. Supplements the native tool description to improve - discoverability. Does not alter ``tools/list`` output.""" - - -class ToolDescription(TypedDict, total=False): - """Description of a tool that can be used by an agent. - - :ivar name: The name of the tool. - :vartype name: str - :ivar description: A brief description of the tool's purpose. - :vartype description: str - """ - - name: str - """The name of the tool.""" - description: str - """A brief description of the tool's purpose.""" - - -class ToolProjectConnection(TypedDict, total=False): - """A project connection resource. - - :ivar project_connection_id: A project connection in a ToolProjectConnectionList attached to - this tool. Required. - :vartype project_connection_id: str - """ - - project_connection_id: Required[str] - """A project connection in a ToolProjectConnectionList attached to this tool. Required.""" - - -class ToolSearchToolParam(TypedDict, total=False): - """Tool search tool. - - :ivar type: The type of the tool. Always ``tool_search``. Required. TOOL_SEARCH. - :vartype type: Literal[ToolType.TOOL_SEARCH] - :ivar execution: Whether tool search is executed by the server or by the client. Known values - are: "server" and "client". - :vartype execution: Union[str, "ToolSearchExecutionType"] - :ivar description: - :vartype description: str - :ivar parameters: - :vartype parameters: "EmptyModelParam" - """ - - type: Required[Literal[ToolType.TOOL_SEARCH]] - """The type of the tool. Always ``tool_search``. Required. TOOL_SEARCH.""" - execution: Union[str, "ToolSearchExecutionType"] - """Whether tool search is executed by the server or by the client. Known values are: \"server\" - and \"client\".""" - description: Optional[str] - parameters: Optional["EmptyModelParam"] - - -class ToolUseFineTuningDataGenerationJobOptions(TypedDict, total=False): # pylint: disable=name-too-long - """The options for a data generation job with ToolUse type. Used only for fine-tuning scenarios. - - :ivar max_samples: Maximum number of samples to generate. Required. - :vartype max_samples: int - :ivar train_split: The proportion of the generated data to be used for training when the data - is used for fine-tuning. The rest will be used for validation. Value should be between 0 and 1. - :vartype train_split: float - :ivar model_options: The LLM model options. - :vartype model_options: "DataGenerationModelOptions" - :ivar type: The data generation job type, which is ToolUse for this model. Required. Tool - calling conversation between user and agent. - :vartype type: Literal[DataGenerationJobType.TOOL_USE] - """ - - max_samples: Required[int] - """Maximum number of samples to generate. Required.""" - train_split: float - """The proportion of the generated data to be used for training when the data is used for - fine-tuning. The rest will be used for validation. Value should be between 0 and 1.""" - model_options: "DataGenerationModelOptions" - """The LLM model options.""" - type: Required[Literal[DataGenerationJobType.TOOL_USE]] - """The data generation job type, which is ToolUse for this model. Required. Tool calling - conversation between user and agent.""" - - -class TracesDataGenerationJobOptions(TypedDict, total=False): - """The options for a data generation job with Traces type. - - :ivar max_samples: Maximum number of samples to generate. Required. - :vartype max_samples: int - :ivar train_split: The proportion of the generated data to be used for training when the data - is used for fine-tuning. The rest will be used for validation. Value should be between 0 and 1. - :vartype train_split: float - :ivar model_options: The LLM model options. - :vartype model_options: "DataGenerationModelOptions" - :ivar type: The data generation job type, which is Traces for this model. Required. Single turn - query and response from agent traces. - :vartype type: Literal[DataGenerationJobType.TRACES] - """ - - max_samples: Required[int] - """Maximum number of samples to generate. Required.""" - train_split: float - """The proportion of the generated data to be used for training when the data is used for - fine-tuning. The rest will be used for validation. Value should be between 0 and 1.""" - model_options: "DataGenerationModelOptions" - """The LLM model options.""" - type: Required[Literal[DataGenerationJobType.TRACES]] - """The data generation job type, which is Traces for this model. Required. Single turn query and - response from agent traces.""" - - -class TracesDataGenerationJobSource(TypedDict, total=False): - """Traces source for data generation jobs — conversation traces from Application Insights. - - :ivar description: Optional description of what this source represents — helps the pipeline - interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core - capabilities'). - :vartype description: str - :ivar type: The source type for this source, which is Traces. Required. Traces source — - conversation traces from Application Insights. - :vartype type: Literal[DataGenerationJobSourceType.TRACES] - :ivar agent_id: The unique agent ID used to filter traces. Provide either ``agent_id`` or - ``agent_name`` — at least one is required. - :vartype agent_id: str - :ivar agent_name: The agent name to fetch traces for. Provide either ``agent_id`` or - ``agent_name`` — at least one is required. - :vartype agent_name: str - :ivar agent_version: The agent version. If not specified, traces for ALL versions of the agent - are included within the time window. - :vartype agent_version: str - :ivar start_time: Start of the time window (Unix timestamp in seconds) for fetching traces. - Required. - :vartype start_time: int - :ivar end_time: End of the time window (Unix timestamp in seconds). Defaults to current time. - :vartype end_time: int - """ - - description: str - """Optional description of what this source represents — helps the pipeline interpret its content - (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities').""" - type: Required[Literal[DataGenerationJobSourceType.TRACES]] - """The source type for this source, which is Traces. Required. Traces source — conversation traces - from Application Insights.""" - agent_id: str - """The unique agent ID used to filter traces. Provide either ``agent_id`` or ``agent_name`` — at - least one is required.""" - agent_name: str - """The agent name to fetch traces for. Provide either ``agent_id`` or ``agent_name`` — at least - one is required.""" - agent_version: str - """The agent version. If not specified, traces for ALL versions of the agent are included within - the time window.""" - start_time: Required[int] - """Start of the time window (Unix timestamp in seconds) for fetching traces. Required.""" - end_time: int - """End of the time window (Unix timestamp in seconds). Defaults to current time.""" - - -class TracesEvaluatorGenerationJobSource(TypedDict, total=False): - """Traces source for evaluator generation jobs — conversation traces from Application Insights. - - :ivar description: Optional description of what this source represents — helps the pipeline - interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core - capabilities'). - :vartype description: str - :ivar type: The source type for this source, which is Traces. Required. Traces source — - conversation traces from Application Insights. - :vartype type: Literal[EvaluatorGenerationJobSourceType.TRACES] - :ivar agent_id: The unique agent ID used to filter traces. Provide either ``agent_id`` or - ``agent_name`` — at least one is required. - :vartype agent_id: str - :ivar agent_name: The agent name to fetch traces for. Provide either ``agent_id`` or - ``agent_name`` — at least one is required. - :vartype agent_name: str - :ivar agent_version: The agent version. If not specified, traces for ALL versions of the agent - are included within the time window. - :vartype agent_version: str - :ivar start_time: Start of the time window (Unix timestamp in seconds) for fetching traces. - Required. - :vartype start_time: int - :ivar end_time: End of the time window (Unix timestamp in seconds). Defaults to current time. - :vartype end_time: int - """ - - description: str - """Optional description of what this source represents — helps the pipeline interpret its content - (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities').""" - type: Required[Literal[EvaluatorGenerationJobSourceType.TRACES]] - """The source type for this source, which is Traces. Required. Traces source — conversation traces - from Application Insights.""" - agent_id: str - """The unique agent ID used to filter traces. Provide either ``agent_id`` or ``agent_name`` — at - least one is required.""" - agent_name: str - """The agent name to fetch traces for. Provide either ``agent_id`` or ``agent_name`` — at least - one is required.""" - agent_version: str - """The agent version. If not specified, traces for ALL versions of the agent are included within - the time window.""" - start_time: Required[int] - """Start of the time window (Unix timestamp in seconds) for fetching traces. Required.""" - end_time: int - """End of the time window (Unix timestamp in seconds). Defaults to current time.""" - - -class UpdateModelVersionRequest(TypedDict, total=False): - """Request body for updating a model version. Only description and tags can be modified. - - :ivar description: The asset description text. - :vartype description: str - :ivar tags: Tag dictionary. Tags can be added, removed, and updated. - :vartype tags: dict[str, str] - """ - - description: str - """The asset description text.""" - tags: dict[str, str] - """Tag dictionary. Tags can be added, removed, and updated.""" - - -class UpdateToolboxRequest(TypedDict, total=False): - """UpdateToolboxRequest. - - :ivar default_version: The version identifier that the toolbox should point to. When set, the - toolbox's default version will resolve to this version instead of the latest. Required. - :vartype default_version: str - """ - - default_version: Required[str] - """The version identifier that the toolbox should point to. When set, the toolbox's default - version will resolve to this version instead of the latest. Required.""" - - -class VersionRefIndicator(TypedDict, total=False): - """Version indicator that references a specific agent version by name. - - :ivar type: Discriminator value for version_ref. Required. Direct reference to a specific agent - version. - :vartype type: Literal[VersionIndicatorType.VERSION_REF] - :ivar agent_version: The agent version identifier returned by the agent version APIs. Required. - :vartype agent_version: str - """ - - type: Required[Literal[VersionIndicatorType.VERSION_REF]] - """Discriminator value for version_ref. Required. Direct reference to a specific agent version.""" - agent_version: Required[str] - """The agent version identifier returned by the agent version APIs. Required.""" - - -class VersionSelector(TypedDict, total=False): - """VersionSelector. - - :ivar version_selection_rules: Required. - :vartype version_selection_rules: list["VersionSelectionRule"] - """ - - version_selection_rules: Required[list["VersionSelectionRule"]] - """Required.""" - - -class WebSearchApproximateLocation(TypedDict, total=False): - """Web search approximate location. - - :ivar type: The type of location approximation. Always ``approximate``. Required. Default value - is "approximate". - :vartype type: Literal["approximate"] - :ivar country: - :vartype country: str - :ivar region: - :vartype region: str - :ivar city: - :vartype city: str - :ivar timezone: - :vartype timezone: str - """ - - type: Required[Literal["approximate"]] - """The type of location approximation. Always ``approximate``. Required. Default value is - \"approximate\".""" - country: Optional[str] - region: Optional[str] - city: Optional[str] - timezone: Optional[str] - - -class WebSearchConfiguration(TypedDict, total=False): - """A web search configuration for bing custom search. - - :ivar project_connection_id: Project connection id for grounding with bing custom search. - Required. - :vartype project_connection_id: str - :ivar instance_name: Name of the custom configuration instance given to config. Required. - :vartype instance_name: str - """ - - project_connection_id: Required[str] - """Project connection id for grounding with bing custom search. Required.""" - instance_name: Required[str] - """Name of the custom configuration instance given to config. Required.""" - - -class WebSearchPreviewTool(TypedDict, total=False): - """Web search preview. - - :ivar type: The type of the web search tool. One of ``web_search_preview`` or - ``web_search_preview_2025_03_11``. Required. WEB_SEARCH_PREVIEW. - :vartype type: Literal[ToolType.WEB_SEARCH_PREVIEW] - :ivar user_location: - :vartype user_location: "ApproximateLocation" - :ivar search_context_size: High level guidance for the amount of context window space to use - for the search. One of ``low``, ``medium``, or ``high``. ``medium`` is the default. Known - values are: "low", "medium", and "high". - :vartype search_context_size: Union[str, "SearchContextSize"] - :ivar search_content_types: - :vartype search_content_types: list[Union[str, "SearchContentType"]] - """ - - type: Required[Literal[ToolType.WEB_SEARCH_PREVIEW]] - """The type of the web search tool. One of ``web_search_preview`` or - ``web_search_preview_2025_03_11``. Required. WEB_SEARCH_PREVIEW.""" - user_location: Optional["ApproximateLocation"] - search_context_size: Union[str, "SearchContextSize"] - """High level guidance for the amount of context window space to use for the search. One of - ``low``, ``medium``, or ``high``. ``medium`` is the default. Known values are: \"low\", - \"medium\", and \"high\".""" - search_content_types: list[Union[str, "SearchContentType"]] - - -class WebSearchTool(TypedDict, total=False): - """Web search. - - :ivar type: The type of the web search tool. One of ``web_search`` or - ``web_search_2025_08_26``. Required. WEB_SEARCH. - :vartype type: Literal[ToolType.WEB_SEARCH] - :ivar filters: - :vartype filters: "WebSearchToolFilters" - :ivar user_location: - :vartype user_location: "WebSearchApproximateLocation" - :ivar search_context_size: High level guidance for the amount of context window space to use - for the search. One of ``low``, ``medium``, or ``high``. ``medium`` is the default. Is one of - the following types: Literal["low"], Literal["medium"], Literal["high"] - :vartype search_context_size: Literal["low", "medium", "high"] - :ivar name: Deprecated. This property is deprecated and will be removed in a future version. - :vartype name: str - :ivar description: Deprecated. This property is deprecated and will be removed in a future - version. - :vartype description: str - :ivar tool_configs: Deprecated. This property is deprecated and will be removed in a future - version. - :vartype tool_configs: dict[str, "ToolConfig"] - :ivar custom_search_configuration: The project connections attached to this tool. There can be - a maximum of 1 connection resource attached to the tool. - :vartype custom_search_configuration: "WebSearchConfiguration" - """ - - type: Required[Literal[ToolType.WEB_SEARCH]] - """The type of the web search tool. One of ``web_search`` or ``web_search_2025_08_26``. Required. - WEB_SEARCH.""" - filters: Optional["WebSearchToolFilters"] - user_location: Optional["WebSearchApproximateLocation"] - search_context_size: Literal["low", "medium", "high"] - """High level guidance for the amount of context window space to use for the search. One of - ``low``, ``medium``, or ``high``. ``medium`` is the default. Is one of the following types: - Literal[\"low\"], Literal[\"medium\"], Literal[\"high\"]""" - name: str - """Deprecated. This property is deprecated and will be removed in a future version.""" - description: str - """Deprecated. This property is deprecated and will be removed in a future version.""" - tool_configs: dict[str, "ToolConfig"] - """Deprecated. This property is deprecated and will be removed in a future version.""" - custom_search_configuration: "WebSearchConfiguration" - """The project connections attached to this tool. There can be a maximum of 1 connection resource - attached to the tool.""" - - -class WebSearchToolboxTool(TypedDict, total=False): - """A web search tool stored in a toolbox. - - :ivar name: Optional user-defined name for this tool or configuration. - :vartype name: str - :ivar description: Optional user-defined description for this tool or configuration. - :vartype description: str - :ivar tool_configs: Per-tool configuration map. Keys are tool names or ``*`` (catch-all - default). Resolution order: exact tool name match takes priority over ``*``. Unknown tool names - are silently ignored at runtime. - :vartype tool_configs: dict[str, "ToolConfig"] - :ivar type: Required. WEB_SEARCH. - :vartype type: Literal[ToolboxToolType.WEB_SEARCH] - :ivar filters: - :vartype filters: "WebSearchToolFilters" - :ivar user_location: - :vartype user_location: "WebSearchApproximateLocation" - :ivar search_context_size: High level guidance for the amount of context window space to use - for the search. One of ``low``, ``medium``, or ``high``. ``medium`` is the default. Is one of - the following types: Literal["low"], Literal["medium"], Literal["high"] - :vartype search_context_size: Literal["low", "medium", "high"] - :ivar custom_search_configuration: The project connections attached to this tool. There can be - a maximum of 1 connection resource attached to the tool. - :vartype custom_search_configuration: "WebSearchConfiguration" - """ - - name: str - """Optional user-defined name for this tool or configuration.""" - description: str - """Optional user-defined description for this tool or configuration.""" - tool_configs: dict[str, "ToolConfig"] - """Per-tool configuration map. Keys are tool names or ``*`` (catch-all default). Resolution order: - exact tool name match takes priority over ``*``. Unknown tool names are silently ignored at - runtime.""" - type: Required[Literal[ToolboxToolType.WEB_SEARCH]] - """Required. WEB_SEARCH.""" - filters: Optional["WebSearchToolFilters"] - user_location: Optional["WebSearchApproximateLocation"] - search_context_size: Literal["low", "medium", "high"] - """High level guidance for the amount of context window space to use for the search. One of - ``low``, ``medium``, or ``high``. ``medium`` is the default. Is one of the following types: - Literal[\"low\"], Literal[\"medium\"], Literal[\"high\"]""" - custom_search_configuration: "WebSearchConfiguration" - """The project connections attached to this tool. There can be a maximum of 1 connection resource - attached to the tool.""" - - -class WebSearchToolFilters(TypedDict, total=False): - """WebSearchToolFilters. - - :ivar allowed_domains: - :vartype allowed_domains: list[str] - """ - - allowed_domains: Optional[list[str]] - - -class WeeklyRecurrenceSchedule(TypedDict, total=False): - """Weekly recurrence schedule. - - :ivar type: Weekly recurrence type. Required. Weekly recurrence pattern. - :vartype type: Literal[RecurrenceType.WEEKLY] - :ivar days_of_week: Days of the week for the recurrence schedule. Required. - :vartype days_of_week: list[Union[str, "DayOfWeek"]] - """ - - type: Required[Literal[RecurrenceType.WEEKLY]] - """Weekly recurrence type. Required. Weekly recurrence pattern.""" - daysOfWeek: Required[list[Union[str, "DayOfWeek"]]] - """Days of the week for the recurrence schedule. Required.""" - - -class WorkflowAgentDefinition(TypedDict, total=False): - """The workflow agent definition. - - :ivar rai_config: Configuration for Responsible AI (RAI) content filtering and safety features. - :vartype rai_config: "RaiConfig" - :ivar kind: Required. WORKFLOW. - :vartype kind: Literal[AgentKind.WORKFLOW] - :ivar workflow: The CSDL YAML definition of the workflow. - :vartype workflow: str - """ - - rai_config: "RaiConfig" - """Configuration for Responsible AI (RAI) content filtering and safety features.""" - kind: Required[Literal[AgentKind.WORKFLOW]] - """Required. WORKFLOW.""" - workflow: str - """The CSDL YAML definition of the workflow.""" - - -class WorkIQPreviewTool(TypedDict, total=False): - """A WorkIQ server-side tool. - - :ivar type: The object type, which is always 'work_iq_preview'. Required. WORK_IQ_PREVIEW. - :vartype type: Literal[ToolType.WORK_IQ_PREVIEW] - :ivar project_connection_id: The ID of the WorkIQ project connection. Required. - :vartype project_connection_id: str - """ - - type: Required[Literal[ToolType.WORK_IQ_PREVIEW]] - """The object type, which is always 'work_iq_preview'. Required. WORK_IQ_PREVIEW.""" - project_connection_id: Required[str] - """The ID of the WorkIQ project connection. Required.""" - - -class WorkIQPreviewToolboxTool(TypedDict, total=False): - """A WorkIQ tool stored in a toolbox. - - :ivar name: Optional user-defined name for this tool or configuration. - :vartype name: str - :ivar description: Optional user-defined description for this tool or configuration. - :vartype description: str - :ivar tool_configs: Per-tool configuration map. Keys are tool names or ``*`` (catch-all - default). Resolution order: exact tool name match takes priority over ``*``. Unknown tool names - are silently ignored at runtime. - :vartype tool_configs: dict[str, "ToolConfig"] - :ivar type: Required. WORK_IQ_PREVIEW. - :vartype type: Literal[ToolboxToolType.WORK_IQ_PREVIEW] - :ivar project_connection_id: The ID of the WorkIQ project connection. Required. - :vartype project_connection_id: str - """ - - name: str - """Optional user-defined name for this tool or configuration.""" - description: str - """Optional user-defined description for this tool or configuration.""" - tool_configs: dict[str, "ToolConfig"] - """Per-tool configuration map. Keys are tool names or ``*`` (catch-all default). Resolution order: - exact tool name match takes priority over ``*``. Unknown tool names are silently ignored at - runtime.""" - type: Required[Literal[ToolboxToolType.WORK_IQ_PREVIEW]] - """Required. WORK_IQ_PREVIEW.""" - project_connection_id: Required[str] - """The ID of the WorkIQ project connection. Required.""" - - -class CreateMemoryStoreRequest(TypedDict, total=False): - """CreateMemoryStoreRequest. - - :ivar name: The name of the memory store. Required. - :vartype name: str - :ivar description: A human-readable description of the memory store. - :vartype description: str - :ivar metadata: Arbitrary key-value metadata to associate with the memory store. - :vartype metadata: dict[str, str] - :ivar definition: The memory store definition. Required. - :vartype definition: "MemoryStoreDefinition" - """ - - name: Required[str] - """The name of the memory store. Required.""" - description: str - """A human-readable description of the memory store.""" - metadata: dict[str, str] - """Arbitrary key-value metadata to associate with the memory store.""" - definition: Required["MemoryStoreDefinition"] - """The memory store definition. Required.""" - - -class UpdateMemoryStoreRequest(TypedDict, total=False): - """UpdateMemoryStoreRequest. - - :ivar description: A human-readable description of the memory store. - :vartype description: str - :ivar metadata: Arbitrary key-value metadata to associate with the memory store. - :vartype metadata: dict[str, str] - """ - - description: str - """A human-readable description of the memory store.""" - metadata: dict[str, str] - """Arbitrary key-value metadata to associate with the memory store.""" - - -class SearchMemoriesRequest(TypedDict, total=False): - """SearchMemoriesRequest. - - :ivar scope: The namespace that logically groups and isolates memories, such as a user ID. - Required. - :vartype scope: str - :ivar items: Items for which to search for relevant memories. - :vartype items: list[dict[str, Any]] - :ivar previous_search_id: The unique ID of the previous search request, enabling incremental - memory search from where the last operation left off. - :vartype previous_search_id: str - :ivar options: Memory search options. - :vartype options: "MemorySearchOptions" - """ - - scope: Required[str] - """The namespace that logically groups and isolates memories, such as a user ID. Required.""" - items: list[dict[str, Any]] - """Items for which to search for relevant memories.""" - previous_search_id: str - """The unique ID of the previous search request, enabling incremental memory search from where the - last operation left off.""" - options: "MemorySearchOptions" - """Memory search options.""" - - -class UpdateMemoriesRequest(TypedDict, total=False): - """UpdateMemoriesRequest. - - :ivar scope: The namespace that logically groups and isolates memories, such as a user ID. - Required. - :vartype scope: str - :ivar items_property: Conversation items to be stored in memory. - :vartype items_property: list[dict[str, Any]] - :ivar previous_update_id: The unique ID of the previous update request, enabling incremental - memory updates from where the last operation left off. - :vartype previous_update_id: str - :ivar update_delay: Timeout period before processing the memory update in seconds. If a new - update request is received during this period, it will cancel the current request and reset the - timeout. Set to 0 to immediately trigger the update without delay. Defaults to 300 (5 minutes). - :vartype update_delay: int - """ - - scope: Required[str] - """The namespace that logically groups and isolates memories, such as a user ID. Required.""" - items: list[dict[str, Any]] - """Conversation items to be stored in memory.""" - previous_update_id: str - """The unique ID of the previous update request, enabling incremental memory updates from where - the last operation left off.""" - update_delay: int - """Timeout period before processing the memory update in seconds. If a new update request is - received during this period, it will cancel the current request and reset the timeout. Set to 0 - to immediately trigger the update without delay. Defaults to 300 (5 minutes).""" - - -class DeleteScopeRequest(TypedDict, total=False): - """DeleteScopeRequest. - - :ivar scope: The namespace that logically groups and isolates memories to delete, such as a - user ID. Required. - :vartype scope: str - """ - - scope: Required[str] - """The namespace that logically groups and isolates memories to delete, such as a user ID. - Required.""" - - -class CreateMemoryRequest(TypedDict, total=False): - """CreateMemoryRequest. - - :ivar scope: The namespace that logically groups and isolates memories, such as a user ID. - Required. - :vartype scope: str - :ivar content: The content of the memory. Required. - :vartype content: str - :ivar kind: The kind of the memory item. Required. Known values are: "user_profile", - "chat_summary", and "procedural". - :vartype kind: Union[str, "MemoryItemKind"] - """ - - scope: Required[str] - """The namespace that logically groups and isolates memories, such as a user ID. Required.""" - content: Required[str] - """The content of the memory. Required.""" - kind: Required[Union[str, "MemoryItemKind"]] - """The kind of the memory item. Required. Known values are: \"user_profile\", \"chat_summary\", - and \"procedural\".""" - - -class UpdateMemoryRequest(TypedDict, total=False): - """UpdateMemoryRequest. - - :ivar content: The updated content of the memory. Required. - :vartype content: str - """ - - content: Required[str] - """The updated content of the memory. Required.""" - - -class ListMemoriesRequest(TypedDict, total=False): - """ListMemoriesRequest. - - :ivar scope: The namespace that logically groups and isolates memories, such as a user ID. - Required. - :vartype scope: str - """ - - scope: Required[str] - """The namespace that logically groups and isolates memories, such as a user ID. Required.""" - - -class CreateOrUpdateRoutineRequest(TypedDict, total=False): - """CreateOrUpdateRoutineRequest. - - :ivar description: A human-readable description of the routine. - :vartype description: str - :ivar enabled: Whether the routine is enabled. - :vartype enabled: bool - :ivar triggers: The triggers configured for the routine. In v1, exactly one trigger entry is - supported. - :vartype triggers: dict[str, "RoutineTrigger"] - :ivar action: The action executed when the routine fires. - :vartype action: "RoutineAction" - """ - - description: str - """A human-readable description of the routine.""" - enabled: bool - """Whether the routine is enabled.""" - triggers: dict[str, "RoutineTrigger"] - """The triggers configured for the routine. In v1, exactly one trigger entry is supported.""" - action: "RoutineAction" - """The action executed when the routine fires.""" - - -class DispatchRoutineAsyncRequest(TypedDict, total=False): - """DispatchRoutineAsyncRequest. - - :ivar payload: A direct action-input override sent downstream when testing a routine. - :vartype payload: "RoutineDispatchPayload" - """ - - payload: "RoutineDispatchPayload" - """A direct action-input override sent downstream when testing a routine.""" - - -class UpdateSkillRequest(TypedDict, total=False): - """UpdateSkillRequest. - - :ivar default_version: The version identifier that the skill should point to. When set, the - skill's default version will resolve to this version instead of the latest. Required. - :vartype default_version: str - """ - - default_version: Required[str] - """The version identifier that the skill should point to. When set, the skill's default version - will resolve to this version instead of the latest. Required.""" - - -class CreateSkillVersionRequest(TypedDict, total=False): - """CreateSkillVersionRequest. - - :ivar inline_content: Inline skill content for simple skills without file uploads. - Foundry-specific extension. - :vartype inline_content: "SkillInlineContent" - :ivar default: Whether to set this version as the default. - :vartype default: bool - """ - - inline_content: "SkillInlineContent" - """Inline skill content for simple skills without file uploads. Foundry-specific extension.""" - default: bool - """Whether to set this version as the default.""" - - -class CreateAgentVersionRequest(TypedDict, total=False): - """CreateAgentVersionRequest. - - :ivar metadata: Set of 16 key-value pairs that can be attached to an object. This can be - useful for storing additional information about the object in a structured - format, and querying for objects via API or the dashboard. - - Keys are strings with a maximum length of 64 characters. Values are strings - with a maximum length of 512 characters. - :vartype metadata: dict[str, str] - :ivar description: A human-readable description of the agent. - :vartype description: str - :ivar definition: The agent definition. This can be a workflow, hosted agent, or a simple agent - definition. Required. - :vartype definition: "AgentDefinition" - :ivar blueprint_reference: The blueprint reference for the agent. - :vartype blueprint_reference: "AgentBlueprintReference" - :ivar draft: (Preview) Whether this agent version is a draft (candidate) rather than a release. - The service defaults to ``false`` if a value is not specified by the caller. Draft versions are - recorded but excluded from default 'latest' resolution and are not auto-promoted. - :vartype draft: bool - """ - - metadata: dict[str, str] - """Set of 16 key-value pairs that can be attached to an object. This can be - useful for storing additional information about the object in a structured - format, and querying for objects via API or the dashboard. - - Keys are strings with a maximum length of 64 characters. Values are strings - with a maximum length of 512 characters.""" - description: str - """A human-readable description of the agent.""" - definition: Required["AgentDefinition"] - """The agent definition. This can be a workflow, hosted agent, or a simple agent definition. - Required.""" - blueprint_reference: "AgentBlueprintReference" - """The blueprint reference for the agent.""" - draft: bool - """(Preview) Whether this agent version is a draft (candidate) rather than a release. The service - defaults to ``false`` if a value is not specified by the caller. Draft versions are recorded - but excluded from default 'latest' resolution and are not auto-promoted.""" - - -class CreateAgentVersionFromManifestRequest(TypedDict, total=False): - """CreateAgentVersionFromManifestRequest. - - :ivar metadata: Set of 16 key-value pairs that can be attached to an object. This can be - useful for storing additional information about the object in a structured - format, and querying for objects via API or the dashboard. - - Keys are strings with a maximum length of 64 characters. Values are strings - with a maximum length of 512 characters. - :vartype metadata: dict[str, str] - :ivar description: A human-readable description of the agent. - :vartype description: str - :ivar manifest_id: The manifest ID to import the agent version from. Required. - :vartype manifest_id: str - :ivar parameter_values: The inputs to the manifest that will result in a fully materialized - Agent. Required. - :vartype parameter_values: dict[str, Any] - """ - - metadata: dict[str, str] - """Set of 16 key-value pairs that can be attached to an object. This can be - useful for storing additional information about the object in a structured - format, and querying for objects via API or the dashboard. - - Keys are strings with a maximum length of 64 characters. Values are strings - with a maximum length of 512 characters.""" - description: str - """A human-readable description of the agent.""" - manifest_id: Required[str] - """The manifest ID to import the agent version from. Required.""" - parameter_values: Required[dict[str, Any]] - """The inputs to the manifest that will result in a fully materialized Agent. Required.""" - - -class PatchAgentObjectRequest(TypedDict, total=False): - """PatchAgentObjectRequest. - - :ivar agent_endpoint: The endpoint configuration for the agent. - :vartype agent_endpoint: "AgentEndpointConfig" - :ivar agent_card: Optional agent card for the agent. - :vartype agent_card: "AgentCard" - """ - - agent_endpoint: "AgentEndpointConfig" - """The endpoint configuration for the agent.""" - agent_card: "AgentCard" - """Optional agent card for the agent.""" - - -class CreateSessionRequest(TypedDict, total=False): - """CreateSessionRequest. - - :ivar agent_session_id: Optional caller-provided session ID. If specified, it must be unique - within the agent endpoint. Auto-generated if omitted. - :vartype agent_session_id: str - :ivar version_indicator: Determines which agent version backs the session. Required. - :vartype version_indicator: "VersionIndicator" - """ - - agent_session_id: str - """Optional caller-provided session ID. If specified, it must be unique within the agent endpoint. - Auto-generated if omitted.""" - version_indicator: Required["VersionIndicator"] - """Determines which agent version backs the session. Required.""" - - -class CreateToolboxVersionRequest(TypedDict, total=False): - """CreateToolboxVersionRequest. - - :ivar description: A human-readable description of the toolbox. - :vartype description: str - :ivar metadata: Arbitrary key-value metadata to associate with the toolbox. - :vartype metadata: dict[str, str] - :ivar tools: The list of tools to include in this version. Required. - :vartype tools: list["ToolboxTool"] - :ivar skills: The list of skill sources to include in this version. A skill reference specifies - a skill name and optionally a version. If version is omitted, the skill's default version is - used. - :vartype skills: list["ToolboxSkill"] - :ivar policies: Policy configuration for this toolbox version. - :vartype policies: "ToolboxPolicies" - """ - - description: str - """A human-readable description of the toolbox.""" - metadata: dict[str, str] - """Arbitrary key-value metadata to associate with the toolbox.""" - tools: Required[list["ToolboxTool"]] - """The list of tools to include in this version. Required.""" - skills: list["ToolboxSkill"] - """The list of skill sources to include in this version. A skill reference specifies a skill name - and optionally a version. If version is omitted, the skill's default version is used.""" - policies: "ToolboxPolicies" - """Policy configuration for this toolbox version.""" - - -class UpdateToolboxRequest1(TypedDict, total=False): - """UpdateToolboxRequest1. - - :ivar default_version: The version identifier that the toolbox should point to. When set, the - toolbox's default version will resolve to this version instead of the latest. Required. - :vartype default_version: str - """ - - default_version: Required[str] - """The version identifier that the toolbox should point to. When set, the toolbox's default - version will resolve to this version instead of the latest. Required.""" - - -Tool = Union[ - A2APreviewTool, - ApplyPatchToolParam, - AzureAISearchTool, - AzureFunctionTool, - BingCustomSearchPreviewTool, - BingGroundingTool, - BrowserAutomationPreviewTool, - CaptureStructuredOutputsTool, - CodeInterpreterTool, - ComputerTool, - ComputerUsePreviewTool, - CustomToolParam, - MicrosoftFabricPreviewTool, - FabricIQPreviewTool, - FileSearchTool, - FunctionTool, - ImageGenTool, - LocalShellToolParam, - MCPTool, - MemorySearchPreviewTool, - NamespaceToolParam, - OpenApiTool, - SharepointPreviewTool, - FunctionShellToolParam, - ToolSearchToolParam, - WebSearchTool, - WebSearchPreviewTool, - WorkIQPreviewTool, -] -ToolboxTool = Union[ - A2APreviewToolboxTool, - AzureAISearchToolboxTool, - BrowserAutomationPreviewToolboxTool, - CodeInterpreterToolboxTool, - FabricIQPreviewToolboxTool, - FileSearchToolboxTool, - MCPToolboxTool, - OpenApiToolboxTool, - ReminderPreviewToolboxTool, - ToolboxSearchPreviewToolboxTool, - WebSearchToolboxTool, - WorkIQPreviewToolboxTool, -] -AgentBlueprintReference = Union[ManagedAgentIdentityBlueprintReference] -InsightRequest = Union[ - AgentClusterInsightRequest, EvaluationComparisonInsightRequest, EvaluationRunClusterInsightRequest -] -InsightResult = Union[AgentClusterInsightResult, EvaluationComparisonInsightResult, EvaluationRunClusterInsightResult] -DataGenerationJobSource = Union[ - AgentDataGenerationJobSource, - FileDataGenerationJobSource, - PromptDataGenerationJobSource, - TracesDataGenerationJobSource, -] -AgentDefinition = Union[ExternalAgentDefinition, HostedAgentDefinition, PromptAgentDefinition, WorkflowAgentDefinition] -AgentEndpointAuthorizationScheme = Union[ - BotServiceAuthorizationScheme, - BotServiceRbacAuthorizationScheme, - BotServiceTenantAuthorizationScheme, - EntraAuthorizationScheme, -] -EvaluatorGenerationJobSource = Union[ - AgentEvaluatorGenerationJobSource, - DatasetEvaluatorGenerationJobSource, - PromptEvaluatorGenerationJobSource, - TracesEvaluatorGenerationJobSource, -] -EvaluationTaxonomyInput = Union[AgentTaxonomyInput] -EvaluationTarget = Union[AzureAIAgentTarget, AzureAIModelTarget] -Index = Union[AzureAISearchIndex, CosmosDBIndex, ManagedAzureAISearchIndex] -RedTeamTargetConfig = Union[AzureOpenAIModelConfiguration] -EvaluatorDefinition = Union[ - CodeBasedEvaluatorDefinition, - EndpointBasedEvaluatorDefinition, - PromptBasedEvaluatorDefinition, - RubricBasedEvaluatorDefinition, -] -FunctionShellToolParamEnvironment = Union[ - ContainerAutoParam, - FunctionShellToolParamEnvironmentContainerReferenceParam, - FunctionShellToolParamEnvironmentLocalEnvironmentParam, -] -ContainerNetworkPolicyParam = Union[ContainerNetworkPolicyAllowlistParam, ContainerNetworkPolicyDisabledParam] -ContainerSkill = Union[InlineSkillParam, SkillReferenceParam] -EvaluationRuleAction = Union[ContinuousEvaluationRuleAction, HumanEvaluationPreviewRuleAction] -Trigger = Union[CronTrigger, OneTimeTrigger, RecurrenceTrigger] -CustomToolParamFormat = Union[CustomGrammarFormatParam, CustomTextFormatParam] -RoutineTrigger = Union[CustomRoutineTrigger, GitHubIssueRoutineTrigger, ScheduleRoutineTrigger, TimerRoutineTrigger] -RecurrenceSchedule = Union[ - DailyRecurrenceSchedule, HourlyRecurrenceSchedule, MonthlyRecurrenceSchedule, WeeklyRecurrenceSchedule -] -DataGenerationJobOptions = Union[ - SimpleQnADataGenerationJobOptions, ToolUseFineTuningDataGenerationJobOptions, TracesDataGenerationJobOptions -] -DataGenerationJobOutput = Union[DatasetDataGenerationJobOutput, FileDataGenerationJobOutput] -DatasetVersion = Union[FileDatasetVersion, FolderDatasetVersion] -InsightSample = Union[EvaluationResultSample] -ScheduleTask = Union[EvaluationScheduleTask, InsightScheduleTask] -VersionSelectionRule = Union[FixedRatioVersionSelectionRule] -TelemetryEndpointAuth = Union[HeaderTelemetryEndpointAuth] -RoutineDispatchPayload = Union[InvokeAgentInvocationsApiDispatchPayload, InvokeAgentResponsesApiDispatchPayload] -RoutineAction = Union[InvokeAgentInvocationsApiRoutineAction, InvokeAgentResponsesApiRoutineAction] -MemoryStoreDefinition = Union[MemoryStoreDefaultDefinition] -OpenApiAuthDetails = Union[OpenApiAnonymousAuthDetails, OpenApiManagedAuthDetails, OpenApiProjectConnectionAuthDetails] -OptimizationDatasetInput = Union[OptimizationInlineDatasetInput, OptimizationReferenceDatasetInput] -TelemetryEndpoint = Union[OtlpTelemetryEndpoint] -ToolChoiceParam = Union[ - ToolChoiceAllowed, - SpecificApplyPatchParam, - ToolChoiceCodeInterpreter, - ToolChoiceComputer, - ToolChoiceComputerUse, - ToolChoiceComputerUsePreview, - ToolChoiceCustom, - ToolChoiceFileSearch, - ToolChoiceFunction, - ToolChoiceImageGeneration, - ToolChoiceMCP, - SpecificFunctionShellParam, - ToolChoiceWebSearchPreview, - ToolChoiceWebSearchPreview20250311, -] -TextResponseFormat = Union[TextResponseFormatJsonObject, TextResponseFormatJsonSchema, TextResponseFormatText] -ToolboxSkill = Union[ToolboxSkillReference] -VersionIndicator = Union[VersionRefIndicator] diff --git a/sdk/ai/azure-ai-projects/samples/agents/optimization/sample_optimization_job_basic.py b/sdk/ai/azure-ai-projects/samples/agents/optimization/sample_optimization_job_basic.py index 81de414621c6..4e914f36cfb8 100644 --- a/sdk/ai/azure-ai-projects/samples/agents/optimization/sample_optimization_job_basic.py +++ b/sdk/ai/azure-ai-projects/samples/agents/optimization/sample_optimization_job_basic.py @@ -18,7 +18,7 @@ Before running the sample: - pip install "azure-ai-projects>=2.3.0" azure-identity python-dotenv + pip install "azure-ai-projects>=2.4.0" azure-identity python-dotenv Set these environment variables with your own values: 1) FOUNDRY_PROJECT_ENDPOINT - Required. The Azure AI Project endpoint, as found @@ -33,7 +33,6 @@ """ import os -import time from dotenv import load_dotenv @@ -42,7 +41,6 @@ from azure.ai.projects.models import ( OptimizationAgentIdentifier as AgentIdentifier, OptimizationEvaluatorRef as EvaluatorRef, - JobStatus, OptimizationJob, OptimizationJobInputs, OptimizationOptions, @@ -60,8 +58,6 @@ eval_model = os.environ.get("EVAL_MODEL", "gpt-4o") optimization_model = os.environ.get("OPTIMIZATION_MODEL", "gpt-5.1") -TERMINAL_STATUSES = {JobStatus.SUCCEEDED, JobStatus.FAILED, JobStatus.CANCELLED} - with ( DefaultAzureCredential() as credential, AIProjectClient(endpoint=endpoint, credential=credential) as project_client, @@ -71,7 +67,7 @@ # 1. Create an optimization job. # ------------------------------------------------------------------ print("Creating optimization job...") - job = project_client.beta.agents.create_optimization_job( + result = project_client.beta.agents.begin_create_optimization_job( job=OptimizationJob( inputs=OptimizationJobInputs( agent=AgentIdentifier(agent_name=agent_name), @@ -86,42 +82,22 @@ optimization_model=optimization_model, ), ) - ) - ) - print(f"Created job: id={job.id}, status={job.status}") + ), + polling_interval=poll_interval, + ).result() + print("Optimization job completed.") # ------------------------------------------------------------------ - # 2. Poll until the job reaches a terminal state. + # 2. Inspect the results. # ------------------------------------------------------------------ - print(f"Polling job `{job.id}` to completion...", end="", flush=True) - while job.status not in TERMINAL_STATUSES: - time.sleep(poll_interval) - job = project_client.beta.agents.get_optimization_job(job_id=job.id) - print(".", end="", flush=True) - print() - print(f"Final status: {job.status}") - - if job.warnings: - for warning in job.warnings: - print(f"[WARNING] {warning}") - - if job.status == JobStatus.FAILED: - message = job.error.message if job.error else "" - raise RuntimeError(f"Optimization job `{job.id}` failed: {message}") - - # ------------------------------------------------------------------ - # 3. Inspect the results. - # ------------------------------------------------------------------ - if job.status == JobStatus.SUCCEEDED and job.result: - result = job.result - print(f"\nBaseline candidate: {result.baseline}") - print(f"Best candidate: {result.best}") - print(f"Candidates ({len(result.candidates or [])}):") - for candidate in result.candidates or []: - print( - f" - {candidate.name}" - f" | avg_score={candidate.avg_score:.4f}" - f" | avg_tokens={candidate.avg_tokens:.0f}" - ) - if candidate.eval_id: - print(f" eval_id={candidate.eval_id}") + print(f"\nBaseline candidate: {result.baseline}") + print(f"Best candidate: {result.best}") + print(f"Candidates ({len(result.candidates or [])}):") + for candidate in result.candidates or []: + print( + f" - {candidate.name}" + f" | avg_score={candidate.avg_score:.4f}" + f" | avg_tokens={candidate.avg_tokens:.0f}" + ) + if candidate.eval_id: + print(f" eval_id={candidate.eval_id}") diff --git a/sdk/ai/azure-ai-projects/samples/agents/optimization/sample_optimization_job_basic_async.py b/sdk/ai/azure-ai-projects/samples/agents/optimization/sample_optimization_job_basic_async.py index 90137d28696c..4be9f2ee07c5 100644 --- a/sdk/ai/azure-ai-projects/samples/agents/optimization/sample_optimization_job_basic_async.py +++ b/sdk/ai/azure-ai-projects/samples/agents/optimization/sample_optimization_job_basic_async.py @@ -15,7 +15,7 @@ Before running the sample: - pip install "azure-ai-projects>=2.3.0" azure-identity python-dotenv + pip install "azure-ai-projects>=2.4.0" azure-identity python-dotenv Set these environment variables with your own values: 1) FOUNDRY_PROJECT_ENDPOINT - Required. The Azure AI Project endpoint, as found @@ -39,7 +39,6 @@ from azure.ai.projects.models import ( OptimizationAgentIdentifier as AgentIdentifier, OptimizationEvaluatorRef as EvaluatorRef, - JobStatus, OptimizationJob, OptimizationJobInputs, OptimizationOptions, @@ -57,8 +56,6 @@ optimization_model = os.environ.get("OPTIMIZATION_MODEL", "gpt-5.1") poll_interval = int(os.environ.get("POLL_INTERVAL_SECONDS", "10")) -TERMINAL_STATUSES = {JobStatus.SUCCEEDED, JobStatus.FAILED, JobStatus.CANCELLED} - async def main() -> None: async with ( @@ -70,7 +67,7 @@ async def main() -> None: # 1. Create an optimization job. # ------------------------------------------------------------------ print("Creating optimization job...") - job = await project_client.beta.agents.create_optimization_job( + poller = await project_client.beta.agents.begin_create_optimization_job( job=OptimizationJob( inputs=OptimizationJobInputs( agent=AgentIdentifier(agent_name=agent_name), @@ -85,45 +82,26 @@ async def main() -> None: optimization_model=optimization_model, ), ) - ) + ), + polling_interval=poll_interval, ) - print(f"Created job: id={job.id}, status={job.status}") + result = await poller.result() + print("Optimization job completed.") # ------------------------------------------------------------------ - # 2. Poll until terminal state. - # ------------------------------------------------------------------ - print(f"Polling job `{job.id}` to completion...", end="", flush=True) - while job.status not in TERMINAL_STATUSES: - await asyncio.sleep(poll_interval) - job = await project_client.beta.agents.get_optimization_job(job_id=job.id) - print(".", end="", flush=True) - print() - print(f"Final status: {job.status}") - - if job.warnings: - for warning in job.warnings: - print(f"[WARNING] {warning}") - - if job.status == JobStatus.FAILED: - message = job.error.message if job.error else "" - raise RuntimeError(f"Optimization job `{job.id}` failed: {message}") - + # 2. Inspect the results. # ------------------------------------------------------------------ - # 3. Inspect the results. - # ------------------------------------------------------------------ - if job.status == JobStatus.SUCCEEDED and job.result: - result = job.result - print(f"\nBaseline candidate: {result.baseline}") - print(f"Best candidate: {result.best}") - print(f"Candidates ({len(result.candidates or [])}):") - for candidate in result.candidates or []: - print( - f" - {candidate.name}" - f" | avg_score={candidate.avg_score:.4f}" - f" | avg_tokens={candidate.avg_tokens:.0f}" - ) - if candidate.eval_id: - print(f" eval_id={candidate.eval_id}") + print(f"\nBaseline candidate: {result.baseline}") + print(f"Best candidate: {result.best}") + print(f"Candidates ({len(result.candidates or [])}):") + for candidate in result.candidates or []: + print( + f" - {candidate.name}" + f" | avg_score={candidate.avg_score:.4f}" + f" | avg_tokens={candidate.avg_tokens:.0f}" + ) + if candidate.eval_id: + print(f" eval_id={candidate.eval_id}") if __name__ == "__main__": diff --git a/sdk/ai/azure-ai-projects/samples/agents/optimization/sample_optimization_job_basic_polling.py b/sdk/ai/azure-ai-projects/samples/agents/optimization/sample_optimization_job_basic_polling.py new file mode 100644 index 000000000000..8867a928a1ea --- /dev/null +++ b/sdk/ai/azure-ai-projects/samples/agents/optimization/sample_optimization_job_basic_polling.py @@ -0,0 +1,138 @@ +# pylint: disable=line-too-long,useless-suppression +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ + +""" +DESCRIPTION: + Given an AIProjectClient, this sample demonstrates how to create an agent + optimization job and manually poll it to completion. + + Agent optimization automatically improves an agent's system prompt, model + choice, or tool definitions by running candidate variants against your + training dataset and scoring them with the evaluators you specify. + +USAGE: + python sample_optimization_job_basic_polling.py + + Before running the sample: + + pip install "azure-ai-projects>=2.4.0" azure-identity python-dotenv + + Set these environment variables with your own values: + 1) FOUNDRY_PROJECT_ENDPOINT - Required. The Azure AI Project endpoint, as found + in the overview page of your Microsoft Foundry portal. + 2) FOUNDRY_AGENT_NAME - Required. The name of the agent to optimize. + 3) DATASET_NAME - Required. The name of the registered training dataset. + 4) EVALUATOR_NAME - Required. The name of a registered project evaluator. + 5) DATASET_VERSION - Optional. Version of the training dataset. Defaults to "1". + 6) POLL_INTERVAL_SECONDS - Optional. Seconds between status polls. Defaults to 10. + 7) EVAL_MODEL - Optional. The model used for evaluation. Defaults to "gpt-4o". + 8) OPTIMIZATION_MODEL - Optional. The model used for optimization. Defaults to "gpt-5.1". +""" + +import os +import time + +from dotenv import load_dotenv + +from azure.identity import DefaultAzureCredential +from azure.ai.projects import AIProjectClient +from azure.ai.projects.models import ( + OptimizationAgentIdentifier as AgentIdentifier, + OptimizationEvaluatorRef as EvaluatorRef, + JobStatus, + OptimizationJob, + OptimizationJobInputs, + OptimizationOptions, + OptimizationReferenceDatasetInput as ReferenceDatasetInput, +) + +load_dotenv() + +endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"] +agent_name = os.environ["FOUNDRY_AGENT_NAME"] +dataset_name = os.environ["DATASET_NAME"] +evaluator_name = os.environ["EVALUATOR_NAME"] +dataset_version = os.environ.get("DATASET_VERSION", "1") +poll_interval = int(os.environ.get("POLL_INTERVAL_SECONDS", "10")) +eval_model = os.environ.get("EVAL_MODEL", "gpt-4o") +optimization_model = os.environ.get("OPTIMIZATION_MODEL", "gpt-5.1") + +terminal_statuses = {JobStatus.SUCCEEDED, JobStatus.FAILED, JobStatus.CANCELLED} + +with ( + DefaultAzureCredential() as credential, + AIProjectClient(endpoint=endpoint, credential=credential) as project_client, +): + + # ------------------------------------------------------------------ + # 1. Create an optimization job without SDK polling. + # ------------------------------------------------------------------ + print("Creating optimization job...") + created_jobs: list[OptimizationJob] = [] + + def capture_created_job(response): + created_jobs.append(OptimizationJob(response.http_response.json())) + + project_client.beta.agents.begin_create_optimization_job( + job=OptimizationJob( + inputs=OptimizationJobInputs( + agent=AgentIdentifier(agent_name=agent_name), + train_dataset=ReferenceDatasetInput( + name=dataset_name, + version=dataset_version, + ), + evaluators=[EvaluatorRef(name=evaluator_name)], + options=OptimizationOptions( + max_candidates=3, + eval_model=eval_model, + optimization_model=optimization_model, + ), + ) + ), + polling=False, + raw_response_hook=capture_created_job, + ) + if not created_jobs: + raise RuntimeError("The create operation did not return an optimization job.") + job = created_jobs[0] + print(f"Created job: id={job.id}, status={job.status}") + + # ------------------------------------------------------------------ + # 2. Poll the job to completion. + # ------------------------------------------------------------------ + while job.status not in terminal_statuses: + time.sleep(poll_interval) + job = project_client.beta.agents.get_optimization_job(job_id=job.id) + print(f"Job status: {job.status}") + + if job.warnings: + for warning in job.warnings: + print(f"[WARNING] {warning}") + + if job.status == JobStatus.FAILED: + message = job.error.message if job.error else "" + raise RuntimeError(f"Optimization job `{job.id}` failed: {message}") + if job.status == JobStatus.CANCELLED: + raise RuntimeError(f"Optimization job `{job.id}` was cancelled.") + + # ------------------------------------------------------------------ + # 3. Inspect the results. + # ------------------------------------------------------------------ + if job.result is None: + raise RuntimeError(f"Optimization job `{job.id}` completed without a result.") + + result = job.result + print(f"\nBaseline candidate: {result.baseline}") + print(f"Best candidate: {result.best}") + print(f"Candidates ({len(result.candidates or [])}):") + for candidate in result.candidates or []: + print( + f" - {candidate.name}" + f" | avg_score={candidate.avg_score:.4f}" + f" | avg_tokens={candidate.avg_tokens:.0f}" + ) + if candidate.eval_id: + print(f" eval_id={candidate.eval_id}") \ No newline at end of file diff --git a/sdk/ai/azure-ai-projects/samples/agents/optimization/sample_optimization_job_basic_polling_async.py b/sdk/ai/azure-ai-projects/samples/agents/optimization/sample_optimization_job_basic_polling_async.py new file mode 100644 index 000000000000..10f7f6dff7c1 --- /dev/null +++ b/sdk/ai/azure-ai-projects/samples/agents/optimization/sample_optimization_job_basic_polling_async.py @@ -0,0 +1,149 @@ +# pylint: disable=line-too-long,useless-suppression +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ + +""" +DESCRIPTION: + Given an async AIProjectClient, this sample demonstrates how to create an + agent optimization job and manually poll it to completion. + + Agent optimization automatically improves an agent's system prompt, model + choice, or tool definitions by running candidate variants against your + training dataset and scoring them with the evaluators you specify. + +USAGE: + python sample_optimization_job_basic_polling_async.py + + Before running the sample: + + pip install "azure-ai-projects>=2.4.0" azure-identity python-dotenv + + Set these environment variables with your own values: + 1) FOUNDRY_PROJECT_ENDPOINT - Required. The Azure AI Project endpoint, as found + in the overview page of your Microsoft Foundry portal. + 2) FOUNDRY_AGENT_NAME - Required. The name of the agent to optimize. + 3) DATASET_NAME - Required. The name of the registered training dataset. + 4) EVALUATOR_NAME - Required. The name of a registered project evaluator. + 5) DATASET_VERSION - Optional. Version of the training dataset. Defaults to "1". + 6) POLL_INTERVAL_SECONDS - Optional. Seconds between status polls. Defaults to 10. + 7) EVAL_MODEL - Optional. The model used for evaluation. Defaults to "gpt-4o". + 8) OPTIMIZATION_MODEL - Optional. The model used for optimization. Defaults to "gpt-5.1". +""" + +import asyncio +import json +import os + +from dotenv import load_dotenv + +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.identity.aio import DefaultAzureCredential +from azure.ai.projects.aio import AIProjectClient +from azure.ai.projects.models import ( + OptimizationAgentIdentifier as AgentIdentifier, + OptimizationEvaluatorRef as EvaluatorRef, + JobStatus, + OptimizationJob, + OptimizationJobInputs, + OptimizationOptions, + OptimizationReferenceDatasetInput as ReferenceDatasetInput, +) + +load_dotenv() + +endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"] +agent_name = os.environ["FOUNDRY_AGENT_NAME"] +dataset_name = os.environ["DATASET_NAME"] +evaluator_name = os.environ["EVALUATOR_NAME"] +dataset_version = os.environ.get("DATASET_VERSION", "1") +poll_interval = int(os.environ.get("POLL_INTERVAL_SECONDS", "10")) +eval_model = os.environ.get("EVAL_MODEL", "gpt-4o") +optimization_model = os.environ.get("OPTIMIZATION_MODEL", "gpt-5.1") + +terminal_statuses = {JobStatus.SUCCEEDED, JobStatus.FAILED, JobStatus.CANCELLED} + + +async def main() -> None: + async with ( + DefaultAzureCredential() as credential, + AIProjectClient(endpoint=endpoint, credential=credential) as project_client, + ): + + # ------------------------------------------------------------------ + # 1. Create an optimization job without SDK polling. + # ------------------------------------------------------------------ + print("Creating optimization job...") + initial_responses: list[PipelineResponse[HttpRequest, AsyncHttpResponse]] = [] + + def capture_created_job_response( + response: PipelineResponse[HttpRequest, AsyncHttpResponse], + ) -> None: + initial_responses.append(response) + + await project_client.beta.agents.begin_create_optimization_job( + job=OptimizationJob( + inputs=OptimizationJobInputs( + agent=AgentIdentifier(agent_name=agent_name), + train_dataset=ReferenceDatasetInput( + name=dataset_name, + version=dataset_version, + ), + evaluators=[EvaluatorRef(name=evaluator_name)], + options=OptimizationOptions( + max_candidates=3, + eval_model=eval_model, + optimization_model=optimization_model, + ), + ) + ), + polling=False, + raw_response_hook=capture_created_job_response, + ) + if not initial_responses: + raise RuntimeError("The create operation did not return an optimization job.") + job = OptimizationJob(json.loads(initial_responses[0].http_response.text())) + print(f"Created job: id={job.id}, status={job.status}") + + # ------------------------------------------------------------------ + # 2. Poll the job to completion. + # ------------------------------------------------------------------ + while job.status not in terminal_statuses: + await asyncio.sleep(poll_interval) + job = await project_client.beta.agents.get_optimization_job(job_id=job.id) + print(f"Job status: {job.status}") + + if job.warnings: + for warning in job.warnings: + print(f"[WARNING] {warning}") + + if job.status == JobStatus.FAILED: + message = job.error.message if job.error else "" + raise RuntimeError(f"Optimization job `{job.id}` failed: {message}") + if job.status == JobStatus.CANCELLED: + raise RuntimeError(f"Optimization job `{job.id}` was cancelled.") + + # ------------------------------------------------------------------ + # 3. Inspect the results. + # ------------------------------------------------------------------ + if job.result is None: + raise RuntimeError(f"Optimization job `{job.id}` completed without a result.") + + result = job.result + print(f"\nBaseline candidate: {result.baseline}") + print(f"Best candidate: {result.best}") + print(f"Candidates ({len(result.candidates or [])}):") + for candidate in result.candidates or []: + print( + f" - {candidate.name}" + f" | avg_score={candidate.avg_score:.4f}" + f" | avg_tokens={candidate.avg_tokens:.0f}" + ) + if candidate.eval_id: + print(f" eval_id={candidate.eval_id}") + + +if __name__ == "__main__": + asyncio.run(main()) \ No newline at end of file diff --git a/sdk/ai/azure-ai-projects/samples/agents/optimization/sample_optimization_job_cancel.py b/sdk/ai/azure-ai-projects/samples/agents/optimization/sample_optimization_job_cancel.py index ade59c30249f..0a80c5bc41fd 100644 --- a/sdk/ai/azure-ai-projects/samples/agents/optimization/sample_optimization_job_cancel.py +++ b/sdk/ai/azure-ai-projects/samples/agents/optimization/sample_optimization_job_cancel.py @@ -14,7 +14,7 @@ Before running the sample: - pip install "azure-ai-projects>=2.3.0" azure-identity python-dotenv + pip install "azure-ai-projects>=2.4.0" azure-identity python-dotenv Set these environment variables with your own values: 1) FOUNDRY_PROJECT_ENDPOINT - Required. The Azure AI Project endpoint, as found @@ -63,7 +63,12 @@ # 1. Create a job. # ------------------------------------------------------------------ print("Creating optimization job...") - job = project_client.beta.agents.create_optimization_job( + created_jobs: list[OptimizationJob] = [] + + def capture_created_job(response): + created_jobs.append(OptimizationJob(response.http_response.json())) + + project_client.beta.agents.begin_create_optimization_job( job=OptimizationJob( inputs=OptimizationJobInputs( agent=AgentIdentifier(agent_name=agent_name), @@ -78,8 +83,13 @@ optimization_model=optimization_model, ), ) - ) + ), + polling=False, + raw_response_hook=capture_created_job, ) + if not created_jobs: + raise RuntimeError("The create operation did not return an optimization job.") + job = created_jobs[0] print(f"Created job: id={job.id}, status={job.status}") # ------------------------------------------------------------------ diff --git a/sdk/ai/azure-ai-projects/samples/agents/sample_agent_basic.py b/sdk/ai/azure-ai-projects/samples/agents/sample_agent_basic.py index 467b3f89aa56..ed5a094a4fb0 100644 --- a/sdk/ai/azure-ai-projects/samples/agents/sample_agent_basic.py +++ b/sdk/ai/azure-ai-projects/samples/agents/sample_agent_basic.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. diff --git a/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_for_finetuning.py b/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_for_finetuning.py index 8a545c3dd6b3..fc9c3f6bda46 100644 --- a/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_for_finetuning.py +++ b/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_for_finetuning.py @@ -61,7 +61,6 @@ DataGenerationModelOptions, FileDataGenerationJobOutput, FileDataGenerationJobSource, - JobStatus, SimpleQnADataGenerationJobOptions, SimpleQnAFineTuningQuestionType, ) @@ -111,8 +110,6 @@ - Standard support response: within one business day. Priority support response: within four hours. """ -TERMINAL_STATUSES = {JobStatus.SUCCEEDED, JobStatus.FAILED, JobStatus.CANCELLED} - with ( DefaultAzureCredential() as credential, AIProjectClient(endpoint=endpoint, credential=credential) as project_client, @@ -171,46 +168,35 @@ output_options=DataGenerationJobOutputOptions(name=output_name), ), ) - job = project_client.beta.datasets.create_generation_job(job=job) - print(f"Created data generation job `{job.id}` (status: `{job.status}`).") - - print(f"Poll job `{job.id}` until it reaches a terminal state.", end="", flush=True) - while True: - job = project_client.beta.datasets.get_generation_job(job_id=job.id) - if job.status in TERMINAL_STATUSES: - break - time.sleep(poll_interval_seconds) - print(".", end="", flush=True) - print() - print(f"Final job status: `{job.status}`.") - - if job.status != JobStatus.SUCCEEDED: - message = job.error.message if job.error is not None else "" - raise RuntimeError(f"Job `{job.id}` ended with status `{job.status}`: {message}") + print("Create a fine-tuning data generation job and wait for it to complete.") + job_result = project_client.beta.datasets.begin_create_generation_job( + job=job, + polling_interval=poll_interval_seconds, + ).result() # ------------------------------------------------------------------ # 3. Inspect the generated fine-tuning file outputs. # ------------------------------------------------------------------ # `train_split=0.8` produces two Azure OpenAI files: a training partition # and a validation partition. Both are emitted as FileDataGenerationJobOutput - # entries in `job.result.outputs`. + # entries in `job_result.outputs`. file_outputs = [ output - for output in ((job.result.outputs if job.result is not None else None) or []) + for output in (job_result.outputs or []) if isinstance(output, FileDataGenerationJobOutput) ] if not file_outputs: - raise RuntimeError(f"Job `{job.id}` did not produce any file outputs.") + raise RuntimeError("The data generation job did not produce any file outputs.") print(f"Generated {len(file_outputs)} fine-tuning file(s):") for output in file_outputs: if not output.id: - raise RuntimeError(f"Job `{job.id}` returned a file output without an id.") + raise RuntimeError("A file output was returned without an id.") # Resolve the Azure OpenAI file to surface its real filename and size. file_info = openai_client.files.retrieve(file_id=output.id) print(f" - filename=`{file_info.filename}` id=`{output.id}` bytes={file_info.bytes}") - if job.result is not None and job.result.generated_samples is not None: - print(f"Generated samples: {job.result.generated_samples}") + if job_result.generated_samples is not None: + print(f"Generated samples: {job_result.generated_samples}") # ------------------------------------------------------------------ # 4. Clean up. @@ -221,6 +207,3 @@ print(f"Delete the Azure OpenAI input file `{seed_file.id}`.") openai_client.files.delete(file_id=seed_file.id) - - print(f"Delete the data generation job `{job.id}`.") - project_client.beta.datasets.delete_generation_job(job_id=job.id) diff --git a/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_with_agent_source.py b/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_with_agent_source.py index 70063d32da26..3bf7fcad70ac 100644 --- a/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_with_agent_source.py +++ b/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_with_agent_source.py @@ -35,7 +35,7 @@ Before running the sample: - pip install "azure-ai-projects>=2.2.0" azure-identity python-dotenv + pip install "azure-ai-projects>=2.4.0" azure-identity python-dotenv Set these environment variables with your own values: 1) FOUNDRY_PROJECT_ENDPOINT - Required. The Azure AI Project endpoint, as found @@ -70,7 +70,6 @@ DataGenerationModelOptions, DatasetDataGenerationJobOutput, DatasetVersion, - JobStatus, PromptAgentDefinition, SimpleQnADataGenerationJobOptions, ) @@ -114,7 +113,6 @@ agent_name = f"widgets-gizmos-support-{run_id}" -TERMINAL_STATUSES = {JobStatus.SUCCEEDED, JobStatus.FAILED, JobStatus.CANCELLED} with ( DefaultAzureCredential() as credential, @@ -161,48 +159,36 @@ output_options=DataGenerationJobOutputOptions(name=output_dataset_name), ), ) - job = project_client.beta.datasets.create_generation_job(job=job) - print(f"Created data generation job `{job.id}` (status: `{job.status}`).") - - print(f"Poll job `{job.id}` until it reaches a terminal state.", end="", flush=True) - while True: - job = project_client.beta.datasets.get_generation_job(job_id=job.id) - if job.status in TERMINAL_STATUSES: - break - time.sleep(poll_interval_seconds) - print(".", end="", flush=True) - print() - print(f"Final job status: `{job.status}`.") - - if job.status != JobStatus.SUCCEEDED: - message = job.error.message if job.error is not None else "" - raise RuntimeError(f"Job `{job.id}` ended with status `{job.status}`: {message}") + print("Creating data generation job and waiting for completion (polling is handled by the SDK)...") + job_result = project_client.beta.datasets.begin_create_generation_job( + job=job, polling_interval=poll_interval_seconds, + ).result() # Locate the Dataset output produced by the job. output_name: str = "" output_version: str = "" - for output in (job.result.outputs if job.result is not None else None) or []: + for output in job_result.outputs or []: if isinstance(output, DatasetDataGenerationJobOutput): output_name = output.name or "" output_version = output.version or "" break if not output_name or not output_version: - raise RuntimeError(f"Job `{job.id}` did not produce a dataset output.") + raise RuntimeError("The data generation job did not produce a dataset output.") dataset: DatasetVersion = project_client.datasets.get(name=output_name, version=output_version) print(f"Generated dataset: name=`{dataset.name}` version=`{dataset.version}` id=`{dataset.id}`") - if job.result is not None and job.result.generated_samples is not None: - print(f"Generated samples: {job.result.generated_samples}") + if job_result.generated_samples is not None: + print(f"Generated samples: {job_result.generated_samples}") # ------------------------------------------------------------------ - # 3. Clean up the generated dataset and the data generation job + # 3. Clean up the generated dataset # (the agent is deleted in the `finally` block below). # ------------------------------------------------------------------ print(f"Delete the generated dataset `{dataset.name}` v{dataset.version}.") project_client.datasets.delete(name=dataset.name or "", version=dataset.version or "") - print(f"Delete the data generation job `{job.id}`.") - project_client.beta.datasets.delete_generation_job(job_id=job.id) + # Note: The data generation job is implicitly cleaned up by the service + # when the dataset is deleted (cascade delete). finally: # The agent is short-lived — always delete it, even if the job failed. print(f"Delete the prompt agent `{agent.name}` (version {agent.version}).") diff --git a/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_with_file_source.py b/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_with_file_source.py index f52d331e2603..c01d3d3bc5b2 100644 --- a/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_with_file_source.py +++ b/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_with_file_source.py @@ -31,7 +31,7 @@ Before running the sample: - pip install "azure-ai-projects>=2.2.0" azure-identity openai python-dotenv + pip install "azure-ai-projects>=2.4.0" azure-identity openai python-dotenv Set these environment variables with your own values: 1) FOUNDRY_PROJECT_ENDPOINT - Required. The Azure AI Project endpoint, as found @@ -66,7 +66,6 @@ DatasetDataGenerationJobOutput, DatasetVersion, FileDataGenerationJobSource, - JobStatus, PromptDataGenerationJobSource, SimpleQnADataGenerationJobOptions, ) @@ -119,8 +118,6 @@ EXPECTED_OUTPUT_DESCRIPTION = "Expert-level QnA pairs generated from the Widgets & Gizmos reference." EXPECTED_OUTPUT_TAGS = {"sample": "dataset-generation-simpleqna-with-file-source", "difficulty": "expert"} -TERMINAL_STATUSES = {JobStatus.SUCCEEDED, JobStatus.FAILED, JobStatus.CANCELLED} - with ( DefaultAzureCredential() as credential, AIProjectClient(endpoint=endpoint, credential=credential) as project_client, @@ -156,61 +153,48 @@ # - The File source contributes the source material (the reference # document uploaded above). # - The Prompt source contributes a steering instruction (difficulty). - print("Create a multi-source data generation job (File + Prompt).") - job = DataGenerationJob( - inputs=DataGenerationJobInputs( - name=f"simpleqna-multisource-{run_id}", - scenario=DataGenerationJobScenario.EVALUATION, - sources=[ - FileDataGenerationJobSource( - description="Widgets & Gizmos product / operations reference (Azure OpenAI file).", - id=seed_file.id, + print("Creating multi-source data generation job (File + Prompt) and waiting for completion (polling is handled by the SDK)...") + job_result = project_client.beta.datasets.begin_create_generation_job( + job=DataGenerationJob( + inputs=DataGenerationJobInputs( + name=f"simpleqna-multisource-{run_id}", + scenario=DataGenerationJobScenario.EVALUATION, + sources=[ + FileDataGenerationJobSource( + description="Widgets & Gizmos product / operations reference (Azure OpenAI file).", + id=seed_file.id, + ), + PromptDataGenerationJobSource( + description="Specifies the question difficulty for SimpleQnA generation.", + prompt="Generate expert-level questions of high difficulty.", + ), + ], + options=SimpleQnADataGenerationJobOptions( + # Service requires max_samples to be between 15 and 1000. + max_samples=15, + # `simple_qna` REQUIRES model_options. + model_options=DataGenerationModelOptions(model=model_name), ), - PromptDataGenerationJobSource( - description="Specifies the question difficulty for SimpleQnA generation.", - prompt="Generate expert-level questions of high difficulty.", + output_options=DataGenerationJobOutputOptions( + name=output_dataset_name, + description=EXPECTED_OUTPUT_DESCRIPTION, + tags=EXPECTED_OUTPUT_TAGS, ), - ], - options=SimpleQnADataGenerationJobOptions( - # Service requires max_samples to be between 15 and 1000. - max_samples=15, - # `simple_qna` REQUIRES model_options. - model_options=DataGenerationModelOptions(model=model_name), - ), - output_options=DataGenerationJobOutputOptions( - name=output_dataset_name, - description=EXPECTED_OUTPUT_DESCRIPTION, - tags=EXPECTED_OUTPUT_TAGS, ), ), - ) - job = project_client.beta.datasets.create_generation_job(job=job) - print(f"Created data generation job `{job.id}` (status: `{job.status}`).") - - print(f"Poll job `{job.id}` until it reaches a terminal state.", end="", flush=True) - while True: - job = project_client.beta.datasets.get_generation_job(job_id=job.id) - if job.status in TERMINAL_STATUSES: - break - time.sleep(poll_interval_seconds) - print(".", end="", flush=True) - print() - print(f"Final job status: `{job.status}`.") - - if job.status != JobStatus.SUCCEEDED: - message = job.error.message if job.error is not None else "" - raise RuntimeError(f"Job `{job.id}` ended with status `{job.status}`: {message}") + polling_interval=poll_interval_seconds, + ).result() # Locate the Dataset output produced by the job. output_name: str = "" output_version: str = "" - for output in (job.result.outputs if job.result is not None else None) or []: + for output in job_result.outputs or []: if isinstance(output, DatasetDataGenerationJobOutput): output_name = output.name or "" output_version = output.version or "" break if not output_name or not output_version: - raise RuntimeError(f"Job `{job.id}` did not produce a dataset output.") + raise RuntimeError("The data generation job did not produce a dataset output.") # ------------------------------------------------------------------ # 3. Inspect the generated dataset and show metadata propagation. @@ -222,8 +206,8 @@ print(f"Generated dataset: name=`{dataset.name}` version=`{dataset.version}` id=`{dataset.id}`") print(f" description: {dataset.description}") print(f" tags: {dataset.tags}") - if job.result is not None and job.result.generated_samples is not None: - print(f"Generated samples: {job.result.generated_samples}") + if job_result.generated_samples is not None: + print(f"Generated samples: {job_result.generated_samples}") # ------------------------------------------------------------------ # 4. Clean up. @@ -234,5 +218,5 @@ print(f"Delete the Azure OpenAI input file `{seed_file.id}`.") openai_client.files.delete(file_id=seed_file.id) - print(f"Delete the data generation job `{job.id}`.") - project_client.beta.datasets.delete_generation_job(job_id=job.id) + # Note: The data generation job is implicitly cleaned up by the service + # when the dataset is deleted (cascade delete). diff --git a/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_with_prompt_source.py b/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_with_prompt_source.py index 1f775d291c05..1df29c5ad048 100644 --- a/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_with_prompt_source.py +++ b/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_with_prompt_source.py @@ -11,20 +11,21 @@ 1. Creates a `DataGenerationJob` (scenario=EVALUATION, type=simple_qna) that synthesizes question/answer pairs from an inline prompt and writes them - to a new versioned Dataset. - 2. Polls the job to completion and resolves the resulting `DatasetVersion`. + to a new versioned Dataset. Uses `begin_create_generation_job` which returns + `LROPoller[DataGenerationJobResult]`; `.result()` polls automatically. + 2. Resolves the resulting `DatasetVersion` from the job result. 3. Creates an OpenAI evaluation (`client.evals.create`) with builtin Azure AI evaluators. 4. Runs the evaluation against the generated dataset by passing the dataset's id as the run's `file_id`. - 5. Cleans up the evaluation, the generated dataset, and the data generation job. + 5. Cleans up the evaluation and the generated dataset. USAGE: python sample_dataset_generation_job_simpleqna_with_prompt_source.py Before running the sample: - pip install "azure-ai-projects>=2.2.0" azure-identity python-dotenv + pip install "azure-ai-projects>=2.4.0" azure-identity python-dotenv Set these environment variables with your own values: 1) FOUNDRY_PROJECT_ENDPOINT - Required. The Azure AI Project endpoint, as found @@ -66,7 +67,6 @@ DataGenerationModelOptions, DatasetDataGenerationJobOutput, DatasetVersion, - JobStatus, PromptDataGenerationJobSource, SimpleQnADataGenerationJobOptions, TestingCriterionAzureAIEvaluator, @@ -79,9 +79,6 @@ dataset_name = os.environ.get("DATASET_NAME", "dataset-generation-eval-sample") poll_interval_seconds = int(os.environ.get("POLL_INTERVAL_SECONDS", "10")) -TERMINAL_STATUSES = {JobStatus.SUCCEEDED, JobStatus.FAILED, JobStatus.CANCELLED} - - def main() -> None: with ( DefaultAzureCredential() as credential, @@ -92,7 +89,6 @@ def main() -> None: # ------------------------------------------------------------------ # 1. Generate a QnA evaluation dataset from an inline prompt. # ------------------------------------------------------------------ - print("Create a data generation job.") job = DataGenerationJob( inputs=DataGenerationJobInputs( name="qna-from-policy-prompt", @@ -120,33 +116,21 @@ def main() -> None: ), ), ) - job = project_client.beta.datasets.create_generation_job(job=job) - print(f"Created data generation job `{job.id}` (status: `{job.status}`).") - - print(f"Poll job `{job.id}` until it reaches a terminal state.", end="", flush=True) - while True: - job = project_client.beta.datasets.get_generation_job(job_id=job.id) - if job.status in TERMINAL_STATUSES: - break - time.sleep(poll_interval_seconds) - print(".", end="", flush=True) - print() - print(f"Final job status: `{job.status}`.") - - if job.status != JobStatus.SUCCEEDED: - message = job.error.message if job.error is not None else "" - raise RuntimeError(f"Job `{job.id}` ended with status `{job.status}`: {message}") + print("Creating data generation job and waiting for completion (polling is handled by the SDK)...") + job_result = project_client.beta.datasets.begin_create_generation_job( + job=job, polling_interval=poll_interval_seconds, + ).result() # Locate the Dataset output produced by the job. output_name: str = "" output_version: str = "" - for output in (job.result.outputs if job.result is not None else None) or []: + for output in job_result.outputs or []: if isinstance(output, DatasetDataGenerationJobOutput): output_name = output.name or "" output_version = output.version or "" break if not output_name or not output_version: - raise RuntimeError(f"Job `{job.id}` did not produce a dataset output.") + raise RuntimeError("The data generation job did not produce a dataset output.") # Resolve the DatasetVersion so we can use its id as the eval run's file_id. dataset: DatasetVersion = project_client.datasets.get(name=output_name, version=output_version) @@ -273,9 +257,6 @@ def main() -> None: print(f"Delete the generated dataset `{dataset.name}` v{dataset.version}.") project_client.datasets.delete(name=dataset.name or "", version=dataset.version or "") - print(f"Delete the data generation job `{job.id}`.") - project_client.beta.datasets.delete_generation_job(job_id=job.id) - if __name__ == "__main__": main() diff --git a/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_traces_for_evaluation.py b/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_traces_for_evaluation.py index 1b79603e559d..18a5d59582b1 100644 --- a/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_traces_for_evaluation.py +++ b/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_traces_for_evaluation.py @@ -28,7 +28,7 @@ Before running the sample: - pip install "azure-ai-projects>=2.2.0" azure-identity python-dotenv + pip install "azure-ai-projects>=2.4.0" azure-identity python-dotenv Set these environment variables with your own values: 1) FOUNDRY_PROJECT_ENDPOINT - Required. The Azure AI Project endpoint, as @@ -54,7 +54,6 @@ DataGenerationJobScenario, DatasetDataGenerationJobOutput, DatasetVersion, - JobStatus, PromptAgentDefinition, TracesDataGenerationJobOptions, TracesDataGenerationJobSource, @@ -93,9 +92,6 @@ output_dataset_name = f"{DATASET_NAME}-{run_id}" agent_name = f"{DATASET_NAME}-{run_id}" -TERMINAL_STATUSES = {JobStatus.SUCCEEDED, JobStatus.FAILED, JobStatus.CANCELLED} - - with ( DefaultAzureCredential() as credential, AIProjectClient(endpoint=endpoint, credential=credential) as project_client, @@ -131,9 +127,6 @@ print(f"Wait {INITIAL_INGEST_WAIT_SECONDS}s for Application Insights to ingest the spans.", flush=True) time.sleep(INITIAL_INGEST_WAIT_SECONDS) - # 2. Submit a data generation job that reads the agent's traces (retry - # in case ingestion is still in flight). Small backoff so the seeded - # spans fall inside the queried window. start_time = seed_start - timedelta(minutes=5) job = None @@ -144,60 +137,50 @@ f"(attempt {attempt}/{MAX_JOB_ATTEMPTS}, " f"window: {start_time.isoformat()} .. {end_time.isoformat()})." ) - job = project_client.beta.datasets.create_generation_job( - job=DataGenerationJob( - inputs=DataGenerationJobInputs( - name=f"traces-eval-{run_id}-a{attempt}", - scenario=DataGenerationJobScenario.EVALUATION, - sources=[ - TracesDataGenerationJobSource( - description="Application Insights conversation traces for the agent.", - agent_name=agent_name, - start_time=start_time, - end_time=end_time, - ), - ], - # max_samples must be in [15, 1000]; caps output dataset size. - options=TracesDataGenerationJobOptions(max_samples=15), - output_options=DataGenerationJobOutputOptions(name=output_dataset_name), + try: + job = project_client.beta.datasets.begin_create_generation_job( + job=DataGenerationJob( + inputs=DataGenerationJobInputs( + name=f"traces-eval-{run_id}-a{attempt}", + scenario=DataGenerationJobScenario.EVALUATION, + sources=[ + TracesDataGenerationJobSource( + description="Application Insights conversation traces for the agent.", + agent_name=agent_name, + start_time=start_time, + end_time=end_time, + ), + ], + # max_samples must be in [15, 1000]; caps output dataset size. + options=TracesDataGenerationJobOptions(max_samples=15), + output_options=DataGenerationJobOutputOptions(name=output_dataset_name), + ), ), - ), - ) - submitted_job_ids.append(job.id) - print(f"Created data generation job `{job.id}` (status: `{job.status}`).") - - print(f"Poll job `{job.id}` until it reaches a terminal state.", end="", flush=True) - while job.status not in TERMINAL_STATUSES: - time.sleep(POLL_INTERVAL_SECONDS) - print(".", end="", flush=True) - job = project_client.beta.datasets.get_generation_job(job_id=job.id) - print() - print(f"Final job status: `{job.status}`.") - - if job.status == JobStatus.SUCCEEDED: + polling_interval=POLL_INTERVAL_SECONDS, + ).result() + print(f"Data generation job succeeded.") break - - message = job.error.message if job.error is not None else "" - if attempt == MAX_JOB_ATTEMPTS: - raise RuntimeError(f"Job `{job.id}` failed after {MAX_JOB_ATTEMPTS} attempts: {message}") - print(f" Attempt {attempt} failed ({message}); wait {RETRY_WAIT_SECONDS}s and retry.") - time.sleep(RETRY_WAIT_SECONDS) - - assert job is not None # for type-checker; loop guarantees success path sets job + except Exception as e: # pylint: disable=broad-except + if attempt == MAX_JOB_ATTEMPTS: + raise RuntimeError(f"Job failed after {MAX_JOB_ATTEMPTS} attempts: {e}") + print(f" Attempt {attempt} failed ({e}); wait {RETRY_WAIT_SECONDS}s and retry.") + time.sleep(RETRY_WAIT_SECONDS) # 3. Resolve the generated dataset. - outputs = (job.result.outputs if job.result is not None else None) or [] + if job is None: + raise RuntimeError("The data generation job did not return a result.") + outputs = job.outputs or [] dataset_output = next((o for o in outputs if isinstance(o, DatasetDataGenerationJobOutput)), None) if dataset_output is None or not dataset_output.name or not dataset_output.version: - raise RuntimeError(f"Job `{job.id}` did not produce a dataset output.") + raise RuntimeError("The data generation job did not produce a dataset output.") created_dataset = project_client.datasets.get(name=dataset_output.name, version=dataset_output.version) print( f"Generated dataset: name=`{created_dataset.name}` " f"version=`{created_dataset.version}` id=`{created_dataset.id}`" ) - if job.result is not None and job.result.generated_samples is not None: - print(f"Generated samples: {job.result.generated_samples}") + if job.generated_samples is not None: + print(f"Generated samples: {job.generated_samples}") finally: # Best-effort cleanup, outputs -> producers (dataset, job, conversations, agent). @@ -211,12 +194,9 @@ except Exception as exc: # pylint: disable=broad-exception-caught print(f" (warning) could not delete dataset: {exc}") - for jid in submitted_job_ids: - try: - project_client.beta.datasets.delete_generation_job(job_id=jid) - print(f"Deleted data generation job `{jid}`.") - except Exception as exc: # pylint: disable=broad-exception-caught - print(f" (warning) could not delete job `{jid}`: {exc}") + # Note: The data generation jobs are implicitly cleaned up by the service + # when the dataset is deleted (cascade delete). Attempting explicit deletion + # is not supported for LRO-based jobs. if created_conversation_ids: for cid in created_conversation_ids: diff --git a/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_traces_for_finetuning.py b/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_traces_for_finetuning.py index beb48c225d94..f7e0b6efa15c 100644 --- a/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_traces_for_finetuning.py +++ b/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_traces_for_finetuning.py @@ -28,7 +28,7 @@ Before running the sample: - pip install "azure-ai-projects>=2.2.0" azure-identity python-dotenv + pip install "azure-ai-projects>=2.4.0" azure-identity python-dotenv Set these environment variables with your own values: 1) FOUNDRY_PROJECT_ENDPOINT - Required. The Azure AI Project endpoint, as @@ -133,9 +133,6 @@ print(f"Wait {INITIAL_INGEST_WAIT_SECONDS}s for Application Insights to ingest the spans.", flush=True) time.sleep(INITIAL_INGEST_WAIT_SECONDS) - # 2. Submit a fine-tuning data generation job that reads the agent's - # traces (retry in case ingestion is still in flight). Small backoff so - # the seeded spans fall inside the queried window. start_time = seed_start - timedelta(minutes=5) job = None @@ -146,64 +143,54 @@ f"(attempt {attempt}/{MAX_JOB_ATTEMPTS}, " f"window: {start_time.isoformat()} .. {end_time.isoformat()})." ) - job = project_client.beta.datasets.create_generation_job( - job=DataGenerationJob( - inputs=DataGenerationJobInputs( - name=f"traces-ft-{run_id}-a{attempt}", - scenario=DataGenerationJobScenario.SUPERVISED_FINETUNING, - sources=[ - TracesDataGenerationJobSource( - description="Application Insights conversation traces for the agent.", - agent_name=agent_name, - start_time=start_time, - end_time=end_time, - ), - ], - # max_samples must be in [15, 1000]; caps output dataset size. - # train_split=0.8 splits generated samples into a training - # and a validation Azure OpenAI file. - options=TracesDataGenerationJobOptions(max_samples=15, train_split=0.8), - output_options=DataGenerationJobOutputOptions(name=output_name), + try: + job = project_client.beta.datasets.begin_create_generation_job( + job=DataGenerationJob( + inputs=DataGenerationJobInputs( + name=f"traces-ft-{run_id}-a{attempt}", + scenario=DataGenerationJobScenario.SUPERVISED_FINETUNING, + sources=[ + TracesDataGenerationJobSource( + description="Application Insights conversation traces for the agent.", + agent_name=agent_name, + start_time=start_time, + end_time=end_time, + ), + ], + # max_samples must be in [15, 1000]; caps output dataset size. + # train_split=0.8 splits generated samples into a training + # and a validation Azure OpenAI file. + options=TracesDataGenerationJobOptions(max_samples=15, train_split=0.8), + output_options=DataGenerationJobOutputOptions(name=output_name), + ), ), - ), - ) - submitted_job_ids.append(job.id) - print(f"Created data generation job `{job.id}` (status: `{job.status}`).") - - print(f"Poll job `{job.id}` until it reaches a terminal state.", end="", flush=True) - while job.status not in TERMINAL_STATUSES: - time.sleep(POLL_INTERVAL_SECONDS) - print(".", end="", flush=True) - job = project_client.beta.datasets.get_generation_job(job_id=job.id) - print() - print(f"Final job status: `{job.status}`.") - - if job.status == JobStatus.SUCCEEDED: + polling_interval=POLL_INTERVAL_SECONDS, + ).result() + print(f"Data generation job succeeded.") break - - message = job.error.message if job.error is not None else "" - if attempt == MAX_JOB_ATTEMPTS: - raise RuntimeError(f"Job `{job.id}` failed after {MAX_JOB_ATTEMPTS} attempts: {message}") - print(f" Attempt {attempt} failed ({message}); wait {RETRY_WAIT_SECONDS}s and retry.") - time.sleep(RETRY_WAIT_SECONDS) - - assert job is not None # for type-checker; loop guarantees success path sets job + except Exception as e: # pylint: disable=broad-except + if attempt == MAX_JOB_ATTEMPTS: + raise RuntimeError(f"Job failed after {MAX_JOB_ATTEMPTS} attempts: {e}") + print(f" Attempt {attempt} failed ({e}); wait {RETRY_WAIT_SECONDS}s and retry.") + time.sleep(RETRY_WAIT_SECONDS) # 3. Resolve generated fine-tuning files. - outputs = (job.result.outputs if job.result is not None else None) or [] + if job is None: + raise RuntimeError("The data generation job did not return a result.") + outputs = job.outputs or [] file_outputs = [o for o in outputs if isinstance(o, FileDataGenerationJobOutput)] if not file_outputs: - raise RuntimeError(f"Job `{job.id}` did not produce any file outputs.") + raise RuntimeError("The data generation job did not produce any file outputs.") print(f"Generated {len(file_outputs)} fine-tuning file(s):") for output in file_outputs: if not output.id: - raise RuntimeError(f"Job `{job.id}` returned a file output without an id.") + raise RuntimeError("A file output was returned without an id.") created_file_ids.append(output.id) file_info = openai_client.files.retrieve(file_id=output.id) print(f" - filename=`{file_info.filename}` id=`{output.id}` bytes={file_info.bytes}") - if job.result is not None and job.result.generated_samples is not None: - print(f"Generated samples: {job.result.generated_samples}") + if job.generated_samples is not None: + print(f"Generated samples: {job.generated_samples}") finally: # Best-effort cleanup, outputs -> producers (files, job, conversations, agent). @@ -215,12 +202,9 @@ except Exception as exc: # pylint: disable=broad-exception-caught print(f" (warning) could not delete file `{fid}`: {exc}") - for jid in submitted_job_ids: - try: - project_client.beta.datasets.delete_generation_job(job_id=jid) - print(f"Deleted data generation job `{jid}`.") - except Exception as exc: # pylint: disable=broad-exception-caught - print(f" (warning) could not delete job `{jid}`: {exc}") + # Note: The data generation jobs are implicitly cleaned up by the service + # when the files are deleted (cascade delete). Attempting explicit deletion + # is not supported for LRO-based jobs. if created_conversation_ids: for cid in created_conversation_ids: diff --git a/sdk/ai/azure-ai-projects/samples/evaluations/sample_rubric_evaluator_generation_all_sources.py b/sdk/ai/azure-ai-projects/samples/evaluations/sample_rubric_evaluator_generation_all_sources.py index 09070104956a..99e4b7496962 100644 --- a/sdk/ai/azure-ai-projects/samples/evaluations/sample_rubric_evaluator_generation_all_sources.py +++ b/sdk/ai/azure-ai-projects/samples/evaluations/sample_rubric_evaluator_generation_all_sources.py @@ -28,7 +28,7 @@ Before running the sample: - pip install "azure-ai-projects>=2.2.0" azure-identity python-dotenv + pip install "azure-ai-projects>=2.4.0" azure-identity python-dotenv Set these environment variables with your own values: 1) FOUNDRY_PROJECT_ENDPOINT - Required. The Azure AI Project endpoint, as found @@ -48,10 +48,9 @@ """ import os -import time import uuid from datetime import datetime, timedelta, timezone -from typing import List, cast +from typing import List from dotenv import load_dotenv @@ -63,7 +62,6 @@ EvaluatorGenerationInputs, EvaluatorGenerationJob, EvaluatorGenerationJobSource, - JobStatus, PromptEvaluatorGenerationJobSource, RubricBasedEvaluatorDefinition, TracesEvaluatorGenerationJobSource, @@ -85,8 +83,6 @@ multi_name = f"multi-source-{ts}-{short}" traces_name = f"traces-source-{ts}-{short}" -TERMINAL_STATUSES = {JobStatus.SUCCEEDED, JobStatus.FAILED, JobStatus.CANCELLED} - multi_evaluator_version = "" traces_evaluator_version = "" @@ -128,31 +124,22 @@ else: print("Skipping Dataset source (FOUNDRY_REFERENCE_DATASET_NAME / _VERSION not set).") - multi_job = project_client.beta.evaluators.create_generation_job( - job=EvaluatorGenerationJob( - inputs=EvaluatorGenerationInputs( - model=model_name, - evaluator_name=multi_name, - evaluator_display_name="Customer Support Quality (multi-source)", - evaluator_description="Generated from prompt, agent, and dataset signals.", - sources=multi_sources, + print("Waiting for multi-source job to complete (polling is handled by the SDK)...") + try: + evaluator = project_client.beta.evaluators.begin_create_generation_job( + job=EvaluatorGenerationJob( + inputs=EvaluatorGenerationInputs( + model=model_name, + evaluator_name=multi_name, + evaluator_display_name="Customer Support Quality (multi-source)", + evaluator_description="Generated from prompt, agent, and dataset signals.", + sources=multi_sources, + ), ), - ), - operation_id=f"rubric-multi-{short}", - ) - - print(f"Waiting for multi-source job `{multi_job.id}` to complete...") - while multi_job.status not in TERMINAL_STATUSES: - time.sleep(poll_interval_seconds) - multi_job = project_client.beta.evaluators.get_generation_job(multi_job.id) - - if multi_job.status != JobStatus.SUCCEEDED: - message = multi_job.error.message if multi_job.error is not None else "" - print(f"Multi-source job ended with status `{cast(JobStatus, multi_job.status).value}`: {message}") - else: + operation_id=f"rubric-multi-{short}", + polling_interval=poll_interval_seconds, + ).result() # `isinstance` narrows the discriminated `definition` to the rubric subtype. - evaluator = multi_job.result - assert evaluator is not None definition = evaluator.definition assert isinstance(definition, RubricBasedEvaluatorDefinition) multi_evaluator_version = evaluator.version or "" @@ -160,6 +147,8 @@ f"Multi-source evaluator `{evaluator.name}` v{evaluator.version}: " f"{len(definition.dimensions)} dimensions." ) + except Exception as e: # pylint: disable=broad-except + print(f"Multi-source job failed: {e}") # 2. Separate `traces` + Agent companion generation job. # The traces source requires a companion source because the service rejects @@ -171,41 +160,33 @@ start_time = now - timedelta(days=traces_window_days) end_time = now + timedelta(seconds=600) # small padding for clock skew - traces_job = project_client.beta.evaluators.create_generation_job( - job=EvaluatorGenerationJob( - inputs=EvaluatorGenerationInputs( - model=model_name, - evaluator_name=traces_name, - evaluator_display_name="Customer Support Quality (from traces)", - evaluator_description="Generated from real Application Insights conversation traces.", - sources=[ - TracesEvaluatorGenerationJobSource( - description="Application Insights conversation traces for the agent.", - agent_name=agent_name, - start_time=start_time, - end_time=end_time, - ), - AgentEvaluatorGenerationJobSource( - description="Companion source (service rejects traces-only).", - agent_name=agent_name, - ), - ], + print("Waiting for traces job to complete (polling is handled by the SDK)...") + try: + evaluator = project_client.beta.evaluators.begin_create_generation_job( + job=EvaluatorGenerationJob( + inputs=EvaluatorGenerationInputs( + model=model_name, + evaluator_name=traces_name, + evaluator_display_name="Customer Support Quality (from traces)", + evaluator_description="Generated from real Application Insights conversation traces.", + sources=[ + TracesEvaluatorGenerationJobSource( + description="Application Insights conversation traces for the agent.", + agent_name=agent_name, + start_time=start_time, + end_time=end_time, + ), + AgentEvaluatorGenerationJobSource( + description="Companion source (service rejects traces-only).", + agent_name=agent_name, + ), + ], + ), ), - ), - operation_id=f"rubric-traces-{short}", - ) - - print(f"Waiting for traces job `{traces_job.id}` to complete...") - while traces_job.status not in TERMINAL_STATUSES: - time.sleep(poll_interval_seconds) - traces_job = project_client.beta.evaluators.get_generation_job(traces_job.id) - - if traces_job.status != JobStatus.SUCCEEDED: - message = traces_job.error.message if traces_job.error is not None else "" - print(f"Traces job ended with status `{cast(JobStatus, traces_job.status).value}`: {message}") - else: - evaluator = traces_job.result - assert evaluator is not None + operation_id=f"rubric-traces-{short}", + polling_interval=poll_interval_seconds, + ).result() + # `isinstance` narrows the discriminated `definition` to the rubric subtype. definition = evaluator.definition assert isinstance(definition, RubricBasedEvaluatorDefinition) traces_evaluator_version = evaluator.version or "" @@ -213,6 +194,8 @@ f"Traces evaluator `{evaluator.name}` v{evaluator.version}: " f"{len(definition.dimensions)} dimensions." ) + except Exception as e: # pylint: disable=broad-except + print(f"Traces job failed: {e}") # 3. Clean up. `delete_version` cascades to delete the generation job record. print("Cleaning up.") diff --git a/sdk/ai/azure-ai-projects/samples/evaluations/sample_rubric_evaluator_generation_basic.py b/sdk/ai/azure-ai-projects/samples/evaluations/sample_rubric_evaluator_generation_basic.py index f8278c861838..4375842e523f 100644 --- a/sdk/ai/azure-ai-projects/samples/evaluations/sample_rubric_evaluator_generation_basic.py +++ b/sdk/ai/azure-ai-projects/samples/evaluations/sample_rubric_evaluator_generation_basic.py @@ -13,8 +13,8 @@ 1. Creates an `EvaluatorGenerationJob` whose only source is an inline natural-language description of the application's purpose, capabilities, and tools. The service synthesizes a rubric tailored to that application. - 2. Polls the generation job to completion and resolves the generated - `EvaluatorVersion`. + 2. Calls `begin_create_generation_job` which returns an `LROPoller[EvaluatorVersion]`; + `.result()` polls automatically and returns the generated `EvaluatorVersion`. 3. Creates an OpenAI evaluation referencing the generated evaluator as a testing criterion. 4. Runs the evaluation against inline JSONL sample data. @@ -30,7 +30,7 @@ Before running the sample: - pip install "azure-ai-projects>=2.2.0" azure-identity python-dotenv + pip install "azure-ai-projects>=2.4.0" azure-identity python-dotenv Set these environment variables with your own values: 1) FOUNDRY_PROJECT_ENDPOINT - Required. The Azure AI Project endpoint, as found @@ -47,7 +47,7 @@ import time import uuid from datetime import datetime, timezone -from typing import cast, Union +from typing import Union from dotenv import load_dotenv from openai.types.eval_create_params import DataSourceConfigCustom from openai.types.evals.create_eval_jsonl_run_data_source_param import ( @@ -63,7 +63,6 @@ from azure.ai.projects.models import ( EvaluatorGenerationInputs, EvaluatorGenerationJob, - JobStatus, PromptEvaluatorGenerationJobSource, RubricBasedEvaluatorDefinition, TestingCriterionAzureAIEvaluator, @@ -80,7 +79,6 @@ short = uuid.uuid4().hex[:6] evaluator_name = f"reservation-quality-generated-{ts}-{short}" -TERMINAL_STATUSES = {JobStatus.SUCCEEDED, JobStatus.FAILED, JobStatus.CANCELLED} TERMINAL_RUN_STATUSES = {"completed", "failed", "canceled"} with ( @@ -89,7 +87,10 @@ project_client.get_openai_client() as openai_client, ): # 1. Generate an evaluator from a single `Prompt` source. - job = project_client.beta.evaluators.create_generation_job( + # The LRO polls automatically; `.result()` blocks until the job reaches a terminal state + # and returns the produced EvaluatorVersion directly. + print("Waiting for generation job to complete (polling is handled by the SDK)...") + evaluator = project_client.beta.evaluators.begin_create_generation_job( job=EvaluatorGenerationJob( inputs=EvaluatorGenerationInputs( model=model_name, @@ -115,25 +116,13 @@ ], ), ), - # `operation_id` makes the call idempotent - re-submitting the same id returns the existing job. + # `operation_id` makes the call idempotent - re-submitting the same id attaches to the existing job. operation_id=f"rubric-eval-basic-{short}", - ) - print(f"Created generation job `{job.id}`.") - - print(f"Waiting for job `{job.id}` to complete...") - while job.status not in TERMINAL_STATUSES: - time.sleep(poll_interval_seconds) - job = project_client.beta.evaluators.get_generation_job(job.id) - print(f"Job finished with status `{cast(JobStatus, job.status).value}`.") - - if job.status != JobStatus.SUCCEEDED: - message = job.error.message if job.error is not None else "" - raise RuntimeError(f"Generation job ended with status `{cast(JobStatus, job.status).value}`: {message}") + polling_interval=poll_interval_seconds, + ).result() # On success, the evaluator is automatically saved as version 1. # `isinstance` narrows the discriminated `definition` to the rubric subtype. - evaluator = job.result - assert evaluator is not None definition = evaluator.definition assert isinstance(definition, RubricBasedEvaluatorDefinition) print( diff --git a/sdk/ai/azure-ai-projects/samples/evaluations/sample_rubric_evaluator_generation_iterate.py b/sdk/ai/azure-ai-projects/samples/evaluations/sample_rubric_evaluator_generation_iterate.py index ad037eeb9a52..0ca337d5bbfe 100644 --- a/sdk/ai/azure-ai-projects/samples/evaluations/sample_rubric_evaluator_generation_iterate.py +++ b/sdk/ai/azure-ai-projects/samples/evaluations/sample_rubric_evaluator_generation_iterate.py @@ -25,7 +25,7 @@ Before running the sample: - pip install "azure-ai-projects>=2.2.0" azure-identity python-dotenv + pip install "azure-ai-projects>=2.4.0" azure-identity python-dotenv Set these environment variables with your own values: 1) FOUNDRY_PROJECT_ENDPOINT - Required. The Azure AI Project endpoint, as found @@ -37,10 +37,8 @@ """ import os -import time import uuid from datetime import datetime, timezone -from typing import cast from dotenv import load_dotenv @@ -51,7 +49,6 @@ EvaluatorDefinitionType, EvaluatorGenerationInputs, EvaluatorGenerationJob, - JobStatus, PromptEvaluatorGenerationJobSource, RubricBasedEvaluatorDefinition, ) @@ -67,14 +64,15 @@ short = uuid.uuid4().hex[:6] evaluator_name = f"reservation-quality-iterate-{ts}-{short}" -TERMINAL_STATUSES = {JobStatus.SUCCEEDED, JobStatus.FAILED, JobStatus.CANCELLED} - with ( DefaultAzureCredential() as credential, AIProjectClient(endpoint=endpoint, credential=credential) as project_client, ): # 1. Generate v1 of the evaluator from a single `Prompt` source. - job = project_client.beta.evaluators.create_generation_job( + # The LRO polls automatically; `.result()` blocks until the job reaches a terminal state + # and returns the produced EvaluatorVersion directly. + print("Waiting for generation job to complete (polling is handled by the SDK)...") + v1 = project_client.beta.evaluators.begin_create_generation_job( job=EvaluatorGenerationJob( inputs=EvaluatorGenerationInputs( model=model_name, @@ -95,20 +93,10 @@ ), ), operation_id=f"rubric-iterate-{short}", - ) - - print(f"Waiting for job `{job.id}` to complete...") - while job.status not in TERMINAL_STATUSES: - time.sleep(poll_interval_seconds) - job = project_client.beta.evaluators.get_generation_job(job.id) - - if job.status != JobStatus.SUCCEEDED: - message = job.error.message if job.error is not None else "" - raise RuntimeError(f"Generation job ended with status `{cast(JobStatus, job.status).value}`: {message}") + polling_interval=poll_interval_seconds, + ).result() # `isinstance` narrows the discriminated `definition` to the rubric subtype. - v1 = job.result - assert v1 is not None v1_definition = v1.definition assert isinstance(v1_definition, RubricBasedEvaluatorDefinition) print( diff --git a/sdk/ai/azure-ai-projects/samples/evaluations/sample_rubric_evaluator_generation_lifecycle.py b/sdk/ai/azure-ai-projects/samples/evaluations/sample_rubric_evaluator_generation_lifecycle.py index e75d09e0d6df..7b94b7f6154c 100644 --- a/sdk/ai/azure-ai-projects/samples/evaluations/sample_rubric_evaluator_generation_lifecycle.py +++ b/sdk/ai/azure-ai-projects/samples/evaluations/sample_rubric_evaluator_generation_lifecycle.py @@ -9,8 +9,9 @@ End-to-end scenario showing the lifecycle of rubric evaluator generation jobs. The sample exercises: - * `create_generation_job` with `operation_id` for idempotent re-submits. - * `get_generation_job` to poll a single job to completion. + * `begin_create_generation_job` with `operation_id` for idempotent re-submits; + returns `LROPoller[EvaluatorVersion]` — the SDK polls automatically and + `.result()` blocks until the job reaches a terminal state. * `list_generation_jobs` to enumerate recent jobs in the project. * `delete_generation_job` to remove a finished job record. * `delete_version` to remove the persisted evaluator that the job produced. @@ -27,7 +28,7 @@ Before running the sample: - pip install "azure-ai-projects>=2.2.0" azure-identity python-dotenv + pip install "azure-ai-projects>=2.4.0" azure-identity python-dotenv Set these environment variables with your own values: 1) FOUNDRY_PROJECT_ENDPOINT - Required. The Azure AI Project endpoint, as found @@ -40,7 +41,6 @@ import os import itertools -import time import uuid from datetime import datetime, timezone from typing import cast @@ -53,6 +53,7 @@ from azure.ai.projects.models import ( EvaluatorGenerationInputs, EvaluatorGenerationJob, + EvaluatorVersion, JobStatus, PageOrder, PromptEvaluatorGenerationJobSource, @@ -70,8 +71,6 @@ evaluator_name = f"lifecycle-demo-{ts}-{short}" operation_id = f"rubric-lifecycle-{short}" -TERMINAL_STATUSES = {JobStatus.SUCCEEDED, JobStatus.FAILED, JobStatus.CANCELLED} - # Shared job used both for the initial create and the idempotency replay. job_body = EvaluatorGenerationJob( inputs=EvaluatorGenerationInputs( @@ -92,28 +91,28 @@ DefaultAzureCredential() as credential, AIProjectClient(endpoint=endpoint, credential=credential) as project_client, ): - # 1. Create the generation job. `operation_id` makes the call idempotent - - # re-submitting with the same id returns the existing job. - job = project_client.beta.evaluators.create_generation_job(job=job_body, operation_id=operation_id) - print(f"Created generation job `{job.id}`.") - - replay = project_client.beta.evaluators.create_generation_job(job=job_body, operation_id=operation_id) - assert replay.id == job.id # idempotent replay returns the same job - - # 2. Poll the job to completion. - print(f"Waiting for job `{job.id}` to complete...") - while job.status not in TERMINAL_STATUSES: - time.sleep(poll_interval_seconds) - job = project_client.beta.evaluators.get_generation_job(job.id) - print(f"Job finished with status `{cast(JobStatus, job.status).value}`.") - - if job.status != JobStatus.SUCCEEDED: - message = job.error.message if job.error is not None else "" - raise RuntimeError(f"Generation job ended with status `{cast(JobStatus, job.status).value}`: {message}") - - evaluator = job.result - assert evaluator is not None - print(f"Generated evaluator `{evaluator.name}` version `{evaluator.version}`.") + # 1. Start the generation job LRO. `operation_id` makes the call idempotent - + # re-submitting with the same id returns a poller attached to the existing job. + poller = project_client.beta.evaluators.begin_create_generation_job( + job=job_body, operation_id=operation_id, polling_interval=poll_interval_seconds + ) + print("Generation job started; LRO polling in progress.") + + # Idempotency: a second call with the same operation_id attaches to the same job. + replay_poller = project_client.beta.evaluators.begin_create_generation_job( + job=job_body, operation_id=operation_id, polling_interval=poll_interval_seconds + ) + + # 2. Block until the LRO finishes. The SDK polls automatically; `.result()` returns + # the produced EvaluatorVersion once the job reaches a terminal state. + print("Waiting for the generation job to complete (polling is handled by the SDK)...") + evaluator: EvaluatorVersion = poller.result() + print(f"Generated evaluator `{evaluator.name}` version `{evaluator.version}` " + f"(job `{evaluator.generation_job_id}`).") + + # Verify the idempotency: the replay poller resolves to the same underlying job. + replay_evaluator: EvaluatorVersion = replay_poller.result() + assert replay_evaluator.generation_job_id == evaluator.generation_job_id # 3. List the 5 most recent generation jobs in this project. # `limit` controls the page size; use `itertools.islice` to cap the total. @@ -132,6 +131,7 @@ print("Cleaning up.") project_client.beta.evaluators.delete_version(name=evaluator.name, version=evaluator.version) try: - project_client.beta.evaluators.delete_generation_job(job.id) + if evaluator.generation_job_id is not None: + project_client.beta.evaluators.delete_generation_job(evaluator.generation_job_id) except ResourceNotFoundError: pass # already removed by the delete_version cascade diff --git a/sdk/ai/azure-ai-projects/tests/samples/test_samples.py b/sdk/ai/azure-ai-projects/tests/samples/test_samples.py index 24a9b8c707c6..ad10b9f49b09 100644 --- a/sdk/ai/azure-ai-projects/tests/samples/test_samples.py +++ b/sdk/ai/azure-ai-projects/tests/samples/test_samples.py @@ -181,17 +181,18 @@ def test_models_samples(self, sample_path: str, **kwargs) -> None: # fails the test). @servicePreparer() - @additionalSampleTests( - [ - AdditionalSampleTestDetail( - test_id="sample_dataset_generation_job_simpleqna_with_prompt_source", - sample_filename="sample_dataset_generation_job_simpleqna_with_prompt_source.py", - env_vars={ - "POLL_INTERVAL_SECONDS": "60", - }, - ), - ] - ) + # TODO: Howie to re-record this test. Darren is able to run the sample live fine, but when running live as a test, LLM validation part fails for some reason. + # @additionalSampleTests( + # [ + # AdditionalSampleTestDetail( + # test_id="sample_dataset_generation_job_simpleqna_with_prompt_source", + # sample_filename="sample_dataset_generation_job_simpleqna_with_prompt_source.py", + # env_vars={ + # "POLL_INTERVAL_SECONDS": "60", + # }, + # ), + # ] + # ) @pytest.mark.parametrize( "sample_path", get_sample_paths( @@ -208,6 +209,7 @@ def test_models_samples(self, sample_path: str, **kwargs) -> None: ) @SamplePathPasser() @recorded_by_proxy(RecordedTransport.AZURE_CORE, RecordedTransport.HTTPX) + # To run this test: pytest tests/samples/test_samples.py::TestSamples::test_datasets_samples[sample_dataset_generation_job_simpleqna_with_prompt_source] -s def test_datasets_samples(self, sample_path: str, **kwargs) -> None: env_vars = get_sample_env_vars(kwargs) executor = SyncSampleExecutor(self, sample_path, env_vars=env_vars, **kwargs) diff --git a/sdk/ai/azure-ai-projects/tsp-location.yaml b/sdk/ai/azure-ai-projects/tsp-location.yaml index b092360c07d2..a96731921024 100644 --- a/sdk/ai/azure-ai-projects/tsp-location.yaml +++ b/sdk/ai/azure-ai-projects/tsp-location.yaml @@ -1,5 +1,5 @@ directory: specification/ai-foundry/data-plane/Foundry/src/sdk-python-js-azure-ai-projects -commit: fca510e0c031a185e189d35bc353b8e7254c150a +commit: bc7302016000ed24f19c7108bffdeb1f73328cb0 repo: Azure/azure-rest-api-specs additionalDirectories: - specification/ai-foundry/data-plane/Foundry/src/agents @@ -17,9 +17,7 @@ additionalDirectories: - specification/ai-foundry/data-plane/Foundry/src/insights - specification/ai-foundry/data-plane/Foundry/src/memory-stores - specification/ai-foundry/data-plane/Foundry/src/models - - specification/ai-foundry/data-plane/Foundry/src/openai/conversations - - specification/ai-foundry/data-plane/Foundry/src/openai/evaluations - - specification/ai-foundry/data-plane/Foundry/src/openai/responses + - specification/ai-foundry/data-plane/Foundry/src/openai - specification/ai-foundry/data-plane/Foundry/src/red-teams - specification/ai-foundry/data-plane/Foundry/src/routines - specification/ai-foundry/data-plane/Foundry/src/schedules From ca0aae3d68bffa316aa61eaad00a446833530a22 Mon Sep 17 00:00:00 2001 From: Darren Cohen <39422044+dargilco@users.noreply.github.com> Date: Fri, 24 Jul 2026 06:37:17 -0700 Subject: [PATCH 09/15] Re-emit, to remove WebIQ tools (#48240) --- sdk/ai/azure-ai-projects/api.md | 50 ------- sdk/ai/azure-ai-projects/api.metadata.yml | 2 +- .../azure-ai-projects/apiview-properties.json | 4 +- .../azure/ai/projects/models/__init__.py | 4 - .../azure/ai/projects/models/_enums.py | 4 - .../azure/ai/projects/models/_models.py | 139 ++---------------- .../sample_optimization_job_basic_polling.py | 2 +- ...le_optimization_job_basic_polling_async.py | 2 +- ...generation_job_simpleqna_for_finetuning.py | 6 +- ...eration_job_simpleqna_with_agent_source.py | 3 +- ...neration_job_simpleqna_with_file_source.py | 4 +- ...ration_job_simpleqna_with_prompt_source.py | 4 +- ...e_rubric_evaluator_generation_lifecycle.py | 6 +- sdk/ai/azure-ai-projects/tsp-location.yaml | 2 +- 14 files changed, 27 insertions(+), 205 deletions(-) diff --git a/sdk/ai/azure-ai-projects/api.md b/sdk/ai/azure-ai-projects/api.md index 01bda93d3556..a683fb81cd13 100644 --- a/sdk/ai/azure-ai-projects/api.md +++ b/sdk/ai/azure-ai-projects/api.md @@ -8871,7 +8871,6 @@ namespace azure.ai.projects.models SHELL = "shell" TOOLBOX_SEARCH_PREVIEW = "toolbox_search_preview" TOOL_SEARCH = "tool_search" - WEB_IQ_PREVIEW = "web_iq_preview" WEB_SEARCH = "web_search" WEB_SEARCH_PREVIEW = "web_search_preview" WORK_IQ_PREVIEW = "work_iq_preview" @@ -9010,7 +9009,6 @@ namespace azure.ai.projects.models REMINDER_PREVIEW = "reminder_preview" TOOLBOX_SEARCH = "toolbox_search" TOOLBOX_SEARCH_PREVIEW = "toolbox_search_preview" - WEB_IQ_PREVIEW = "web_iq_preview" WEB_SEARCH = "web_search" WORK_IQ_PREVIEW = "work_iq_preview" @@ -9284,54 +9282,6 @@ namespace azure.ai.projects.models FIXED_RATIO = "FixedRatio" - class azure.ai.projects.models.WebIQPreviewTool(Tool, discriminator='web_iq_preview'): - project_connection_id: str - require_approval: Optional[Union[MCPToolRequireApproval, str]] - server_label: Optional[str] - server_url: Optional[str] - type: Literal[ToolType.WEB_IQ_PREVIEW] - - @overload - def __init__( - self, - *, - project_connection_id: str, - require_approval: Optional[Union[MCPToolRequireApproval, str]] = ..., - server_label: Optional[str] = ..., - server_url: Optional[str] = ... - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.ai.projects.models.WebIQPreviewToolboxTool(ToolboxTool, discriminator='web_iq_preview'): - description: str - name: str - project_connection_id: str - require_approval: Optional[Union[MCPToolRequireApproval, str]] - server_label: Optional[str] - server_url: Optional[str] - tool_configs: dict[str, ToolConfig] - type: Literal[ToolboxToolType.WEB_IQ_PREVIEW] - - @overload - def __init__( - self, - *, - description: Optional[str] = ..., - name: Optional[str] = ..., - project_connection_id: str, - require_approval: Optional[Union[MCPToolRequireApproval, str]] = ..., - server_label: Optional[str] = ..., - server_url: Optional[str] = ..., - tool_configs: Optional[dict[str, ToolConfig]] = ... - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - class azure.ai.projects.models.WebSearchApproximateLocation(_Model): city: Optional[str] country: Optional[str] diff --git a/sdk/ai/azure-ai-projects/api.metadata.yml b/sdk/ai/azure-ai-projects/api.metadata.yml index 047d86b69bba..3d493abef420 100644 --- a/sdk/ai/azure-ai-projects/api.metadata.yml +++ b/sdk/ai/azure-ai-projects/api.metadata.yml @@ -1,3 +1,3 @@ -apiMdSha256: 3950b76f4807ef00493f4ea3962013957e0e8992ceec25c0e98ea377561d7fca +apiMdSha256: 544c82773e2ee8b4aeb0ece5b64bb938f2d3703720950214d3e4c5c98e3e61fd parserVersion: 0.3.30 pythonVersion: 3.14.3 diff --git a/sdk/ai/azure-ai-projects/apiview-properties.json b/sdk/ai/azure-ai-projects/apiview-properties.json index 5f676a90bffa..fd4f2a8e648b 100644 --- a/sdk/ai/azure-ai-projects/apiview-properties.json +++ b/sdk/ai/azure-ai-projects/apiview-properties.json @@ -348,8 +348,6 @@ "azure.ai.projects.models.VersionIndicator": "Azure.AI.Projects.VersionIndicator", "azure.ai.projects.models.VersionRefIndicator": "Azure.AI.Projects.VersionRefIndicator", "azure.ai.projects.models.VersionSelector": "Azure.AI.Projects.VersionSelector", - "azure.ai.projects.models.WebIQPreviewTool": "Azure.AI.Projects.WebIQPreviewTool", - "azure.ai.projects.models.WebIQPreviewToolboxTool": "Azure.AI.Projects.WebIQPreviewToolboxTool", "azure.ai.projects.models.WebSearchApproximateLocation": "OpenAI.WebSearchApproximateLocation", "azure.ai.projects.models.WebSearchConfiguration": "Azure.AI.Projects.WebSearchConfiguration", "azure.ai.projects.models.WebSearchPreviewTool": "OpenAI.WebSearchPreviewTool", @@ -550,5 +548,5 @@ "azure.ai.projects.operations.ToolboxesOperations.delete_version": "Azure.AI.Projects.Toolboxes.deleteToolboxVersion", "azure.ai.projects.aio.operations.ToolboxesOperations.delete_version": "Azure.AI.Projects.Toolboxes.deleteToolboxVersion" }, - "CrossLanguageVersion": "b8e732af7c5e" + "CrossLanguageVersion": "856df4c68403" } \ No newline at end of file diff --git a/sdk/ai/azure-ai-projects/azure/ai/projects/models/__init__.py b/sdk/ai/azure-ai-projects/azure/ai/projects/models/__init__.py index 8ab257c7eaef..e490237abf83 100644 --- a/sdk/ai/azure-ai-projects/azure/ai/projects/models/__init__.py +++ b/sdk/ai/azure-ai-projects/azure/ai/projects/models/__init__.py @@ -361,8 +361,6 @@ VersionRefIndicator, VersionSelectionRule, VersionSelector, - WebIQPreviewTool, - WebIQPreviewToolboxTool, WebSearchApproximateLocation, WebSearchConfiguration, WebSearchPreviewTool, @@ -820,8 +818,6 @@ "VersionRefIndicator", "VersionSelectionRule", "VersionSelector", - "WebIQPreviewTool", - "WebIQPreviewToolboxTool", "WebSearchApproximateLocation", "WebSearchConfiguration", "WebSearchPreviewTool", diff --git a/sdk/ai/azure-ai-projects/azure/ai/projects/models/_enums.py b/sdk/ai/azure-ai-projects/azure/ai/projects/models/_enums.py index 6c5d76661276..b7f159dd935a 100644 --- a/sdk/ai/azure-ai-projects/azure/ai/projects/models/_enums.py +++ b/sdk/ai/azure-ai-projects/azure/ai/projects/models/_enums.py @@ -1129,8 +1129,6 @@ class ToolboxToolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """WORK_IQ_PREVIEW.""" FABRIC_IQ_PREVIEW = "fabric_iq_preview" """FABRIC_IQ_PREVIEW.""" - WEB_IQ_PREVIEW = "web_iq_preview" - """WEB_IQ_PREVIEW.""" TOOLBOX_SEARCH = "toolbox_search" """TOOLBOX_SEARCH.""" TOOLBOX_SEARCH_PREVIEW = "toolbox_search_preview" @@ -1228,8 +1226,6 @@ class ToolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """WORK_IQ_PREVIEW.""" FABRIC_IQ_PREVIEW = "fabric_iq_preview" """FABRIC_IQ_PREVIEW.""" - WEB_IQ_PREVIEW = "web_iq_preview" - """WEB_IQ_PREVIEW.""" TOOLBOX_SEARCH_PREVIEW = "toolbox_search_preview" """TOOLBOX_SEARCH_PREVIEW.""" AZURE_AI_SEARCH = "azure_ai_search" diff --git a/sdk/ai/azure-ai-projects/azure/ai/projects/models/_models.py b/sdk/ai/azure-ai-projects/azure/ai/projects/models/_models.py index 9128e9a8fc78..15d2e20c44f2 100644 --- a/sdk/ai/azure-ai-projects/azure/ai/projects/models/_models.py +++ b/sdk/ai/azure-ai-projects/azure/ai/projects/models/_models.py @@ -161,17 +161,16 @@ class Tool(_Model): CaptureStructuredOutputsTool, CodeInterpreterTool, ComputerTool, ComputerUsePreviewTool, CustomToolParam, MicrosoftFabricPreviewTool, FabricIQPreviewTool, FileSearchTool, FunctionTool, ImageGenTool, LocalShellToolParam, MCPTool, MemorySearchPreviewTool, NamespaceToolParam, - OpenApiTool, SharepointPreviewTool, FunctionShellToolParam, ToolSearchToolParam, - WebIQPreviewTool, WebSearchTool, WebSearchPreviewTool, WorkIQPreviewTool + OpenApiTool, SharepointPreviewTool, FunctionShellToolParam, ToolSearchToolParam, WebSearchTool, + WebSearchPreviewTool, WorkIQPreviewTool :ivar type: Required. Known values are: "function", "file_search", "computer", "computer_use_preview", "web_search", "mcp", "code_interpreter", "image_generation", "local_shell", "shell", "custom", "namespace", "tool_search", "web_search_preview", "apply_patch", "a2a_preview", "bing_custom_search_preview", "browser_automation_preview", "fabric_dataagent_preview", "sharepoint_grounding_preview", "memory_search_preview", - "work_iq_preview", "fabric_iq_preview", "web_iq_preview", "toolbox_search_preview", - "azure_ai_search", "azure_function", "bing_grounding", "capture_structured_outputs", and - "openapi". + "work_iq_preview", "fabric_iq_preview", "toolbox_search_preview", "azure_ai_search", + "azure_function", "bing_grounding", "capture_structured_outputs", and "openapi". :vartype type: str or ~azure.ai.projects.models.ToolType """ @@ -182,7 +181,7 @@ class Tool(_Model): \"local_shell\", \"shell\", \"custom\", \"namespace\", \"tool_search\", \"web_search_preview\", \"apply_patch\", \"a2a_preview\", \"bing_custom_search_preview\", \"browser_automation_preview\", \"fabric_dataagent_preview\", \"sharepoint_grounding_preview\", - \"memory_search_preview\", \"work_iq_preview\", \"fabric_iq_preview\", \"web_iq_preview\", + \"memory_search_preview\", \"work_iq_preview\", \"fabric_iq_preview\", \"toolbox_search_preview\", \"azure_ai_search\", \"azure_function\", \"bing_grounding\", \"capture_structured_outputs\", and \"openapi\".""" @@ -269,13 +268,12 @@ class ToolboxTool(_Model): A2APreviewToolboxTool, AzureAISearchToolboxTool, BrowserAutomationPreviewToolboxTool, CodeInterpreterToolboxTool, FabricIQPreviewToolboxTool, FileSearchToolboxTool, MCPToolboxTool, OpenApiToolboxTool, ReminderPreviewToolboxTool, ToolSearchToolboxTool, - ToolboxSearchPreviewToolboxTool, WebIQPreviewToolboxTool, WebSearchToolboxTool, - WorkIQPreviewToolboxTool + ToolboxSearchPreviewToolboxTool, WebSearchToolboxTool, WorkIQPreviewToolboxTool :ivar type: The type of tool. Required. Known values are: "code_interpreter", "file_search", "web_search", "mcp", "azure_ai_search", "openapi", "a2a_preview", "browser_automation_preview", - "reminder_preview", "work_iq_preview", "fabric_iq_preview", "web_iq_preview", "toolbox_search", - and "toolbox_search_preview". + "reminder_preview", "work_iq_preview", "fabric_iq_preview", "toolbox_search", and + "toolbox_search_preview". :vartype type: str or ~azure.ai.projects.models.ToolboxToolType :ivar name: Optional user-defined name for this tool or configuration. :vartype name: str @@ -292,7 +290,7 @@ class ToolboxTool(_Model): """The type of tool. Required. Known values are: \"code_interpreter\", \"file_search\", \"web_search\", \"mcp\", \"azure_ai_search\", \"openapi\", \"a2a_preview\", \"browser_automation_preview\", \"reminder_preview\", \"work_iq_preview\", - \"fabric_iq_preview\", \"web_iq_preview\", \"toolbox_search\", and \"toolbox_search_preview\".""" + \"fabric_iq_preview\", \"toolbox_search\", and \"toolbox_search_preview\".""" name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Optional user-defined name for this tool or configuration.""" description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) @@ -15633,125 +15631,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class WebIQPreviewTool(Tool, discriminator="web_iq_preview"): - """A WebIQ server-side tool. - - :ivar type: The object type, which is always 'web_iq_preview'. Required. WEB_IQ_PREVIEW. - :vartype type: str or ~azure.ai.projects.models.WEB_IQ_PREVIEW - :ivar project_connection_id: The ID of the WebIQ project connection. Required. - :vartype project_connection_id: str - :ivar server_label: The label of the WebIQ MCP server to connect to. - :vartype server_label: str - :ivar server_url: The URL of the WebIQ MCP server. If not provided, the URL from the project - connection will be used. - :vartype server_url: str - :ivar require_approval: Whether the agent requires approval before executing actions. Default - is always. Is either a MCPToolRequireApproval type or a str type. - :vartype require_approval: ~azure.ai.projects.models.MCPToolRequireApproval or str - """ - - type: Literal[ToolType.WEB_IQ_PREVIEW] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """The object type, which is always 'web_iq_preview'. Required. WEB_IQ_PREVIEW.""" - project_connection_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The ID of the WebIQ project connection. Required.""" - server_label: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The label of the WebIQ MCP server to connect to.""" - server_url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The URL of the WebIQ MCP server. If not provided, the URL from the project connection will be - used.""" - require_approval: Optional[Union["_models.MCPToolRequireApproval", str]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Whether the agent requires approval before executing actions. Default is always. Is either a - MCPToolRequireApproval type or a str type.""" - - @overload - def __init__( - self, - *, - project_connection_id: str, - server_label: Optional[str] = None, - server_url: Optional[str] = None, - require_approval: Optional[Union["_models.MCPToolRequireApproval", str]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - self.type = ToolType.WEB_IQ_PREVIEW # type: ignore - - -class WebIQPreviewToolboxTool(ToolboxTool, discriminator="web_iq_preview"): - """A WebIQ tool stored in a toolbox. - - :ivar name: Optional user-defined name for this tool or configuration. - :vartype name: str - :ivar description: Optional user-defined description for this tool or configuration. - :vartype description: str - :ivar tool_configs: Per-tool configuration map. Keys are tool names or ``*`` (catch-all - default). Resolution order: exact tool name match takes priority over ``*``. Unknown tool names - are silently ignored at runtime. - :vartype tool_configs: dict[str, ~azure.ai.projects.models.ToolConfig] - :ivar type: Required. WEB_IQ_PREVIEW. - :vartype type: str or ~azure.ai.projects.models.WEB_IQ_PREVIEW - :ivar project_connection_id: The ID of the WebIQ project connection. Required. - :vartype project_connection_id: str - :ivar server_label: The label of the WebIQ MCP server to connect to. - :vartype server_label: str - :ivar server_url: The URL of the WebIQ MCP server. If not provided, the URL from the project - connection will be used. - :vartype server_url: str - :ivar require_approval: Whether the agent requires approval before executing actions. Default - is always. Is either a MCPToolRequireApproval type or a str type. - :vartype require_approval: ~azure.ai.projects.models.MCPToolRequireApproval or str - """ - - type: Literal[ToolboxToolType.WEB_IQ_PREVIEW] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """Required. WEB_IQ_PREVIEW.""" - project_connection_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The ID of the WebIQ project connection. Required.""" - server_label: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The label of the WebIQ MCP server to connect to.""" - server_url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The URL of the WebIQ MCP server. If not provided, the URL from the project connection will be - used.""" - require_approval: Optional[Union["_models.MCPToolRequireApproval", str]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Whether the agent requires approval before executing actions. Default is always. Is either a - MCPToolRequireApproval type or a str type.""" - - @overload - def __init__( - self, - *, - project_connection_id: str, - name: Optional[str] = None, - description: Optional[str] = None, - tool_configs: Optional[dict[str, "_models.ToolConfig"]] = None, - server_label: Optional[str] = None, - server_url: Optional[str] = None, - require_approval: Optional[Union["_models.MCPToolRequireApproval", str]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - self.type = ToolboxToolType.WEB_IQ_PREVIEW # type: ignore - - class WebSearchApproximateLocation(_Model): """Web search approximate location. diff --git a/sdk/ai/azure-ai-projects/samples/agents/optimization/sample_optimization_job_basic_polling.py b/sdk/ai/azure-ai-projects/samples/agents/optimization/sample_optimization_job_basic_polling.py index 8867a928a1ea..0e1bdbacc9dc 100644 --- a/sdk/ai/azure-ai-projects/samples/agents/optimization/sample_optimization_job_basic_polling.py +++ b/sdk/ai/azure-ai-projects/samples/agents/optimization/sample_optimization_job_basic_polling.py @@ -135,4 +135,4 @@ def capture_created_job(response): f" | avg_tokens={candidate.avg_tokens:.0f}" ) if candidate.eval_id: - print(f" eval_id={candidate.eval_id}") \ No newline at end of file + print(f" eval_id={candidate.eval_id}") diff --git a/sdk/ai/azure-ai-projects/samples/agents/optimization/sample_optimization_job_basic_polling_async.py b/sdk/ai/azure-ai-projects/samples/agents/optimization/sample_optimization_job_basic_polling_async.py index 10f7f6dff7c1..d49bba940b1f 100644 --- a/sdk/ai/azure-ai-projects/samples/agents/optimization/sample_optimization_job_basic_polling_async.py +++ b/sdk/ai/azure-ai-projects/samples/agents/optimization/sample_optimization_job_basic_polling_async.py @@ -146,4 +146,4 @@ def capture_created_job_response( if __name__ == "__main__": - asyncio.run(main()) \ No newline at end of file + asyncio.run(main()) diff --git a/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_for_finetuning.py b/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_for_finetuning.py index fc9c3f6bda46..c75d34c6f65b 100644 --- a/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_for_finetuning.py +++ b/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_for_finetuning.py @@ -180,11 +180,7 @@ # `train_split=0.8` produces two Azure OpenAI files: a training partition # and a validation partition. Both are emitted as FileDataGenerationJobOutput # entries in `job_result.outputs`. - file_outputs = [ - output - for output in (job_result.outputs or []) - if isinstance(output, FileDataGenerationJobOutput) - ] + file_outputs = [output for output in (job_result.outputs or []) if isinstance(output, FileDataGenerationJobOutput)] if not file_outputs: raise RuntimeError("The data generation job did not produce any file outputs.") diff --git a/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_with_agent_source.py b/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_with_agent_source.py index 3bf7fcad70ac..7a27dec16ebd 100644 --- a/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_with_agent_source.py +++ b/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_with_agent_source.py @@ -161,7 +161,8 @@ ) print("Creating data generation job and waiting for completion (polling is handled by the SDK)...") job_result = project_client.beta.datasets.begin_create_generation_job( - job=job, polling_interval=poll_interval_seconds, + job=job, + polling_interval=poll_interval_seconds, ).result() # Locate the Dataset output produced by the job. diff --git a/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_with_file_source.py b/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_with_file_source.py index c01d3d3bc5b2..44ee1e5b29fa 100644 --- a/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_with_file_source.py +++ b/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_with_file_source.py @@ -153,7 +153,9 @@ # - The File source contributes the source material (the reference # document uploaded above). # - The Prompt source contributes a steering instruction (difficulty). - print("Creating multi-source data generation job (File + Prompt) and waiting for completion (polling is handled by the SDK)...") + print( + "Creating multi-source data generation job (File + Prompt) and waiting for completion (polling is handled by the SDK)..." + ) job_result = project_client.beta.datasets.begin_create_generation_job( job=DataGenerationJob( inputs=DataGenerationJobInputs( diff --git a/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_with_prompt_source.py b/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_with_prompt_source.py index 1df29c5ad048..7db76b290cac 100644 --- a/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_with_prompt_source.py +++ b/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_with_prompt_source.py @@ -79,6 +79,7 @@ dataset_name = os.environ.get("DATASET_NAME", "dataset-generation-eval-sample") poll_interval_seconds = int(os.environ.get("POLL_INTERVAL_SECONDS", "10")) + def main() -> None: with ( DefaultAzureCredential() as credential, @@ -118,7 +119,8 @@ def main() -> None: ) print("Creating data generation job and waiting for completion (polling is handled by the SDK)...") job_result = project_client.beta.datasets.begin_create_generation_job( - job=job, polling_interval=poll_interval_seconds, + job=job, + polling_interval=poll_interval_seconds, ).result() # Locate the Dataset output produced by the job. diff --git a/sdk/ai/azure-ai-projects/samples/evaluations/sample_rubric_evaluator_generation_lifecycle.py b/sdk/ai/azure-ai-projects/samples/evaluations/sample_rubric_evaluator_generation_lifecycle.py index 7b94b7f6154c..d48a007729de 100644 --- a/sdk/ai/azure-ai-projects/samples/evaluations/sample_rubric_evaluator_generation_lifecycle.py +++ b/sdk/ai/azure-ai-projects/samples/evaluations/sample_rubric_evaluator_generation_lifecycle.py @@ -107,8 +107,10 @@ # the produced EvaluatorVersion once the job reaches a terminal state. print("Waiting for the generation job to complete (polling is handled by the SDK)...") evaluator: EvaluatorVersion = poller.result() - print(f"Generated evaluator `{evaluator.name}` version `{evaluator.version}` " - f"(job `{evaluator.generation_job_id}`).") + print( + f"Generated evaluator `{evaluator.name}` version `{evaluator.version}` " + f"(job `{evaluator.generation_job_id}`)." + ) # Verify the idempotency: the replay poller resolves to the same underlying job. replay_evaluator: EvaluatorVersion = replay_poller.result() diff --git a/sdk/ai/azure-ai-projects/tsp-location.yaml b/sdk/ai/azure-ai-projects/tsp-location.yaml index a96731921024..91c4a5456ac9 100644 --- a/sdk/ai/azure-ai-projects/tsp-location.yaml +++ b/sdk/ai/azure-ai-projects/tsp-location.yaml @@ -1,5 +1,5 @@ directory: specification/ai-foundry/data-plane/Foundry/src/sdk-python-js-azure-ai-projects -commit: bc7302016000ed24f19c7108bffdeb1f73328cb0 +commit: 5f1334500df34faa63e0255a18f3072b0219cebe repo: Azure/azure-rest-api-specs additionalDirectories: - specification/ai-foundry/data-plane/Foundry/src/agents From 0d65d14ab5ff7842b1de493bae655ed4baaa7bee Mon Sep 17 00:00:00 2001 From: Darren Cohen <39422044+dargilco@users.noreply.github.com> Date: Fri, 24 Jul 2026 09:31:08 -0700 Subject: [PATCH 10/15] update report --- .../azure-ai-projects/docs/public-methods.md | 6 +-- .../docs/tool-classes-removed-properties.md | 43 ------------------- 2 files changed, 3 insertions(+), 46 deletions(-) delete mode 100644 sdk/ai/azure-ai-projects/docs/tool-classes-removed-properties.md diff --git a/sdk/ai/azure-ai-projects/docs/public-methods.md b/sdk/ai/azure-ai-projects/docs/public-methods.md index 4aeda5b8802e..66716e015430 100644 --- a/sdk/ai/azure-ai-projects/docs/public-methods.md +++ b/sdk/ai/azure-ai-projects/docs/public-methods.md @@ -126,13 +126,13 @@ Alphabetically sorted. An asterisk at the end of the method name means is a hand ``` .beta.agents.cancel_optimization_job -.beta.agents.create_optimization_job +.beta.agents.begin_create_optimization_job .beta.agents.delete_optimization_job .beta.agents.get_optimization_job .beta.agents.list_optimization_jobs .beta.datasets.cancel_generation_job -.beta.datasets.create_generation_job +.beta.datasets.begin_create_generation_job .beta.datasets.delete_generation_job .beta.datasets.get_generation_job .beta.datasets.list_generation_jobs @@ -144,7 +144,7 @@ Alphabetically sorted. An asterisk at the end of the method name means is a hand .beta.evaluation_taxonomies.update .beta.evaluators.cancel_generation_job -.beta.evaluators.create_generation_job +.beta.evaluators.begin_create_generation_job .beta.evaluators.create_version .beta.evaluators.delete_generation_job .beta.evaluators.delete_version diff --git a/sdk/ai/azure-ai-projects/docs/tool-classes-removed-properties.md b/sdk/ai/azure-ai-projects/docs/tool-classes-removed-properties.md deleted file mode 100644 index 7a0f4e3ebd2d..000000000000 --- a/sdk/ai/azure-ai-projects/docs/tool-classes-removed-properties.md +++ /dev/null @@ -1,43 +0,0 @@ -# Tool Classes: Removed Properties (v2.2.0 → v2.3.0) - -The following Tool-derived classes had properties **removed** in v2.3.0 compared to v2.2.0. These properties (`name`, `description`, `tool_configs`) now only exist on the corresponding `ToolboxTool` subclasses. - -## General Availability Tools - -| Class Name | Removed Properties | -|------------|-------------------| -| `AzureAISearchTool` | `name: Optional[str]`, `description: Optional[str]`, `tool_configs: Optional[dict[str, ToolConfig]]` | -| `AzureFunctionTool` | `tool_configs: Optional[dict[str, ToolConfig]]` | -| `BingGroundingTool` | `name: Optional[str]`, `description: Optional[str]`, `tool_configs: Optional[dict[str, ToolConfig]]` | -| `CaptureStructuredOutputsTool` | `name: Optional[str]`, `description: Optional[str]`, `tool_configs: Optional[dict[str, ToolConfig]]` | -| `CodeInterpreterTool` | `name: Optional[str]`, `description: Optional[str]`, `tool_configs: Optional[dict[str, ToolConfig]]` | -| `FileSearchTool` | `name: Optional[str]`, `description: Optional[str]`, `tool_configs: Optional[dict[str, ToolConfig]]` | -| `FunctionShellToolParam` | `name: Optional[str]`, `description: Optional[str]`, `tool_configs: Optional[dict[str, ToolConfig]]` | -| `FunctionTool` | *(no changes)* | -| `ImageGenTool` | `name: Optional[str]`, `description: Optional[str]`, `tool_configs: Optional[dict[str, ToolConfig]]` | -| `LocalShellToolParam` | `name: Optional[str]`, `description: Optional[str]`, `tool_configs: Optional[dict[str, ToolConfig]]` | -| `MCPTool` | `tool_configs: Optional[dict[str, ToolConfig]]` | -| `OpenApiTool` | `tool_configs: Optional[dict[str, ToolConfig]]` | -| `WebSearchTool` | `name: Optional[str]`, `description: Optional[str]`, `tool_configs: Optional[dict[str, ToolConfig]]` | -v -## Preview Tools - -| Class Name | Removed Properties | -|------------|-------------------| -| `A2APreviewTool` | `name: Optional[str]`, `description: Optional[str]`, `tool_configs: Optional[dict[str, ToolConfig]]` | -| `BingCustomSearchPreviewTool` | `name: Optional[str]`, `description: Optional[str]`, `tool_configs: Optional[dict[str, ToolConfig]]` | -| `BrowserAutomationPreviewTool` | `name: Optional[str]`, `description: Optional[str]`, `tool_configs: Optional[dict[str, ToolConfig]]` | -| `ComputerUsePreviewTool` | *(no changes)* | -| `FabricIQPreviewTool` | `name: Optional[str]`, `description: Optional[str]`, `tool_configs: Optional[dict[str, ToolConfig]]` | -| `MemorySearchPreviewTool` | `name: Optional[str]`, `description: Optional[str]`, `tool_configs: Optional[dict[str, ToolConfig]]` | -| `MicrosoftFabricPreviewTool` | `name: Optional[str]`, `description: Optional[str]`, `tool_configs: Optional[dict[str, ToolConfig]]` | -| `SharepointPreviewTool` | `name: Optional[str]`, `description: Optional[str]`, `tool_configs: Optional[dict[str, ToolConfig]]` | -| `ToolboxSearchPreviewTool` | `name: Optional[str]`, `description: Optional[str]`, `tool_configs: Optional[dict[str, ToolConfig]]` | -| `WebSearchPreviewTool` | *(no changes)* | -| `WorkIQPreviewTool` | `name: Optional[str]`, `description: Optional[str]`, `tool_configs: Optional[dict[str, ToolConfig]]` | - -## Summary - -- **Total Tool classes analyzed:** 24 -- **Classes with removed properties:** 19 -- **Common pattern:** `name`, `description`, and `tool_configs` were moved exclusively to `ToolboxTool` subclasses From 695e62b161edd40a6dd623b4b022c3454ab5cff5 Mon Sep 17 00:00:00 2001 From: Darren Cohen <39422044+dargilco@users.noreply.github.com> Date: Fri, 24 Jul 2026 13:14:09 -0700 Subject: [PATCH 11/15] Updates in prep for a release of 2.4.0 (#48248) --- .../SKILL.md | 9 ++++---- .../SKILL.md | 2 +- sdk/ai/azure-ai-projects/CHANGELOG.md | 21 ++++++++++++------- sdk/ai/azure-ai-projects/README.md | 3 +-- ...eration_job_simpleqna_with_agent_source.py | 1 - ...et_generation_job_traces_for_finetuning.py | 5 ----- ...ple_routines_with_teams_message_trigger.py | 4 ++-- .../sample_toolbox_with_skill.py | 1 - 8 files changed, 23 insertions(+), 23 deletions(-) diff --git a/sdk/ai/azure-ai-projects/.github/skills/azure-ai-projects-emit-from-typespec/SKILL.md b/sdk/ai/azure-ai-projects/.github/skills/azure-ai-projects-emit-from-typespec/SKILL.md index 1ee8a63a76aa..7562974dc92a 100644 --- a/sdk/ai/azure-ai-projects/.github/skills/azure-ai-projects-emit-from-typespec/SKILL.md +++ b/sdk/ai/azure-ai-projects/.github/skills/azure-ai-projects-emit-from-typespec/SKILL.md @@ -34,6 +34,7 @@ Run these checks in order: Run: ``` +pwsh --version git --version gh --version python --version @@ -94,15 +95,15 @@ gh auth login Run: ``` -git config --global user.name -git config --global user.email +git config user.name +git config user.email ``` If either value is empty, stop and ask the user to run: ``` -git config --global user.name "" -git config --global user.email "" +git config user.name "" +git config user.email "" ``` ### 1f. Confirm repository is clean diff --git a/sdk/ai/azure-ai-projects/.github/skills/azure-ai-projects-update-changelog/SKILL.md b/sdk/ai/azure-ai-projects/.github/skills/azure-ai-projects-update-changelog/SKILL.md index eeb810776294..297c15893e93 100644 --- a/sdk/ai/azure-ai-projects/.github/skills/azure-ai-projects-update-changelog/SKILL.md +++ b/sdk/ai/azure-ai-projects/.github/skills/azure-ai-projects-update-changelog/SKILL.md @@ -56,7 +56,7 @@ From the JSON response: Check if CHANGELOG.md already has a section for the current version: - If there's a section `## {CURRENT_VERSION} (Unreleased)` — we will update it -- If there's a section `## {CURRENT_VERSION} (YYYY-MM-DD)` with an actual date — the version is already released, report this to the user and stop +- If there's a section `## {CURRENT_VERSION} (YYYY-MM-DD)` with an actual date. If the date is in the past, then this version is already released, report this to the user and stop. If it's today's date, we will update it. - If there's no section for `CURRENT_VERSION` — we will create a new one --- diff --git a/sdk/ai/azure-ai-projects/CHANGELOG.md b/sdk/ai/azure-ai-projects/CHANGELOG.md index 024d828ea590..7c87a43664f4 100644 --- a/sdk/ai/azure-ai-projects/CHANGELOG.md +++ b/sdk/ai/azure-ai-projects/CHANGELOG.md @@ -1,18 +1,25 @@ # Release History -## 2.4.0 (Unreleased) +## 2.4.0 (2026-07-24) ### Features Added -* Placeholder +* New stable toolbox tool `ToolSearchToolboxTool` (discriminator `toolbox_search`) for storing a tool-search tool in a toolbox. +This replaces `ToolboxSearchPreviewToolboxTool`, which is still present but will be removed in a future release of the package. Please migrate your code to use the stable tool. +* New class `TaskGenerationDataGenerationJobOptions` (discriminator `task_generation`) with data generation job options for multi-turn evaluation scenarios. +* Support for non-fatal input-quality advisories from rubric evaluator generation. See new class `RubricGenerationInputQualityWarning` and new enums `RubricGenerationInputQualityWarningCode`, `RubricGenerationInputQualityWarningSeverity`, and `RubricGenerationInputQualityWarningSource`. +* New enum `GenerationWarningType`. +* New enum `AgentIdentityStatus` and new optional `status` property on class `AgentIdentity`. +* New read-only property `input_quality_warnings` on class `EvaluatorGenerationJob`. +* New read-only properties `generation_job_id` and `warnings` on class `EvaluatorVersion`. +* New optional property `max_stalls` on class `OptimizationOptions`. ### Breaking Changes -* Placeholder - -### Bugs Fixed - -* Placeholder +Breaking changes in beta methods: +* Method `.beta.evaluators.create_generation_job` renamed to `.beta.evaluators.begin_create_generation_job` and is now a long-running operation returning `LROPoller[EvaluatorVersion]` (previously returned `EvaluatorGenerationJob`). +* Method `.beta.datasets.create_generation_job` renamed to `.beta.datasets.begin_create_generation_job` and is now a long-running operation returning `LROPoller[DataGenerationJobResult]`. +* Method `.beta.agents.create_optimization_job` renamed to `.beta.agents.begin_create_optimization_job` and is now a long-running operation returning `LROPoller[OptimizationJobResult]`. ### Sample updates diff --git a/sdk/ai/azure-ai-projects/README.md b/sdk/ai/azure-ai-projects/README.md index ff4feb4c87c5..da4f812a1b7e 100644 --- a/sdk/ai/azure-ai-projects/README.md +++ b/sdk/ai/azure-ai-projects/README.md @@ -24,9 +24,8 @@ resources in your [Microsoft Foundry](https://ai.azure.com/) Project. Use it to: * Model Context Protocol (MCP) * OpenAPI * Reminder Tool (Preview) - * Toolbox Search (Preview) + * Toolbox Search * Web Search - * Web Search (Preview) * Work IQ (Preview) * **Get an OpenAI client** using `.get_openai_client()` method to run Responses, Conversations, Evaluations and Fine-Tuning operations with your Agent. * **Create and version toolboxes** that bundle collections of tools and skills for your agents, using `.toolboxes` operations. diff --git a/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_with_agent_source.py b/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_with_agent_source.py index 7a27dec16ebd..984e7041f228 100644 --- a/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_with_agent_source.py +++ b/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_simpleqna_with_agent_source.py @@ -53,7 +53,6 @@ """ import os -import time import uuid from datetime import datetime, timezone diff --git a/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_traces_for_finetuning.py b/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_traces_for_finetuning.py index f7e0b6efa15c..114e6c99fa35 100644 --- a/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_traces_for_finetuning.py +++ b/sdk/ai/azure-ai-projects/samples/datasets/sample_dataset_generation_job_traces_for_finetuning.py @@ -53,7 +53,6 @@ DataGenerationJobOutputOptions, DataGenerationJobScenario, FileDataGenerationJobOutput, - JobStatus, PromptAgentDefinition, TracesDataGenerationJobOptions, TracesDataGenerationJobSource, @@ -95,9 +94,6 @@ output_name = f"{DATASET_NAME}-{run_id}" agent_name = f"{DATASET_NAME}-{run_id}" -TERMINAL_STATUSES = {JobStatus.SUCCEEDED, JobStatus.FAILED, JobStatus.CANCELLED} - - with ( DefaultAzureCredential() as credential, AIProjectClient(endpoint=endpoint, credential=credential) as project_client, @@ -106,7 +102,6 @@ created_agent = None created_conversation_ids: List[str] = [] - submitted_job_ids: List[str] = [] created_file_ids: List[str] = [] try: diff --git a/sdk/ai/azure-ai-projects/samples/hosted_agents/sample_routines_with_teams_message_trigger.py b/sdk/ai/azure-ai-projects/samples/hosted_agents/sample_routines_with_teams_message_trigger.py index e99fbd1c8091..bf7daba193a9 100644 --- a/sdk/ai/azure-ai-projects/samples/hosted_agents/sample_routines_with_teams_message_trigger.py +++ b/sdk/ai/azure-ai-projects/samples/hosted_agents/sample_routines_with_teams_message_trigger.py @@ -27,7 +27,7 @@ Before running the sample: - pip install "azure-ai-projects>=2.2.0" python-dotenv + pip install "azure-ai-projects>=2.3.0" python-dotenv Set these environment variables with your own values: 1) FOUNDRY_PROJECT_ENDPOINT - The Azure AI Project endpoint, as found in the Overview @@ -88,7 +88,7 @@ def parse_teams_channel_url(channel_url: str) -> tuple[str | None, str | None]: endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"] agent_name = os.environ.get("FOUNDRY_HOSTED_AGENT_NAME", "MyHostedAgent") model_name = os.environ["FOUNDRY_MODEL_NAME"] -teams_connection_name = os.environ["TEAMS_CONNECTION_NAME"] +teams_connection_name = os.environ.get("TEAMS_CONNECTION_NAME", "teams-conn") teams_channel_url = os.environ["TEAMS_CHANNEL_URL"] teams_group_id, teams_channel_id = parse_teams_channel_url(teams_channel_url) poll_interval_seconds = int(os.environ.get("POLL_INTERVAL_SECONDS", "10")) diff --git a/sdk/ai/azure-ai-projects/samples/hosted_agents/sample_toolbox_with_skill.py b/sdk/ai/azure-ai-projects/samples/hosted_agents/sample_toolbox_with_skill.py index 6a57288454f6..4c749adecdb6 100644 --- a/sdk/ai/azure-ai-projects/samples/hosted_agents/sample_toolbox_with_skill.py +++ b/sdk/ai/azure-ai-projects/samples/hosted_agents/sample_toolbox_with_skill.py @@ -35,7 +35,6 @@ """ import os -import sys from pathlib import Path from dotenv import load_dotenv From ae8d6054bb8b13de34fbc93db4d056e3bb49805b Mon Sep 17 00:00:00 2001 From: Darren Cohen <39422044+dargilco@users.noreply.github.com> Date: Fri, 24 Jul 2026 13:15:30 -0700 Subject: [PATCH 12/15] Update rename tsp-location.yaml, so it does not break release build --- .../{tsp-location.yaml => tsp-location.yaml.saved} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sdk/ai/azure-ai-projects/{tsp-location.yaml => tsp-location.yaml.saved} (100%) diff --git a/sdk/ai/azure-ai-projects/tsp-location.yaml b/sdk/ai/azure-ai-projects/tsp-location.yaml.saved similarity index 100% rename from sdk/ai/azure-ai-projects/tsp-location.yaml rename to sdk/ai/azure-ai-projects/tsp-location.yaml.saved From 350e3559d33809d2fe9573d530d4f9e6bf7ae746 Mon Sep 17 00:00:00 2001 From: Howie Leung Date: Fri, 24 Jul 2026 13:26:35 -0700 Subject: [PATCH 13/15] change log (#48246) --- sdk/ai/azure-ai-projects/CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sdk/ai/azure-ai-projects/CHANGELOG.md b/sdk/ai/azure-ai-projects/CHANGELOG.md index 7c87a43664f4..2733f0bbaa96 100644 --- a/sdk/ai/azure-ai-projects/CHANGELOG.md +++ b/sdk/ai/azure-ai-projects/CHANGELOG.md @@ -23,6 +23,8 @@ Breaking changes in beta methods: ### Sample updates +* Added new optimization polling samples `sample_optimization_job_basic_polling.py` and `sample_optimization_job_basic_polling_async.py` under `samples/agents/optimization/`. +* Added new evaluation samples `sample_endpoint_evaluator_with_api_key.py` and `sample_endpoint_evaluator_with_entra_id.py` under `samples/evaluations/`. * Added new Hosted Agent sample `sample_agent_user_identity_isolation.py` under `samples/hosted_agents/`, demonstrating per-user response-chain isolation with delegated end-user identities sent in the `x-ms-user-identity` header. * Added new Hosted Agent routine samples `sample_routines_with_github_issue_trigger.py` and `sample_routines_with_teams_message_trigger.py`, demonstrating GitHub issue and Microsoft Teams channel-message triggers for routines backed by a temporary Hosted Agent version. * Added new Hosted Agent sample `sample_toolbox_with_reminder_preview.py` under `samples/hosted_agents/`, demonstrating a Reminder Preview toolbox tool wired through a Foundry Toolbox MCP endpoint. @@ -30,6 +32,7 @@ Breaking changes in beta methods: * Renamed the Hosted Agent image-based creation samples from `sample_create_hosted_agent.py` and `sample_create_hosted_agent_async.py` to `sample_create_hosted_agent_from_image.py` and `sample_create_hosted_agent_from_image_async.py`. * Relocated Hosted Agent routine trigger samples `sample_routines_with_dispatch.py`, `sample_routines_with_schedule_trigger.py`, and `sample_routines_with_timer_trigger.py` from `samples/routines/` to `samples/hosted_agents/`. * Removed Hosted Agent endpoint samples `sample_agent_endpoint.py` and `sample_agent_endpoint_async.py`. +* Removed routine sample `samples/routines/sample_routines_crud.py`. * Removed prompt-agent toolbox skill sample `samples/agents/tools/sample_agent_toolbox_skill.py` because skill-in-toolbox is not yet supported in Prompt Agents. * Updated Hosted Agent toolbox samples to create temporary Hosted Agent versions for execution flows, assign Azure AI User RBAC before invoking Toolbox MCP endpoints, restore the prior endpoint, and clean up temporary resources during teardown. From d68f0da44d44418d54f31dda60a25de8a7228043 Mon Sep 17 00:00:00 2001 From: Howie Leung Date: Fri, 24 Jul 2026 14:28:54 -0700 Subject: [PATCH 14/15] Add sample toolboxes for synchronous and asynchronous AIProjectClient usage; update assets.json tag --- sdk/ai/azure-ai-projects/CHANGELOG.md | 1 + sdk/ai/azure-ai-projects/assets.json | 2 +- ...iew.py => sample_toolboxes_with_search.py} | 8 +++---- ... => sample_toolboxes_with_search_async.py} | 8 +++---- .../sample_toolbox_with_skill.py | 4 ++-- .../tests/samples/test_samples.py | 23 +++++++++---------- 6 files changed, 23 insertions(+), 23 deletions(-) rename sdk/ai/azure-ai-projects/samples/agents/tools/{sample_toolboxes_with_search_preview.py => sample_toolboxes_with_search.py} (94%) rename sdk/ai/azure-ai-projects/samples/agents/tools/{sample_toolboxes_with_search_preview_async.py => sample_toolboxes_with_search_async.py} (95%) diff --git a/sdk/ai/azure-ai-projects/CHANGELOG.md b/sdk/ai/azure-ai-projects/CHANGELOG.md index 2733f0bbaa96..22ae9928800a 100644 --- a/sdk/ai/azure-ai-projects/CHANGELOG.md +++ b/sdk/ai/azure-ai-projects/CHANGELOG.md @@ -29,6 +29,7 @@ Breaking changes in beta methods: * Added new Hosted Agent routine samples `sample_routines_with_github_issue_trigger.py` and `sample_routines_with_teams_message_trigger.py`, demonstrating GitHub issue and Microsoft Teams channel-message triggers for routines backed by a temporary Hosted Agent version. * Added new Hosted Agent sample `sample_toolbox_with_reminder_preview.py` under `samples/hosted_agents/`, demonstrating a Reminder Preview toolbox tool wired through a Foundry Toolbox MCP endpoint. * Updated Hosted Agent toolbox asset `samples/hosted_agents/assets/toolbox-agent/main.py` to use `FoundryToolbox` and `as_skills_provider()` for toolbox MCP skill discovery and wiring, replacing the earlier manual MCP session, auth, and HTTP client setup. +* Renamed toolbox tool-search samples `sample_toolboxes_with_search_preview.py` and `sample_toolboxes_with_search_preview_async.py` to `sample_toolboxes_with_search.py` and `sample_toolboxes_with_search_async.py`. * Renamed the Hosted Agent image-based creation samples from `sample_create_hosted_agent.py` and `sample_create_hosted_agent_async.py` to `sample_create_hosted_agent_from_image.py` and `sample_create_hosted_agent_from_image_async.py`. * Relocated Hosted Agent routine trigger samples `sample_routines_with_dispatch.py`, `sample_routines_with_schedule_trigger.py`, and `sample_routines_with_timer_trigger.py` from `samples/routines/` to `samples/hosted_agents/`. * Removed Hosted Agent endpoint samples `sample_agent_endpoint.py` and `sample_agent_endpoint_async.py`. diff --git a/sdk/ai/azure-ai-projects/assets.json b/sdk/ai/azure-ai-projects/assets.json index 8aa3af13b87e..72ba85a709d4 100644 --- a/sdk/ai/azure-ai-projects/assets.json +++ b/sdk/ai/azure-ai-projects/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "python", "TagPrefix": "python/ai/azure-ai-projects", - "Tag": "python/ai/azure-ai-projects_f47dcaa04b" + "Tag": "python/ai/azure-ai-projects_4d4ddcf68b" } diff --git a/sdk/ai/azure-ai-projects/samples/agents/tools/sample_toolboxes_with_search_preview.py b/sdk/ai/azure-ai-projects/samples/agents/tools/sample_toolboxes_with_search.py similarity index 94% rename from sdk/ai/azure-ai-projects/samples/agents/tools/sample_toolboxes_with_search_preview.py rename to sdk/ai/azure-ai-projects/samples/agents/tools/sample_toolboxes_with_search.py index 44b4a41296d2..cc0bc3269510 100644 --- a/sdk/ai/azure-ai-projects/samples/agents/tools/sample_toolboxes_with_search_preview.py +++ b/sdk/ai/azure-ai-projects/samples/agents/tools/sample_toolboxes_with_search.py @@ -10,7 +10,7 @@ invoke it from a Prompt Agent using the synchronous AIProjectClient and the OpenAI-compatible client. - A toolbox version that includes 'ToolboxSearchPreviewTool' exposes only + A toolbox version that includes 'ToolSearchToolboxTool' exposes only two meta tools at its '/mcp' endpoint -- 'tool_search' and 'call_tool' -- and defers every other tool behind them. The agent uses an 'MCPTool' pointed at the toolbox's versioned '/mcp' URL to discover and invoke @@ -20,7 +20,7 @@ 'project_client.toolboxes'. USAGE: - python sample_toolboxes_with_search_preview.py + python sample_toolboxes_with_search.py Before running the sample: @@ -44,7 +44,7 @@ from azure.ai.projects.models import ( MCPTool, MCPToolboxTool, - ToolboxSearchPreviewToolboxTool, + ToolSearchToolboxTool, PromptAgentDefinition, ) @@ -75,7 +75,7 @@ toolbox_version = project_client.toolboxes.create_version( name=TOOLBOX_NAME, description=f"Toolbox with `{INNER_MCP_LABEL}` MCP server and tool search enabled.", - tools=[inner_mcp_tool, ToolboxSearchPreviewToolboxTool()], + tools=[inner_mcp_tool, ToolSearchToolboxTool()], ) print(f"Created toolbox `{TOOLBOX_NAME}` (version {toolbox_version.version}).") diff --git a/sdk/ai/azure-ai-projects/samples/agents/tools/sample_toolboxes_with_search_preview_async.py b/sdk/ai/azure-ai-projects/samples/agents/tools/sample_toolboxes_with_search_async.py similarity index 95% rename from sdk/ai/azure-ai-projects/samples/agents/tools/sample_toolboxes_with_search_preview_async.py rename to sdk/ai/azure-ai-projects/samples/agents/tools/sample_toolboxes_with_search_async.py index 34dc5af711de..c5694a779f7d 100644 --- a/sdk/ai/azure-ai-projects/samples/agents/tools/sample_toolboxes_with_search_preview_async.py +++ b/sdk/ai/azure-ai-projects/samples/agents/tools/sample_toolboxes_with_search_async.py @@ -10,7 +10,7 @@ invoke it from a Prompt Agent using the asynchronous AIProjectClient and the OpenAI-compatible client. - A toolbox version that includes 'ToolboxSearchPreviewTool' exposes only + A toolbox version that includes 'ToolSearchToolboxTool' exposes only two meta tools at its '/mcp' endpoint -- 'tool_search' and 'call_tool' -- and defers every other tool behind them. The agent uses an 'MCPTool' pointed at the toolbox's versioned '/mcp' URL to discover and invoke @@ -20,7 +20,7 @@ 'project_client.toolboxes'. USAGE: - python sample_toolboxes_with_search_preview_async.py + python sample_toolboxes_with_search_async.py Before running the sample: @@ -45,7 +45,7 @@ from azure.ai.projects.models import ( MCPTool, MCPToolboxTool, - ToolboxSearchPreviewToolboxTool, + ToolSearchToolboxTool, PromptAgentDefinition, ) @@ -77,7 +77,7 @@ async def main() -> None: toolbox_version = await project_client.toolboxes.create_version( name=TOOLBOX_NAME, description=f"Toolbox with `{INNER_MCP_LABEL}` MCP server and tool search enabled.", - tools=[inner_mcp_tool, ToolboxSearchPreviewToolboxTool()], + tools=[inner_mcp_tool, ToolSearchToolboxTool()], ) print(f"Created toolbox `{TOOLBOX_NAME}` (version {toolbox_version.version}).") diff --git a/sdk/ai/azure-ai-projects/samples/hosted_agents/sample_toolbox_with_skill.py b/sdk/ai/azure-ai-projects/samples/hosted_agents/sample_toolbox_with_skill.py index 4c749adecdb6..430f8fd0e46a 100644 --- a/sdk/ai/azure-ai-projects/samples/hosted_agents/sample_toolbox_with_skill.py +++ b/sdk/ai/azure-ai-projects/samples/hosted_agents/sample_toolbox_with_skill.py @@ -55,7 +55,7 @@ from azure.core.exceptions import ResourceNotFoundError from azure.ai.projects.models import ( SkillInlineContent, - ToolboxSearchPreviewToolboxTool, + ToolSearchToolboxTool, ToolboxSkillReference, ) @@ -105,7 +105,7 @@ def main() -> None: toolbox_version = project_client.toolboxes.create_version( name=TOOLBOX_NAME, description="Toolbox exposing a shipping-cost skill.", - tools=[ToolboxSearchPreviewToolboxTool()], + tools=[ToolSearchToolboxTool()], skills=[ToolboxSkillReference(name=skill_version.name, version=skill_version.version)], ) print(f"Created toolbox: {toolbox_version.name} version={toolbox_version.version}") diff --git a/sdk/ai/azure-ai-projects/tests/samples/test_samples.py b/sdk/ai/azure-ai-projects/tests/samples/test_samples.py index ad10b9f49b09..40f8a4d5a97e 100644 --- a/sdk/ai/azure-ai-projects/tests/samples/test_samples.py +++ b/sdk/ai/azure-ai-projects/tests/samples/test_samples.py @@ -181,18 +181,17 @@ def test_models_samples(self, sample_path: str, **kwargs) -> None: # fails the test). @servicePreparer() - # TODO: Howie to re-record this test. Darren is able to run the sample live fine, but when running live as a test, LLM validation part fails for some reason. - # @additionalSampleTests( - # [ - # AdditionalSampleTestDetail( - # test_id="sample_dataset_generation_job_simpleqna_with_prompt_source", - # sample_filename="sample_dataset_generation_job_simpleqna_with_prompt_source.py", - # env_vars={ - # "POLL_INTERVAL_SECONDS": "60", - # }, - # ), - # ] - # ) + @additionalSampleTests( + [ + AdditionalSampleTestDetail( + test_id="sample_dataset_generation_job_simpleqna_with_prompt_source", + sample_filename="sample_dataset_generation_job_simpleqna_with_prompt_source.py", + env_vars={ + "POLL_INTERVAL_SECONDS": "60", + }, + ), + ] + ) @pytest.mark.parametrize( "sample_path", get_sample_paths( From 2ffb3880f6504a5a38f9e0210080f074d029c712 Mon Sep 17 00:00:00 2001 From: Howie Leung Date: Fri, 24 Jul 2026 15:28:56 -0700 Subject: [PATCH 15/15] Comment out additional sample tests in TestSamples class --- .../tests/samples/test_samples.py | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sdk/ai/azure-ai-projects/tests/samples/test_samples.py b/sdk/ai/azure-ai-projects/tests/samples/test_samples.py index 40f8a4d5a97e..d7a9e0e886c6 100644 --- a/sdk/ai/azure-ai-projects/tests/samples/test_samples.py +++ b/sdk/ai/azure-ai-projects/tests/samples/test_samples.py @@ -181,17 +181,17 @@ def test_models_samples(self, sample_path: str, **kwargs) -> None: # fails the test). @servicePreparer() - @additionalSampleTests( - [ - AdditionalSampleTestDetail( - test_id="sample_dataset_generation_job_simpleqna_with_prompt_source", - sample_filename="sample_dataset_generation_job_simpleqna_with_prompt_source.py", - env_vars={ - "POLL_INTERVAL_SECONDS": "60", - }, - ), - ] - ) + # @additionalSampleTests( + # [ + # AdditionalSampleTestDetail( + # test_id="sample_dataset_generation_job_simpleqna_with_prompt_source", + # sample_filename="sample_dataset_generation_job_simpleqna_with_prompt_source.py", + # env_vars={ + # "POLL_INTERVAL_SECONDS": "60", + # }, + # ), + # ] + # ) @pytest.mark.parametrize( "sample_path", get_sample_paths(