feat: add jina tools (#73)

This commit is contained in:
sigoden
2024-07-11 21:43:31 +08:00
committed by GitHub
parent b56159903b
commit 5600b68e04
4 changed files with 55 additions and 16 deletions
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -e
# @describe Extract the content from a given URL.
# @env JINA_API_KEY The api key
# @option --url! The URL to scrape.
main() {
curl_args=()
if [[ -n "$JINA_API_KEY" ]]; then
curl_args+=("-H" "Authorization: Bearer $JINA_API_KEY")
fi
curl -fsSL "${curl_args[@]}" "https://r.jina.ai/$argc_url" >> "$LLM_OUTPUT"
}
eval "$(argc --argc-eval "$0" "$@")"