@@ -173,6 +173,16 @@ function generateWithToolsAndStreamFunc(testCase)
173
173
testCase .verifyThat(data ,HasField(" explanation" ));
174
174
end
175
175
176
+ function generateWithImages(testCase )
177
+ chat = openAIChat ;
178
+ image_path = " peppers.png" ;
179
+ emptyMessages = messageHistory ;
180
+ messages = addUserMessageWithImages(emptyMessages ," What is in the image?" ,image_path );
181
+
182
+ text = generate(chat ,messages );
183
+ testCase .verifyThat(text ,matlab .unittest .constraints .ContainsSubstring(" pepper" ));
184
+ end
185
+
176
186
function invalidInputsGenerate(testCase , InvalidGenerateInput )
177
187
f = openAIFunction(" validfunction" );
178
188
chat = openAIChat(Tools = f , APIKey= " this-is-not-a-real-key" );
@@ -189,8 +199,8 @@ function assignValueToProperty(property, value)
189
199
testCase .verifyError(@()assignValueToProperty(InvalidValuesSetters .Property ,InvalidValuesSetters .Value ), InvalidValuesSetters .Error );
190
200
end
191
201
192
- function invalidGenerateInputforModel (testCase )
193
- chat = openAIChat(APIKey = " this-is-not-a-real-key" );
202
+ function gpt35TurboErrorsForImages (testCase )
203
+ chat = openAIChat(APIKey = " this-is-not-a-real-key" ,Model = " gpt-3.5-turbo " );
194
204
image_path = " peppers.png" ;
195
205
emptyMessages = messageHistory ;
196
206
inValidMessages = addUserMessageWithImages(emptyMessages ," What is in the image?" ,image_path );
0 commit comments