aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-12-10 12:56:53 +0800
committerGitHub <noreply@github.com>2024-12-10 12:56:53 +0800
commit22a87a8753ca1ad23ebe0a816c230302edfd7416 (patch)
treeed6ba06c2cd39aa2912f96d6e6becd0413e70d09
parent0f0ae607d3ffcc2c43c67536d8ac0bc16ce9998a (diff)
downloadllm-functions-docker-22a87a8753ca1ad23ebe0a816c230302edfd7416.tar.gz
refactor: update web_search_aichat.sh (#136)
-rwxr-xr-xtools/web_search_aichat.sh10
1 files changed, 2 insertions, 8 deletions
diff --git a/tools/web_search_aichat.sh b/tools/web_search_aichat.sh
index 6a6528e..a20bd35 100755
--- a/tools/web_search_aichat.sh
+++ b/tools/web_search_aichat.sh
@@ -11,7 +11,6 @@ set -e
# @env WEB_SEARCH_MODEL! The model for web-searching.
#
# supported aichat models:
-# - cohere:*
# - vertexai:gemini-*
# - perplexity:*-online
# - ernie:*
@@ -20,14 +19,9 @@ set -e
main() {
client="${WEB_SEARCH_MODEL%%:*}"
- case "$client" in
- cohere)
- export AICHAT_PATCH_COHERE_CHAT_COMPLETIONS='{".*":{"body":{"connectors":[{"id":"web-search"}]}}}'
- ;;
- vertexai)
+ if [[ "$client" == "vertexai" ]]; then
export AICHAT_PATCH_VERTEXAI_CHAT_COMPLETIONS='{"gemini-.*":{"body":{"tools":[{"googleSearchRetrieval":{}}]}}}'
- ;;
- esac
+ fi
aichat -m "$WEB_SEARCH_MODEL" "$argc_query" >> "$LLM_OUTPUT"
}