Skip to content

Commit adc1764

Browse files
emanuzziccreutzi
authored andcommitted
Minor tests fixes
* using assumeFail instead of assumeTrue(false) * Specified deployment ID
1 parent 91b3d74 commit adc1764

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

tests/hopenAIChat.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function settingToolChoiceWithNone(testCase)
7272
function fixedSeedFixesResult(testCase)
7373
% Seed is "beta" in OpenAI documentation
7474
% and not reliable at this time.
75-
testCase.assumeTrue(false,"disabled since the server is unreliable in honoring the Seed parameter");
75+
testCase.assumeFail("disabled since the server is unreliable in honoring the Seed parameter");
7676

7777
result1 = generate(testCase.defaultModel,"This is okay", "Seed", 2);
7878
result2 = generate(testCase.defaultModel,"This is okay", "Seed", 2);

tests/tazureChat.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ function doReturnErrors(testCase)
109109
end
110110

111111
function generateWithImageErrorsForGpt35(testCase)
112-
chat = azureChat;
112+
chat = azureChat("DeploymentID","gpt-35-turbo-16k-0613");
113113
image_path = "peppers.png";
114114
emptyMessages = messageHistory;
115115
messages = addUserMessageWithImages(emptyMessages,"What is in the image?",image_path);
@@ -144,7 +144,7 @@ function canUseAPIVersions(testCase, APIVersions)
144144

145145
function specialErrorForUnsupportedResponseFormat(testCase)
146146
testCase.verifyError(@() generate(...
147-
azureChat(APIVersion="2024-08-01-preview"), ...
147+
azureChat(APIVersion="2024-08-01-preview",DeploymentID="gpt-35-turbo-16k-0613"), ...
148148
"What is the smallest prime?", ...
149149
ResponseFormat=struct("number",1)), ...
150150
"llms:noStructuredOutputForAzureDeployment");

tests/tollamaChat.m

+4-4
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function extremeTopK(testCase)
5757
%% This should work, and it does on some computers. On others, Ollama
5858
%% receives the parameter, but either Ollama or llama.cpp fails to
5959
%% honor it correctly.
60-
testCase.assumeTrue(false,"disabled due to Ollama/llama.cpp not honoring parameter reliably");
60+
testCase.assumeFail("disabled due to Ollama/llama.cpp not honoring parameter reliably");
6161

6262
% setting top-k to k=1 leaves no random choice,
6363
% so we expect to get a fixed response.
@@ -72,7 +72,7 @@ function extremeMinP(testCase)
7272
%% This should work, and it does on some computers. On others, Ollama
7373
%% receives the parameter, but either Ollama or llama.cpp fails to
7474
%% honor it correctly.
75-
testCase.assumeTrue(false,"disabled due to Ollama/llama.cpp not honoring parameter reliably");
75+
testCase.assumeFail("disabled due to Ollama/llama.cpp not honoring parameter reliably");
7676

7777
% setting min-p to p=1 means only tokens with the same logit as
7878
% the most likely one can be chosen, which will almost certainly
@@ -88,7 +88,7 @@ function extremeTfsZ(testCase)
8888
%% This should work, and it does on some computers. On others, Ollama
8989
%% receives the parameter, but either Ollama or llama.cpp fails to
9090
%% honor it correctly.
91-
testCase.assumeTrue(false,"disabled due to Ollama/llama.cpp not honoring parameter reliably");
91+
testCase.assumeFail("disabled due to Ollama/llama.cpp not honoring parameter reliably");
9292

9393
% setting tfs_z to z=0 leaves no random choice, but degrades to
9494
% greedy sampling, so we expect to get a fixed response.
@@ -113,7 +113,7 @@ function seedFixesResult(testCase)
113113
%% This should work, and it does on some computers. On others, Ollama
114114
%% receives the parameter, but either Ollama or llama.cpp fails to
115115
%% honor it correctly.
116-
testCase.assumeTrue(false,"disabled due to Ollama/llama.cpp not honoring parameter reliably");
116+
testCase.assumeFail("disabled due to Ollama/llama.cpp not honoring parameter reliably");
117117

118118
chat = ollamaChat("mistral");
119119
response1 = generate(chat,"hi",Seed=1234);

0 commit comments

Comments
 (0)