SPB Git forge

spb/polyllm

Public
15commits 1branches 0releases
2.2 MBsize
maindefault branch
13 days agolast push
TypeScript 97.4% SQL 1% JavaScript 0.9% CSS 0.6%
712 B · 14 lines typescript
Raw Blame History
1// (f) Vision: 2x2 base64 PNG via input_image data URL.2import { client, attempt, save, PROBE_MODELS, summarizeResponse, tinyPngBase64 } from "./lib";3const png = tinyPngBase64();4const out: any[] = [];5for (const model of PROBE_MODELS) {6  out.push(await attempt(`vision:${model}`, async () => {7    const r: any = await client.responses.create({ model, max_output_tokens: 200, input: [{ role: "user", content: [8      { type: "input_text", text: "This is a tiny 2x2 pixel image. List the colours you can identify, in one short sentence." },9      { type: "input_image", image_url: `data:image/png;base64,${png}`, detail: "low" }] }] } as any);10    return summarizeResponse(r);11  }));12}13save("07-vision", out);14