12 lines
741 B
Bash
12 lines
741 B
Bash
#!/bin/bash
|
|
TOK=$(cat /root/.numes_ptok)
|
|
echo "--- channels.models ---"
|
|
su postgres -c "psql -d newapi -At -c \"select models from channels where name='numes-pool'\""
|
|
echo "--- 503 body ---"
|
|
curl -s -m 60 -o /tmp/nb503 -w "HTTP=%{http_code}\n" http://127.0.0.1:48005/v1/chat/completions \
|
|
-H "Authorization: Bearer $TOK" -H 'Content-Type: application/json' \
|
|
-d '{"model":"glm-5.3-uncensored","messages":[{"role":"user","content":"hi"}],"max_tokens":20}'
|
|
head -c 400 /tmp/nb503
|
|
echo
|
|
echo "--- top-3 newest logs errors ---"
|
|
su postgres -c "psql -d newapi -At -c \"select model_name, channel_id, content, created_at from logs where type=5 and created_at > extract(epoch from now())-600 order by id desc limit 5\"" 2>/dev/null | head -c 600 |