-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathquickstart.sh
More file actions
38 lines (35 loc) · 1.75 KB
/
Copy pathquickstart.sh
File metadata and controls
38 lines (35 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env bash
set -euo pipefail
# Minimal command-line quick start for the AREX ReAct research loop.
#
# Required:
# AREX_BASE_URL Base URL ending in /v1, for example https://your-host.example/v1
# AREX_API_KEY API key accepted by the endpoint
# AREX_MODEL Served model name
# AREX_SEARCH_URL Search tool HTTP endpoint
# AREX_SEARCH_API_KEY Search tool API key
# AREX_SCHOLAR_URL Google Scholar tool HTTP endpoint
# AREX_SCHOLAR_API_KEY Google Scholar tool API key
# AREX_VISIT_URL Visit/read-page tool HTTP endpoint
# AREX_VISIT_API_KEY Visit/read-page tool API key
# AREX_PROMPT User prompt to send to AREX
#
# Optional:
# AREX_SUMMARY_BASE_URL Summary/extractor model endpoint, defaults to AREX_BASE_URL
# AREX_SUMMARY_API_KEY Summary/extractor API key, defaults to AREX_API_KEY
# AREX_SUMMARY_MODEL Summary/extractor model, defaults to AREX_MODEL
# AREX_MAX_ROUNDS ReAct rounds, default: 600
# AREX_RESPONSE_MAX_TOKENS Maximum output tokens per model call, default: 4096
# AREX_VISIT_PAGE_MAX_CHARS Maximum page characters before extraction, default: 180000
: "${AREX_BASE_URL:?Set AREX_BASE_URL, for example https://your-host.example/v1}"
: "${AREX_API_KEY:?Set AREX_API_KEY}"
: "${AREX_MODEL:?Set AREX_MODEL}"
: "${AREX_SEARCH_URL:?Set AREX_SEARCH_URL}"
: "${AREX_SEARCH_API_KEY:?Set AREX_SEARCH_API_KEY}"
: "${AREX_SCHOLAR_URL:?Set AREX_SCHOLAR_URL}"
: "${AREX_SCHOLAR_API_KEY:?Set AREX_SCHOLAR_API_KEY}"
: "${AREX_VISIT_URL:?Set AREX_VISIT_URL}"
: "${AREX_VISIT_API_KEY:?Set AREX_VISIT_API_KEY}"
: "${AREX_PROMPT:?Set AREX_PROMPT}"
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
PYTHONPATH="${REPO_ROOT}/src${PYTHONPATH:+:${PYTHONPATH}}" python3 "${REPO_ROOT}/src/arex_react.py"