File tree 1 file changed +11
-4
lines changed
1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -11,16 +11,23 @@ set -e
11
11
# @env WEB_SEARCH_MODEL! The model for web-searching.
12
12
#
13
13
# supported aichat models:
14
+ # - gemini:gemini-2.0-*
14
15
# - vertexai:gemini-*
15
- # - perplexity:*-online
16
+ # - perplexity:*
16
17
# - ernie:*
17
- # - lingyiwanwu:yi-large-rag
18
18
# @env LLM_OUTPUT=/dev/stdout The output path
19
19
20
20
main () {
21
21
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}}}}'
24
31
fi
25
32
aichat -m " $WEB_SEARCH_MODEL " " $argc_query " >> " $LLM_OUTPUT "
26
33
}
You can’t perform that action at this time.
0 commit comments