Skip to content

Commit ab25447

Browse files
authored
[azure-ai-projects] Emit SDK from TypeSpec (models, routines sub-clients) (#47009)
1 parent d992c48 commit ab25447

24 files changed

Lines changed: 18437 additions & 7540 deletions

sdk/ai/azure-ai-projects/.github/skills/azure-ai-projects-emit-from-typespec/SKILL.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,17 @@ Note:
9191

9292
---
9393

94-
## Step 5: Commit and push
94+
## Step 5: Revert changes to file pyproject.toml
95+
96+
After the emit, there will be changes to `pyproject.toml` that are not needed. Revert any changes to `pyproject.toml` by running:
97+
98+
```
99+
git restore pyproject.toml
100+
```
101+
102+
---
103+
104+
## Step 6: Commit and push
95105

96106
Stage all changes (excluding file names that start with `.env`), commit, and push the topic branch:
97107

@@ -105,7 +115,7 @@ git push -u origin <topic-branch>
105115

106116
---
107117

108-
## Step 6: Run post-emitter fixes
118+
## Step 7: Run post-emitter fixes
109119

110120
After a successful emit, run the post-emitter fix script located in the `sdk/ai/azure-ai-projects` folder:
111121

@@ -119,7 +129,7 @@ This script applies azure-ai-projects-specific corrections to the emitted code (
119129

120130
---
121131

122-
## Step 7: Commit and push
132+
## Step 8: Commit and push
123133

124134
Stage all changes (excluding file names that start with `.env`), commit, and push the topic branch:
125135

@@ -133,7 +143,7 @@ git push -u origin <topic-branch>
133143

134144
---
135145

136-
## Step 8: Fix patched code related to preview feature headers
146+
## Step 9: Fix patched code related to preview feature headers
137147

138148
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:
139149

@@ -149,7 +159,7 @@ Important: Under the `azure\ai\projects` folder, you are only allowed to edit Py
149159

150160
---
151161

152-
## Step 9: Update samples and tests
162+
## Step 10: Update samples and tests
153163

154164
If there were any breaking changes in existing APIs, like class or method renames:
155165
* 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.
@@ -158,13 +168,13 @@ If there were any breaking changes in existing APIs, like class or method rename
158168

159169
---
160170

161-
## Step 10: Install package from sources
171+
## Step 11: Install package from sources
162172

163173
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.
164174

165175
---
166176

167-
## Step 11: Update CHANGELOG.md
177+
## Step 12: Update CHANGELOG.md
168178

169179
Use the **`azsdk-common-generate-sdk-locally`** skill's changelog capability (`azsdk_package_update_changelog_content`) to update `CHANGELOG.md` in the `sdk/ai/azure-ai-projects` folder with a summary of changes from the TypeSpec emit. Some guidelines to follow:
170180
* Start by examining the public SDK API surface of the latest released version of the azure-ai-projects package. The source code for this version can be found in the Main branch of the `azure-sdk-for-python` repository, in the folder `sdk\ai\azure-ai-projects`.
@@ -175,7 +185,7 @@ Use the **`azsdk-common-generate-sdk-locally`** skill's changelog capability (`a
175185

176186
---
177187

178-
## Step 12: Commit and push
188+
## Step 13: Commit and push
179189

180190
Stage all changes (excluding file names that start with `.env`), commit, and push the topic branch:
181191

@@ -189,7 +199,7 @@ git push -u origin <topic-branch>
189199

190200
---
191201

192-
## Step 13: Create a Pull Request
202+
## Step 14: Create a Pull Request
193203

194204
Create a draft PR from the **topic branch** to the **base branch** (recorded in Step 2):
195205

@@ -206,7 +216,7 @@ Open a new tab in the default browser and navigate to the PR URL.
206216

207217
---
208218

209-
## Step 14: Optionally run tests locally
219+
## Step 15: Optionally run tests locally
210220

211221
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)"
212222

sdk/ai/azure-ai-projects/CHANGELOG.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
11
# Release History
22

3-
## 2.3.0 (Unreleased)
3+
## 2.2.0 (Unreleased)
44

55
### Features Added
66

7-
* New Agent tool `FabricIQPreviewTool`.
8-
* New Agent tool `ToolboxSearchPreviewTool`.
9-
* New optional string properties `description` and `name` added to Agent tools which did not have them before.
7+
* Support integration of external Agents (in preview). See new `ExternalAgentDefinition` class.
8+
* New Agent tool in preview `FabricIQPreviewTool`.
9+
* New Agent tool in preview `ToolboxSearchPreviewTool`.
10+
* New optional string properties `description` and `name` added to Agent tools classes which did not have them before.
11+
* New optional `tool_configs` added to Agent tool classes.
1012
* New `.beta.datasets` sub-client with data generation job operations: `create_generation_job`, `get_generation_job`, `list_generation_jobs`, `cancel_generation_job`, `delete_generation_job`.
11-
* New evaluator generation job operations on `.beta.evaluators`: `create_generation_job`, `get_generation_job`, `list_generation_jobs`, `cancel_generation_job`, `delete_generation_job`.
12-
* New methods on `.beta.agents` sub-client for code-based hosted agents: `update_agent_from_code()`, `create_agent_version_from_code()`, `download_agent_version_code()`, `download_agent_code()`.
13+
* New `.beta.models` sub-client to handle AI model weights: `list_versions`, `list`, `get`, `delete`, `update`, `create_async`, `pending_upload`, `get_credentials`.
14+
* New `.beta.routines` sub-client with routine operations: `create_or_update`, `get`, `enable`, `disable`, `list`, `delete`, `list_runs`, `dispatch_async`.
15+
* New methods on `.beta.evaluators` for evaluator generation jobs: `create_generation_job`, `get_generation_job`, `list_generation_jobs`, `cancel_generation_job`, `delete_generation_job`.
16+
* New methods on `.beta.agents` for code-based hosted agents: `create_version_from_code`, `download_agent_code`.
17+
* New methods on `.beta.agents` for optimization jobs: `create_optimization_job`, `get_optimization_job`, `list_optimization_jobs`, `cancel_optimization_job`, `list_optimization_candidates`.
18+
* New methods on `.beta.memory_stores` to handle individual memory items:`.beta.memory_stores`: `get_memory`, `delete_memory`.
1319
* New read-only property `content_hash` on `CodeConfiguration`, returning the SHA-256 hex digest of the uploaded code zip.
20+
* New optional `force` parameter on `agents.delete` and `agents.delete_version` methods.
21+
* New optional `blueprint_reference` parameters on `agents.create_version` method.
22+
1423

1524
### Breaking Changes
1625

@@ -27,6 +36,8 @@ Breaking changes in beta classes:
2736
* Renamed class `SessionDirectoryListResponse` to `SessionDirectoryListResult`.
2837
* Renamed class `SessionFileWriteResponse` to `SessionFileWriteResult`.
2938
* Renamed class `SkillObject` to `SkillDetails`.
39+
* Renamed class `Target` to `EvaluationTarget`.
40+
* Renamed class `TargetConfig` to `RedTeamTargetConfig`.
3041
* Removed class `FabricIQPreviewToolParameters`.
3142
* Removed class `WorkIQPreviewToolParameters`.
3243

0 commit comments

Comments
 (0)