@@ -172,7 +172,10 @@ describe('GenerativeModel', () => {
172172 { functionDeclarations : [ { name : 'myfunc' , description : 'mydesc' } ] }
173173 ] ,
174174 toolConfig : { functionCallingConfig : { mode : FunctionCallingMode . NONE } } ,
175- systemInstruction : { role : 'system' , parts : [ { text : 'be friendly' } ] }
175+ systemInstruction : { role : 'system' , parts : [ { text : 'be friendly' } ] } ,
176+ generationConfig : {
177+ topK : 1
178+ }
176179 } ) ;
177180 expect ( genModel . tools ?. length ) . to . equal ( 1 ) ;
178181 expect ( genModel . toolConfig ?. functionCallingConfig ?. mode ) . to . equal (
@@ -196,7 +199,8 @@ describe('GenerativeModel', () => {
196199 return (
197200 value . includes ( 'myfunc' ) &&
198201 value . includes ( FunctionCallingMode . NONE ) &&
199- value . includes ( 'be friendly' )
202+ value . includes ( 'be friendly' ) &&
203+ value . includes ( 'topK' )
200204 ) ;
201205 } ) ,
202206 { }
@@ -236,7 +240,10 @@ describe('GenerativeModel', () => {
236240 { functionDeclarations : [ { name : 'myfunc' , description : 'mydesc' } ] }
237241 ] ,
238242 toolConfig : { functionCallingConfig : { mode : FunctionCallingMode . NONE } } ,
239- systemInstruction : { role : 'system' , parts : [ { text : 'be friendly' } ] }
243+ systemInstruction : { role : 'system' , parts : [ { text : 'be friendly' } ] } ,
244+ generationConfig : {
245+ responseMimeType : 'image/jpeg'
246+ }
240247 } ) ;
241248 expect ( genModel . tools ?. length ) . to . equal ( 1 ) ;
242249 expect ( genModel . toolConfig ?. functionCallingConfig ?. mode ) . to . equal (
@@ -262,7 +269,10 @@ describe('GenerativeModel', () => {
262269 toolConfig : {
263270 functionCallingConfig : { mode : FunctionCallingMode . AUTO }
264271 } ,
265- systemInstruction : { role : 'system' , parts : [ { text : 'be formal' } ] }
272+ systemInstruction : { role : 'system' , parts : [ { text : 'be formal' } ] } ,
273+ generationConfig : {
274+ responseMimeType : 'image/png'
275+ }
266276 } )
267277 . sendMessage ( 'hello' ) ;
268278 expect ( makeRequestStub ) . to . be . calledWith (
@@ -274,7 +284,9 @@ describe('GenerativeModel', () => {
274284 return (
275285 value . includes ( 'otherfunc' ) &&
276286 value . includes ( FunctionCallingMode . AUTO ) &&
277- value . includes ( 'be formal' )
287+ value . includes ( 'be formal' ) &&
288+ value . includes ( 'image/png' ) &&
289+ ! value . includes ( 'image/jpeg' )
278290 ) ;
279291 } ) ,
280292 { }
0 commit comments