@@ -256,7 +256,10 @@ describe('GenerativeModel', () => {
256
256
{ functionDeclarations : [ { name : 'myfunc' , description : 'mydesc' } ] }
257
257
] ,
258
258
toolConfig : { functionCallingConfig : { mode : FunctionCallingMode . NONE } } ,
259
- systemInstruction : { role : 'system' , parts : [ { text : 'be friendly' } ] }
259
+ systemInstruction : { role : 'system' , parts : [ { text : 'be friendly' } ] } ,
260
+ generationConfig : {
261
+ responseMimeType : 'image/jpeg'
262
+ }
260
263
} ) ;
261
264
expect ( genModel . tools ?. length ) . to . equal ( 1 ) ;
262
265
expect ( genModel . toolConfig ?. functionCallingConfig ?. mode ) . to . equal (
@@ -282,7 +285,10 @@ describe('GenerativeModel', () => {
282
285
toolConfig : {
283
286
functionCallingConfig : { mode : FunctionCallingMode . AUTO }
284
287
} ,
285
- systemInstruction : { role : 'system' , parts : [ { text : 'be formal' } ] }
288
+ systemInstruction : { role : 'system' , parts : [ { text : 'be formal' } ] } ,
289
+ generationConfig : {
290
+ responseMimeType : 'image/png'
291
+ }
286
292
} )
287
293
. sendMessage ( 'hello' ) ;
288
294
expect ( makeRequestStub ) . to . be . calledWith (
@@ -294,7 +300,9 @@ describe('GenerativeModel', () => {
294
300
return (
295
301
value . includes ( 'otherfunc' ) &&
296
302
value . includes ( FunctionCallingMode . AUTO ) &&
297
- value . includes ( 'be formal' )
303
+ value . includes ( 'be formal' ) &&
304
+ value . includes ( 'image/png' ) &&
305
+ ! value . includes ( 'image/jpeg' )
298
306
) ;
299
307
} ) ,
300
308
{ }
0 commit comments