aboutsummaryrefslogtreecommitdiffstats
path: root/Argcfile.sh
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-07-10 23:52:38 +0800
committerGitHub <noreply@github.com>2024-07-10 23:52:38 +0800
commit1f784e3db509676e825c443cd1a8c63747069103 (patch)
treec5d31734b7241f398075f57c4591923122c653c2 /Argcfile.sh
parent732eae532c8e8632db95ab80e0dde5071e744386 (diff)
downloadllm-functions-docker-1f784e3db509676e825c443cd1a8c63747069103.tar.gz
refactor: link web-search/code-interpreter in ci (#71)
Diffstat (limited to 'Argcfile.sh')
-rw-r--r--Argcfile.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/Argcfile.sh b/Argcfile.sh
index 6c2e221..9d17181 100644
--- a/Argcfile.sh
+++ b/Argcfile.sh
@@ -259,6 +259,7 @@ build-declarations@agent() {
fi
not_found_agents=()
build_failed_agents=()
+ exist_tools="$(ls -1 tools)"
for name in "${names[@]}"; do
agent_dir="agents/$name"
declarations_file="$agent_dir/functions.json"
@@ -282,6 +283,12 @@ build-declarations@agent() {
fi
done
if [[ -f "$tool_names_file" ]]; then
+ if grep -q '^web_search\.' "$tool_names_file" && ! grep -q '^web_search\.' <<<"$exist_tools"; then
+ echo "WARNING: no found web_search tool, please run \`argc link-web-search\` to set one."
+ fi
+ if grep -q '^code_interpreter\.' "$tool_names_file" && ! grep -q '^code_interpreter\.' <<<"$exist_tools"; then
+ echo "WARNING: no found code_interpreter tool, please run \`argc link-code-interpreter\` to set one."
+ fi
tools_json_data="$(argc build-declarations@tool --names-file="$tool_names_file" --declarations-file=-)" || {
ok=false
build_failed_agents+=("$name")
@@ -545,8 +552,9 @@ _link_tool() {
if _is_win; then
(cd tools && cmd <<< "mklink $to $from" > /dev/null)
else
- (cd tools && ln -rs $from $to)
+ (cd tools && ln -s $from $to)
fi
+ (cd tools && ls -l $to)
}
_ask_json_data() {