12 lines
347 B
Bash
12 lines
347 B
Bash
|
|
#!/usr/bin/env bash
|
|
# Simple CLI to talk to the relay
|
|
# Usage: ./client.sh "scale weblabs_php to 3"
|
|
set -euo pipefail
|
|
PROMPT="${1:-}"
|
|
if [ -z "$PROMPT" ]; then
|
|
echo "Usage: $0 "your request"" >&2
|
|
exit 1
|
|
fi
|
|
curl -s -X POST http://localhost:8090/chat -H 'Content-Type: application/json' -d "$(jq -n --arg p "$PROMPT" '{prompt:$p}')" | jq .
|