Versions 197 to 198
Lines 124–166 at 198 (were 124–155 at 197)
126126
127−/** Ask Jev once, with the choice in two option orders (Jev's docs warn order can sway a Choice) and the side questions. */
128−export async function ask(h: Hold, opts: { model?: string; key?: string } = {}): Promise<Verdict> {
129− const forward = PICKS;
130− const backward = [...PICKS].reverse();
131− const body = {
132− model: opts.model ?? "jev-latest",
128+ * One System One request (TypeSafe's API, which Cloudflare's Clef also takes): the choice in two option orders
135− settle: choice(forward),
136− settle_reversed: choice(backward),
137138 ...Object.fromEntries(Object.entries(SIGNS).map(([id, q]) => [id, { type: "noul", instructions: q }])),
142+
145+ answers: Record<string, { type: string; probabilities?: Record<string, number>; noul?: number; choice?: string }>;
148+
150+export async function ask(h: Hold, opts: { model?: string; key?: string } = {}): Promise<Verdict> {
143154 headers: { authorization: `Bearer ${opts.key ?? apiKey()}`, "content-type": "application/json" },
144− body: JSON.stringify(body),
147158 if (!res.ok) throw new Error(`Jev answered ${res.status}: ${(await res.text()).slice(0, 500)}`);
148− const out = (await res.json()) as {
149− model: string;
150− answers: Record<string, { type: string; probabilities?: Record<string, number>; noul?: number; choice?: string }>;
151− usage: { input_tokens: number };
152− };
161+
154165 const probabilities = Object.fromEntries(PICKS.map((k) => [k, out.answers[id]!.probabilities![k] ?? 0])) as Record<
Lines 179–185 at 198 (were 168–174 at 197)
168179 signs: Object.fromEntries(Object.keys(SIGNS).map((id) => [id, out.answers[id]?.noul ?? Number.NaN])),
171− inputTokens: out.usage.input_tokens,
174185
- MCP
- compare on this site's /mcp
- CLI
- abso diff 197 198 scripts/autosettle/jev.ts --json
- JSON
- /christopher/abso-core/compare/197..198?file=scripts%2Fautosettle%2Fjev.ts&format=json