File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 3
3
4
4
% Copyright 2024 The MathWorks, Inc.
5
5
6
+
7
+ properties (TestParameter )
8
+ ChatBotExample = {" CreateSimpleChatBot" , " CreateSimpleOllamaChatBot" };
9
+ end
10
+
11
+
6
12
methods (TestClassSetup )
7
13
function setUpAndTearDowns(testCase )
8
14
import matlab .unittest .fixtures .CurrentFolderFixture
@@ -66,7 +72,7 @@ function testAnalyzeSentimentinTextUsingChatGPTinJSONMode(testCase)
66
72
" llms:warningJsonInstruction" );
67
73
end
68
74
69
- function testCreateSimpleChatBot(testCase )
75
+ function testCreateSimpleChatBot(testCase , ChatBotExample )
70
76
% set up a fake input command, returning canned user prompts
71
77
count = 0 ;
72
78
prompts = [
@@ -101,7 +107,7 @@ function testCreateSimpleChatBot(testCase)
101
107
numWordsResponse = []; % #ok<NASGU>
102
108
103
109
% Run the example
104
- CreateSimpleChatBot ;
110
+ eval( ChatBotExample ) ;
105
111
106
112
testCase .verifyEqual(count ,find(prompts ==" end" ,1 ));
107
113
testCase .verifySize(messages .Messages ,[1 2 *(count - 1 )]);
You can’t perform that action at this time.
0 commit comments