Skip to content

Commit 8e53511

Browse files
hjh320ccreutzi
authored andcommitted
Fix doReturnErrors test
Azure no longer lets us have a GPT-3.5 deployment
1 parent da13dab commit 8e53511

File tree

3 files changed

+2
-15
lines changed

3 files changed

+2
-15
lines changed

tests/hopenAIChat.m

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
constructor
1818
defaultModel
1919
visionModel
20-
gpt35Model
2120
end
2221

2322
methods (Abstract)
@@ -171,10 +170,8 @@ function assignValueToProperty(property, value)
171170
end
172171

173172
function doReturnErrors(testCase)
174-
% This input is considerably longer than accepted as input for
175-
% GPT-3.5 (16385 tokens)
176-
wayTooLong = string(repmat('a ',1,20000));
177-
testCase.verifyError(@() generate(testCase.gpt35Model,wayTooLong), "llms:apiReturnedError");
173+
testCase.verifyError(@() generate(testCase.defaultModel, "Hello", ResponseFormat="{bad json}"), ...
174+
"llms:apiReturnedError");
178175
end
179176

180177
function createChatWithStreamFunc(testCase)

tests/tazureChat.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
defaultModel = azureChat;
1717
visionModel = azureChat(Deployment="gpt-4o");
1818
structuredModel = azureChat("Deployment","gpt-4o-2024-08-06");
19-
gpt35Model = azureChat(DeploymentID="gpt-35-turbo-16k-0613");
2019
end
2120

2221
methods (Test) % not calling the server

tests/topenAIChat.m

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
defaultModel = openAIChat;
1717
visionModel = openAIChat;
1818
structuredModel = openAIChat;
19-
gpt35Model = openAIChat(ModelName="gpt-3.5-turbo");
2019
end
2120

2221
methods(Test)
@@ -83,14 +82,6 @@ function jsonFormatWithSystemPrompt(testCase)
8382
generate(chat,"create some address",ResponseFormat="json"), ...
8483
"string");
8584
end
86-
87-
function doReturnErrors(testCase)
88-
chat = openAIChat(ModelName="gpt-3.5-turbo");
89-
% This input is considerably longer than accepted as input for
90-
% GPT-3.5 (16385 tokens)
91-
wayTooLong = string(repmat('a ',1,20000));
92-
testCase.verifyError(@() generate(chat,wayTooLong), "llms:apiReturnedError");
93-
end
9485
end
9586

9687
methods

0 commit comments

Comments
 (0)