diff --git a/scripts/fleet-probes-swift15.sh b/scripts/fleet-probes-swift15.sh index 0c8be25..9d329cd 100755 --- a/scripts/fleet-probes-swift15.sh +++ b/scripts/fleet-probes-swift15.sh @@ -16,7 +16,7 @@ def png(color): + chunk(b"IHDR", struct.pack(">IIBBBBB", w, h, 8, 2, 0, 0, 0)) + chunk(b"IDAT", zlib.compress(raw)) + chunk(b"IEND", b"")) b64 = base64.b64encode(png((255, 0, 0))).decode() -body = json.dumps({"model": "frank-primary", "max_tokens": 64, "temperature": 0, +body = json.dumps({"model": "frank-primary", "max_tokens": 256, "temperature": 0, "messages": [{"role": "user", "content": [ {"type": "image_url", "image_url": {"url": "data:image/png;base64," + b64}}, {"type": "text", "text": "What color is this image? Answer with one word."}]}]}).encode() @@ -24,7 +24,8 @@ r = urllib.request.Request("http://localhost:7770/v1" + "/chat/completions", data=body, headers={"Content-Type": "application/json"}) d = json.load(urllib.request.urlopen(r, timeout=300)) m = d["choices"][0]["message"] -print("VISION ANSWER:", ((m.get("content") or "")[:80]).replace("\n", " ")) +ans = (m.get("content") or m.get("reasoning_content") or "") +print("VISION ANSWER:", ans[:80].replace("\n", " ")) PY echo "== tools (expect tool_calls)"