Skip to content

Commit

Permalink
Add test for ollamaChat.generate for the case when ollamaChat is cal…
Browse files Browse the repository at this point in the history
…led with the system prompt defined
  • Loading branch information
vpapanasta committed Jun 27, 2024
1 parent d7f194c commit e43cb20
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/tollamaChat.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ function doGenerate(testCase,StringInputs)
testCase.verifyGreaterThan(strlength(response),0);
end

function doGenerateUsingSystemPrompt(testCase)
chat = ollamaChat("mistral","You are a helpful assistant");
response = testCase.verifyWarningFree(@() generate(chat,"Hi"));
testCase.verifyClass(response,'string');
testCase.verifyGreaterThan(strlength(response),0);
end

function extremeTopK(testCase)
% setting top-k to k=1 leaves no random choice,
% so we expect to get a fixed response.
Expand Down

0 comments on commit e43cb20

Please sign in to comment.