Skip to content

Commit bd61b0f

Browse files
committed
Update available Azure API versions
1 parent a6a1e8f commit bd61b0f

File tree

5 files changed

+13
-8
lines changed

5 files changed

+13
-8
lines changed

+llms/+azure/apiVersions.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,17 @@
33

44
% Copyright 2024 The MathWorks, Inc.
55
versions = [...
6+
"2025-02-01-preview", ...
7+
"2025-01-01-preview", ...
8+
"2024-12-01-preview", ...
9+
"2024-10-01-preview", ...
10+
"2024-09-01-preview", ...
611
"2024-08-01-preview", ...
712
"2024-07-01-preview", ...
813
"2024-05-01-preview", ...
914
"2024-04-01-preview", ...
1015
"2024-03-01-preview", ...
16+
"2024-10-21", ...
1117
"2024-06-01", ...
1218
"2024-02-01", ...
1319
"2023-05-15", ...

azureChat.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
nvp.DeploymentID (1,1) string {llms.utils.mustBeNonzeroLengthTextScalar}
108108
nvp.APIKey {llms.utils.mustBeNonzeroLengthTextScalar}
109109
nvp.Tools (1,:) {mustBeA(nvp.Tools, "openAIFunction")} = openAIFunction.empty
110-
nvp.APIVersion (1,1) string {mustBeAPIVersion} = "2024-06-01"
110+
nvp.APIVersion (1,1) string {mustBeAPIVersion} = "2024-10-21"
111111
nvp.Temperature {llms.utils.mustBeValidTemperature} = 1
112112
nvp.TopP {llms.utils.mustBeValidProbability} = 1
113113
nvp.StopSequences {llms.utils.mustBeValidStop} = {}

doc/Azure.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,10 @@ Create a sample output structure.
250250
sampleOutput = struct("Animal","Penguin","CanFly",false);
251251
```
252252

253-
Connect to Azure OpenAI Service. Use an API version that supports structured outputs.
253+
Connect to Azure OpenAI Service.
254254

255255
```matlab
256-
model = azureChat(APIVersion="2024-08-01-preview");
256+
model = azureChat;
257257
```
258258

259259
Generate structured output.

doc/functions/azureChat.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Instead of using the `DeploymentID` name\-value argument, you can also set the e
117117

118118
### `APIVersion` — API Version
119119

120-
`"2024-06-01"` (default) | `"2024-02-01"` | `"2023-05-15"` | `"2024-05-01-preview"` | `"2024-04-01-preview"` | ...
120+
`"2024-10-21"` (default) | `"2024-06-01"` | `"2024-02-01"` | `"2025-02-01-preview"` | `"2025-01-01-preview"` | ...
121121

122122

123123
After construction, this property is read\-only.

tests/tazureChat.m

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
constructor = @azureChat;
1616
defaultModel = azureChat;
1717
visionModel = azureChat(Deployment="gpt-4o");
18-
structuredModel = azureChat("APIVersion","2024-08-01-preview",...
19-
"Deployment","gpt-4o-2024-08-06");
18+
structuredModel = azureChat("Deployment","gpt-4o-2024-08-06");
2019
end
2120

2221
methods(Test)
@@ -63,7 +62,7 @@ function jsonFormatWithSystemPrompt(testCase)
6362
end
6463

6564
function responseFormatRequiresNewAPI(testCase)
66-
chat = azureChat;
65+
chat = azureChat(APIVersion="2024-02-01");
6766
testCase.verifyError(@() generate(chat, ...
6867
"What is the smallest prime?", ...
6968
ResponseFormat=struct("number",1)), ...
@@ -127,7 +126,7 @@ function specialErrorForUnsupportedResponseFormat(testCase)
127126
testCase.assumeFail("Disabled until `llms.internal.callAzureChat` is updated to use `max_completion_tokens` instead of the deprecated `max_tokens` in the OpenAI API.")
128127

129128
testCase.verifyError(@() generate(...
130-
azureChat(APIVersion="2024-08-01-preview",DeploymentID="o1-mini"), ...
129+
azureChat(DeploymentID="o1-mini"), ...
131130
"What is the smallest prime?", ...
132131
ResponseFormat=struct("number",1)), ...
133132
"llms:noStructuredOutputForAzureDeployment");

0 commit comments

Comments
 (0)