Skip to content

Commit e43cb20

Browse files
committed
Add test for ollamaChat.generate for the case when ollamaChat is called with the system prompt defined
1 parent d7f194c commit e43cb20

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/tollamaChat.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ function doGenerate(testCase,StringInputs)
3939
testCase.verifyGreaterThan(strlength(response),0);
4040
end
4141

42+
function doGenerateUsingSystemPrompt(testCase)
43+
chat = ollamaChat("mistral","You are a helpful assistant");
44+
response = testCase.verifyWarningFree(@() generate(chat,"Hi"));
45+
testCase.verifyClass(response,'string');
46+
testCase.verifyGreaterThan(strlength(response),0);
47+
end
48+
4249
function extremeTopK(testCase)
4350
% setting top-k to k=1 leaves no random choice,
4451
% so we expect to get a fixed response.

0 commit comments

Comments
 (0)