19 lines
1019 B
Bash
19 lines
1019 B
Bash
#!/bin/bash
|
|
TOK="20mTA9mqjP4ZwSxSugmvefBQaUyu1L5AEH35JLSJcvECWs4E"
|
|
for m in glm-5.3 kimi-k3.1-pro deepseek-v4.1-flash glm-5.3-uncensored kimi-k3-abliterated deepseek-v4.1-flash-uncensored glm-5.3-flash; do
|
|
t0=$(date +%s.%N)
|
|
out=$(curl -s -m 240 -w '\nHTTP=%{http_code}' http://127.0.0.1:48005/v1/chat/completions -H "Authorization: Bearer $TOK" -H 'Content-Type: application/json' \
|
|
-d "{\"model\":\"$m\",\"messages\":[{\"role\":\"user\",\"content\":\"Reply: OK $m\"}],\"max_tokens\":1500}")
|
|
t1=$(date +%s.%N)
|
|
code=$(echo "$out" | tail -1 | cut -d= -f2)
|
|
dur=$(echo "$t1 - $t0" | bc)
|
|
head=$(echo "$out" | head -1)
|
|
txt=$(echo "$head" | python3 -c "import sys,json
|
|
try:
|
|
d=json.load(sys.stdin); c=d['choices'][0]['message'].get('content') or ''
|
|
print((c or 'EMPTY')[:50].replace(chr(10),' '),'| cost',d.get('usage',{}).get('cost'))
|
|
except Exception as e:
|
|
print('ERR', str(e)[:80], sys.stdin.read()[:80] if False else '')" 2>/dev/null)
|
|
printf "%-32s %s %6.1fs %s\n" "$m" "$code" "$dur" "$txt"
|
|
done
|