Commit 70bcd19
Update setup script and skills for Azure AI Content Understanding (#46618)
* Add setup script and GitHub Copilot skills for Azure AI Content Understanding SDK
- Created setup_user_env.sh for environment setup, including virtual environment creation, SDK installation, and .env configuration.
- Added sdk-common-knowledge skill for domain knowledge reference on Content Understanding concepts and SDK usage.
- Introduced sdk-py-sample-run skill to guide users in running specific samples interactively.
- Implemented run_sample.sh script to facilitate running sync and async samples with user prompts and error handling.
- Updated README.md to include information about new skills and usage instructions for GitHub Copilot.
* Update REST API Reference link in SKILL.md
* Rename skill from sdk-py-setup to cu-sdk-setup and update script path in SKILL.md
* Update SKILL.md and run_sample.sh to reference cu-sdk-setup instead of sdk-py-setup
* Update SKILL.md files to enhance clarity and detail for SDK setup and usage
Co-authored-by: Copilot <copilot@github.com>
* Update SKILL.md to remove outdated sections and add related skills for improved guidance
Co-authored-by: Copilot <copilot@github.com>
* Add SKILL.md files for cu-sdk-common-knowledge and cu-sdk-py-sample-run with detailed guidance and sample execution instructions
Co-authored-by: Copilot <copilot@github.com>
* Update skill references in README.md for consistency and clarity
* Add cu-sdk-sample-run skill and update related documentation
- Introduced `cu-sdk-sample-run` skill to guide users in running specific samples interactively.
- Updated `SKILL.md` for `cu-sdk-common-knowledge` and `cu-sdk-setup` to include references to the new skill.
- Corrected skill name in README and adjusted example prompts accordingly.
Co-authored-by: Copilot <copilot@github.com>
* Enhance setup scripts for Azure AI Content Understanding SDK with Python version checks and model deployment probing
Co-authored-by: Copilot <copilot@github.com>
* Enhance Python environment setup guidance for Windows users in SKILL.md and setup_user_env.ps1
Co-authored-by: Copilot <copilot@github.com>
* Enhance Python installation prompts and dependency checks in setup scripts for Azure AI Content Understanding SDK
Co-authored-by: Copilot <copilot@github.com>
* Soften runtime wording for sample_analyze_url.py per PR feedback
* Add inline cspell:ignore directive in setup_user_env.sh for pyver/esac
* Add Python SDK resources and helper script documentation to SKILL.md
* Update SKILL.md to correct link for creating custom analyzer to Python programming language
Co-authored-by: Copilot <copilot@github.com>
* Fix Copilot review comments on cu-sdk-setup scripts
- setup_user_env.sh L374: remove stray trailing 'gpt41mini' token from the
read fallback. With 'set -e', running the script non-interactively (or
hitting EOF) would treat the token as a command and abort the script.
- setup_user_env.ps1 Set-EnvValue: switch [regex]::Replace to a
MatchEvaluator script block so values containing regex replacement
metacharacters (\, \$&, \$\$, \, \\) are written to .env literally.
Affects user-supplied API keys and endpoints that may contain '\$'.
* [CU SDK] Improve cu-sdk-sample-run skill alignment and workflow
SKILL.md:
- Add 4 missing alignment items (1 sample, 4 env vars) to match net/java/js
- Restructure Workflow into 5 steps: Navigate, Activate, Choose, Configure, Run
- Move sample selection (Step 3) before sample-specific configuration (Step 4)
- Reorder Step 4 subsections: training data option (A/B) before local files
- Add sample_create_analyzer_with_labels to Step 3 quick list
- Fix Troubleshooting cross-references (Step 3 -> Step 4)
- Tighten gating language on conditional [ASK USER] prompts
run_sample.sh:
- Add --help / -h and --list / -l flags (mirrors Java/JS pattern)
* [CU SDK] Enhance sample_create_analyzer_with_labels functionality and add demo mode warnings
Co-authored-by: Copilot <copilot@github.com>
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Address Copilot review: load .env in run_sample.sh, async test uses local PDF
* Refactor load_env_file function to use consistent variable naming for environment file
Co-authored-by: Copilot <copilot@github.com>
* Fix mypy errors in sample_create_analyzer_with_labels
- Annotate knowledge_sources as list[KnowledgeSource] to avoid list invariance issue when passing list[LabeledDataKnowledgeSource] to ContentAnalyzer.knowledge_sources
- Use StringField.value_string (the underlying generated attribute) instead of the .value property which mypy does not see through the _patch.py TYPE_CHECKING redefinition
* Fix test_sample_grant_copy_auth playback failure by stripping trailing slash from target endpoint
---------
Co-authored-by: Changjian Wang <v-changjwang@microsoft.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: aluneth <wangchangjian1130@163.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>1 parent cdf82ba commit 70bcd19
12 files changed
Lines changed: 691 additions & 84 deletions
File tree
- sdk/contentunderstanding/azure-ai-contentunderstanding
- .github/skills
- cu-sdk-common-knowledge
- cu-sdk-sample-run
- scripts
- cu-sdk-setup/scripts
- samples
- async_samples
- tests/samples
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
44 | 52 | | |
45 | 53 | | |
46 | 54 | | |
| |||
Lines changed: 229 additions & 17 deletions
Large diffs are not rendered by default.
Lines changed: 98 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
48 | 71 | | |
49 | 72 | | |
50 | 73 | | |
| |||
106 | 129 | | |
107 | 130 | | |
108 | 131 | | |
109 | | - | |
110 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
111 | 181 | | |
112 | 182 | | |
113 | 183 | | |
114 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
115 | 206 | | |
116 | 207 | | |
117 | 208 | | |
| |||
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
315 | 322 | | |
316 | 323 | | |
317 | 324 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
374 | | - | |
| 374 | + | |
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
Lines changed: 124 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
| 99 | + | |
| 100 | + | |
98 | 101 | | |
99 | 102 | | |
100 | 103 | | |
101 | 104 | | |
102 | 105 | | |
| 106 | + | |
103 | 107 | | |
| 108 | + | |
104 | 109 | | |
| 110 | + | |
105 | 111 | | |
106 | 112 | | |
107 | 113 | | |
| |||
245 | 251 | | |
246 | 252 | | |
247 | 253 | | |
248 | | - | |
| 254 | + | |
249 | 255 | | |
250 | 256 | | |
251 | 257 | | |
| |||
254 | 260 | | |
255 | 261 | | |
256 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
257 | 280 | | |
258 | | - | |
| 281 | + | |
259 | 282 | | |
260 | 283 | | |
261 | 284 | | |
| |||
265 | 288 | | |
266 | 289 | | |
267 | 290 | | |
268 | | - | |
| 291 | + | |
269 | 292 | | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | 293 | | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
291 | 383 | | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
297 | 393 | | |
298 | 394 | | |
299 | 395 | | |
| |||
0 commit comments