Skip to content

Commit bcf4d85

Browse files
committed
1 parent b67f5ef commit bcf4d85

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

+llms/+azure/apiVersions.m

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
function versions = apiVersions
2+
%VERSIONS - supported azure API versions
3+
4+
% Copyright 2024 The MathWorks, Inc.
5+
versions = [...
6+
"2024-05-01-preview", ...
7+
"2024-04-01-preview", ...
8+
"2024-03-01-preview", ...
9+
"2024-02-01", ...
10+
"2023-05-15", ...
11+
];
12+
end

azureChat.m

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,7 @@
8686
deploymentID {mustBeTextScalar}
8787
systemPrompt {llms.utils.mustBeTextOrEmpty} = []
8888
nvp.Tools (1,:) {mustBeA(nvp.Tools, "openAIFunction")} = openAIFunction.empty
89-
nvp.APIVersion (1,1) {mustBeMember(nvp.APIVersion,["2023-03-15-preview", "2023-05-15", "2023-06-01-preview", ...
90-
"2023-07-01-preview", "2023-08-01-preview",...
91-
"2023-12-01-preview"])} = "2023-05-15"
89+
nvp.APIVersion (1,1) {mustBeAPIVersion} = "2024-02-01"
9290
nvp.Temperature {llms.utils.mustBeValidTemperature} = 1
9391
nvp.TopProbabilityMass {llms.utils.mustBeValidTopP} = 1
9492
nvp.StopSequences {llms.utils.mustBeValidStop} = {}
@@ -254,4 +252,8 @@ function mustBeIntegerOrEmpty(value)
254252
if ~isempty(value)
255253
mustBeInteger(value)
256254
end
257-
end
255+
end
256+
257+
function mustBeAPIVersion(model)
258+
mustBeMember(model,llms.azure.apiVersions);
259+
end

0 commit comments

Comments
 (0)