File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -11,16 +11,23 @@ set -e
1111#  @env WEB_SEARCH_MODEL! The model for web-searching.
1212# 
1313#  supported aichat models:
14+ #    - gemini:gemini-2.0-*
1415#    - vertexai:gemini-*
15- #    - perplexity:*-online 
16+ #    - perplexity:*
1617#    - ernie:*
17- #    - lingyiwanwu:yi-large-rag
1818#  @env LLM_OUTPUT=/dev/stdout The output path
1919
2020main () {
2121    client=" ${WEB_SEARCH_MODEL%%:* } " 
22-     if  [[ " $client " ==  " vertexai" ;  then 
23-         export  AICHAT_PATCH_VERTEXAI_CHAT_COMPLETIONS=' {"gemini-.*":{"body":{"tools":[{"googleSearchRetrieval":{}}]}}}' 
22+     if  [[ " $client " ==  " gemini" ;  then 
23+         export  AICHAT_PATCH_GEMINI_CHAT_COMPLETIONS=' {".*":{"body":{"tools":[{"google_search":{}}]}}}' 
24+     elif  [[ " $client " ==  " vertexai" ;  then 
25+         export  AICHAT_PATCH_VERTEXAI_CHAT_COMPLETIONS=' {
26+     "gemini-1.5-.*":{"body":{"tools":[{"googleSearchRetrieval":{}}]}}, 
27+     "gemini-2.0-.*":{"body":{"tools":[{"google_search":{}}]}} 
28+ }'  
29+     elif  [[ " $client " ==  " ernie" ;  then 
30+         export  AICHAT_PATCH_ERNIE_CHAT_COMPLETIONS=' {".*":{"body":{"web_search":{"enable":true}}}}' 
2431    fi 
2532    aichat -m " $WEB_SEARCH_MODEL " " $argc_query " >>  " $LLM_OUTPUT " 
2633}
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments