Fix zai-usage.sh: export KEY so the Python fetch sends the auth header
This commit is contained in:
@@ -5,7 +5,7 @@ set -euo pipefail
|
||||
|
||||
HOURS="${1:-24}"
|
||||
AUTH_JSON="$HOME/.pi/agent/auth.json"
|
||||
KEY="$(python3 -c "import json;print(json.load(open('$AUTH_JSON'))['zai']['key'])")"
|
||||
export KEY="$(python3 -c "import json;print(json.load(open('$AUTH_JSON'))['zai']['key'])")"
|
||||
BASE="https://api.z.ai/api/monitor/usage"
|
||||
|
||||
NOW="$(date -u +'%Y-%m-%d %H:%M:%S')"
|
||||
|
||||
Reference in New Issue
Block a user