File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed 
llama-index-integrations/llms/llama-index-llms-google-genai 
llama_index/llms/google_genai Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -395,7 +395,7 @@ def _prepare_chat_with_tools(
395395    ) ->  Dict [str , Any ]:
396396        """Predict and call the tool.""" 
397397        if  tool_choice  is  None :
398-             tool_choice  =  "any"  if  tool_required  else  "none " 
398+             tool_choice  =  "any"  if  tool_required  else  "auto " 
399399
400400        if  tool_choice  ==  "auto" :
401401            tool_mode  =  types .FunctionCallingConfigMode .AUTO 
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ dev = [
2727
2828[project ]
2929name  = " llama-index-llms-google-genai" 
30- version  = " 0.2.0 " 
30+ version  = " 0.2.1 " 
3131description  = " llama-index llms google genai integration" 
3232authors  = [{
name  = 
" Your Name" , 
email  = 
" [email protected] " }]
3333requires-python  = " >=3.9,<4.0" 
Original file line number Diff line number Diff line change @@ -455,7 +455,7 @@ def test_prepare_chat_with_tools_tool_not_required(
455455
456456    assert  (
457457        result ["tool_config" ].function_calling_config .mode 
458-         ==  types .FunctionCallingConfigMode .NONE 
458+         ==  types .FunctionCallingConfigMode .AUTO 
459459    )
460460    assert  len (result ["tools" ]) ==  1 
461461    assert  result ["tools" ][0 ].function_declarations [0 ].name  ==  "search_tool" 
@@ -470,7 +470,7 @@ def test_prepare_chat_with_tools_default_behavior(
470470
471471    assert  (
472472        result ["tool_config" ].function_calling_config .mode 
473-         ==  types .FunctionCallingConfigMode .NONE 
473+         ==  types .FunctionCallingConfigMode .AUTO 
474474    )
475475    assert  len (result ["tools" ]) ==  1 
476476    assert  result ["tools" ][0 ].function_declarations [0 ].name  ==  "search_tool" 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments