Commit 444ed8b
authored
Azure AI Inference SDK - Beta 2 updates (#36163)
The main reason for this release, shortly after the first release:
- Add strongly-typed `model` as an optional input argument to the `complete` method of `ChatCompletionsClient`. This is required for a high-visiblity project. For this project, developers must set `model`.
Breaking change (noted in CHANGELOG.md):
- The field `input_tokens` was removed from class `EmbeddingsUsage`, as this was never defined in the
REST API and the service never returned this value.
Other changes in this release:
- Addressing some test dept (work in progress)
- Add tests for setting `model_extras` for sync and async clients. Make sure the additional parameters appear at the root of the JSON request payload, and make sure the `unknown_parameters` HTTP request header was set to `pass_through`.
- Add tests to validate serialization of a dummy chat completion request that includes all type of input objects. This is a regression test (no service response needed), as the test looks at the JSON request payload and compared to a hard-coded expected string, that was previously verified by hand. This test includes the new `model` argument, as well as all other arguments defined by the REST API. It will catch any regressions in hand-written code.
- Update ref docs to remove mentioning of the old `extras` input argument to chat completions in hand-written code. The name was changed to `model_extras` before the first release, but looks like we still had some left-over ref-doc comments that describe the no-longer-existing argument.
- Remove unused function from the sample `sample_chat_completions_with_image_data.py`. Forgot to do that in the first release.
- Minor changes to root README.md
- Indicate that `complete` method with `stream=True` returns `Iterable[StreamingChatCompletionsUpdate]` for
the synchronous `ChatComletionsClient`, and `Iterable[StreamingChatCompletionsUpdate]` for the asynchronous
`ChatCompletionsClient`. Per feedback from Anna T.
- Update environment variable names used by sample code and test to start with "AZURE_AI" as common elsewhere, per feedback from Rob C.1 parent f792549 commit 444ed8b
File tree
44 files changed
+594
-479
lines changed- sdk/ai/azure-ai-inference
- azure/ai/inference
- _operations
- aio
- _operations
- models
- samples
- async_samples
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
44 files changed
+594
-479
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
104 | | - | |
| 105 | + | |
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
| |||
179 | 180 | | |
180 | 181 | | |
181 | 182 | | |
182 | | - | |
| 183 | + | |
183 | 184 | | |
184 | 185 | | |
185 | 186 | | |
| |||
257 | 258 | | |
258 | 259 | | |
259 | 260 | | |
260 | | - | |
| 261 | + | |
261 | 262 | | |
262 | 263 | | |
263 | 264 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
883 | 883 | | |
884 | 884 | | |
885 | 885 | | |
| 886 | + | |
886 | 887 | | |
887 | | - | |
| 888 | + | |
Lines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
211 | 212 | | |
212 | 213 | | |
213 | 214 | | |
| |||
240 | 241 | | |
241 | 242 | | |
242 | 243 | | |
| 244 | + | |
243 | 245 | | |
244 | 246 | | |
245 | 247 | | |
| |||
317 | 319 | | |
318 | 320 | | |
319 | 321 | | |
320 | | - | |
321 | | - | |
| 322 | + | |
| 323 | + | |
322 | 324 | | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
323 | 328 | | |
324 | 329 | | |
325 | 330 | | |
| |||
338 | 343 | | |
339 | 344 | | |
340 | 345 | | |
| 346 | + | |
| 347 | + | |
341 | 348 | | |
342 | 349 | | |
343 | 350 | | |
| |||
348 | 355 | | |
349 | 356 | | |
350 | 357 | | |
351 | | - | |
| 358 | + | |
352 | 359 | | |
353 | 360 | | |
354 | 361 | | |
| |||
435 | 442 | | |
436 | 443 | | |
437 | 444 | | |
| 445 | + | |
438 | 446 | | |
439 | 447 | | |
440 | 448 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
114 | 116 | | |
115 | 117 | | |
116 | 118 | | |
| |||
120 | 122 | | |
121 | 123 | | |
122 | 124 | | |
123 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
124 | 128 | | |
125 | 129 | | |
126 | 130 | | |
| |||
165 | 169 | | |
166 | 170 | | |
167 | 171 | | |
| 172 | + | |
168 | 173 | | |
169 | 174 | | |
170 | 175 | | |
| |||
188 | 193 | | |
189 | 194 | | |
190 | 195 | | |
| 196 | + | |
191 | 197 | | |
192 | | - | |
| 198 | + | |
193 | 199 | | |
194 | 200 | | |
195 | 201 | | |
| |||
211 | 217 | | |
212 | 218 | | |
213 | 219 | | |
| 220 | + | |
214 | 221 | | |
215 | | - | |
| 222 | + | |
216 | 223 | | |
217 | 224 | | |
218 | 225 | | |
| |||
294 | 301 | | |
295 | 302 | | |
296 | 303 | | |
297 | | - | |
| 304 | + | |
298 | 305 | | |
299 | 306 | | |
300 | | - | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
301 | 311 | | |
302 | 312 | | |
303 | 313 | | |
| |||
309 | 319 | | |
310 | 320 | | |
311 | 321 | | |
312 | | - | |
| 322 | + | |
313 | 323 | | |
314 | 324 | | |
315 | 325 | | |
| |||
321 | 331 | | |
322 | 332 | | |
323 | 333 | | |
324 | | - | |
| 334 | + | |
325 | 335 | | |
326 | 336 | | |
327 | 337 | | |
| |||
333 | 343 | | |
334 | 344 | | |
335 | 345 | | |
336 | | - | |
| 346 | + | |
337 | 347 | | |
338 | 348 | | |
339 | 349 | | |
| |||
345 | 355 | | |
346 | 356 | | |
347 | 357 | | |
348 | | - | |
| 358 | + | |
349 | 359 | | |
350 | 360 | | |
351 | 361 | | |
| |||
370 | 380 | | |
371 | 381 | | |
372 | 382 | | |
| 383 | + | |
373 | 384 | | |
374 | | - | |
| 385 | + | |
375 | 386 | | |
376 | 387 | | |
377 | 388 | | |
| |||
451 | 462 | | |
452 | 463 | | |
453 | 464 | | |
454 | | - | |
| 465 | + | |
455 | 466 | | |
456 | 467 | | |
457 | | - | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
458 | 472 | | |
459 | 473 | | |
460 | 474 | | |
| |||
479 | 493 | | |
480 | 494 | | |
481 | 495 | | |
| 496 | + | |
482 | 497 | | |
483 | 498 | | |
484 | 499 | | |
| |||
603 | 618 | | |
604 | 619 | | |
605 | 620 | | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | 621 | | |
614 | 622 | | |
615 | 623 | | |
| |||
855 | 863 | | |
856 | 864 | | |
857 | 865 | | |
858 | | - | |
859 | | - | |
860 | | - | |
861 | | - | |
862 | | - | |
863 | | - | |
864 | | - | |
865 | 866 | | |
866 | 867 | | |
867 | 868 | | |
| |||
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
108 | | - | |
| 109 | + | |
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
| |||
187 | 188 | | |
188 | 189 | | |
189 | 190 | | |
190 | | - | |
| 191 | + | |
191 | 192 | | |
192 | 193 | | |
193 | 194 | | |
| |||
269 | 270 | | |
270 | 271 | | |
271 | 272 | | |
272 | | - | |
| 273 | + | |
273 | 274 | | |
274 | 275 | | |
275 | 276 | | |
| |||
0 commit comments