File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -173,6 +173,16 @@ function generateWithToolsAndStreamFunc(testCase)
173173 testCase .verifyThat(data ,HasField(" explanation" ));
174174 end
175175
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+
176186 function invalidInputsGenerate(testCase , InvalidGenerateInput )
177187 f = openAIFunction(" validfunction" );
178188 chat = openAIChat(Tools = f , APIKey= " this-is-not-a-real-key" );
@@ -189,7 +199,7 @@ function assignValueToProperty(property, value)
189199 testCase .verifyError(@()assignValueToProperty(InvalidValuesSetters .Property ,InvalidValuesSetters .Value ), InvalidValuesSetters .Error );
190200 end
191201
192- function invalidGenerateInputforModel (testCase )
202+ function gpt35TurboErrorsForImages (testCase )
193203 chat = openAIChat(APIKey = " this-is-not-a-real-key" ,Model= " gpt-3.5-turbo" );
194204 image_path = " peppers.png" ;
195205 emptyMessages = messageHistory ;
You can’t perform that action at this time.
0 commit comments