first commit
This commit is contained in:
11
relay/client.sh
Normal file
11
relay/client.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
#!/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 .
|
||||
Reference in New Issue
Block a user