swift15: fix fleet-probes vision heredoc (quoted 'PY' ate $B); probe header

This commit is contained in:
Frank
2026-10-08 04:57:10 -07:00
parent 3ca64e14fc
commit 971e23a25c
+3 -3
View File
@@ -20,8 +20,8 @@ body = json.dumps({"model": "frank-primary", "max_tokens": 64, "temperature": 0,
"messages": [{"role": "user", "content": [ "messages": [{"role": "user", "content": [
{"type": "image_url", "image_url": {"url": "data:image/png;base64," + b64}}, {"type": "image_url", "image_url": {"url": "data:image/png;base64," + b64}},
{"type": "text", "text": "What color is this image? Answer with one word."}]}]}).encode() {"type": "text", "text": "What color is this image? Answer with one word."}]}]}).encode()
r = urllib.request.Request(B + "/chat/completions", data=body, r = urllib.request.Request("http://localhost:7770/v1" + "/chat/completions",
headers={"Content-Type": "application/json"}) data=body, headers={"Content-Type": "application/json"})
d = json.load(urllib.request.urlopen(r, timeout=300)) d = json.load(urllib.request.urlopen(r, timeout=300))
m = d["choices"][0]["message"] m = d["choices"][0]["message"]
print("VISION ANSWER:", ((m.get("content") or "")[:80]).replace("\n", " ")) print("VISION ANSWER:", ((m.get("content") or "")[:80]).replace("\n", " "))
@@ -35,7 +35,7 @@ curl -s -m 120 $B/chat/completions -H 'Content-Type: application/json' -d '{
"parameters":{"type":"object","properties":{"expr":{"type":"string"}},"required":["expr"]}}}]}' \ "parameters":{"type":"object","properties":{"expr":{"type":"string"}},"required":["expr"]}}}]}' \
| python3 -c 'import json,sys; d=json.load(sys.stdin); m=d["choices"][0]["message"]; print("TOOL_CALLS:", m.get("tool_calls"))' | python3 -c 'import json,sys; d=json.load(sys.stdin); m=d["choices"][0]["message"]; print("TOOL_CALLS:", m.get("tool_calls"))'
echo "== reasoning_effort fold (xhigh/medium/low ok, high -> 500)" echo "== reasoning_effort fold (xhigh/medium/low/high all 200 on froggeric v22.5)"
for lvl in xhigh medium low high; do for lvl in xhigh medium low high; do
code=$(curl -s -o /dev/null -w "%{http_code}" -m 120 $B/chat/completions \ code=$(curl -s -o /dev/null -w "%{http_code}" -m 120 $B/chat/completions \
-H 'Content-Type: application/json' \ -H 'Content-Type: application/json' \