We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 616d8d8 commit 703cedbCopy full SHA for 703cedb
tools/web_fetch_exa.sh
@@ -0,0 +1,25 @@
1
+#!/usr/bin/env bash
2
+set -e
3
+
4
+# @describe Fetch contents of a URI using Exa API.
5
+# Use this when you need to get contents of a link, where you think is relevant info to be found.
6
7
+# @option --url! The query to search for.
8
9
+# @env EXA_API_KEY! The api key
10
+# @env LLM_OUTPUT=/dev/stdout The output path The output path
11
12
+main() {
13
+curl -X POST 'https://api.exa.ai/contents' \
14
+ -H "x-api-key: $EXA_API_KEY" \
15
+ -H 'Content-Type: application/json' \
16
+ -d '{
17
+ "urls": ["'"$argc_url"'"],
18
+ "text": true,
19
+ "type": "keyword",
20
+ "numResults": 1
21
+ }' | \
22
+ jq -r '.results[0].text' >> "$LLM_OUTPUT"
23
+}
24
25
+eval "$(argc --argc-eval "$0" "$@")"
0 commit comments