diff --git a/.github/time/labs/aicharts/deploy.py b/.github/time/labs/aicharts/deploy.py index 15e32bb..15ec08b 100644 --- a/.github/time/labs/aicharts/deploy.py +++ b/.github/time/labs/aicharts/deploy.py @@ -34,7 +34,7 @@ def deploy() -> dict: sys.exit("CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID are needed") code = parts() rev = hashlib.sha256(b"".join(d for _, _, d in code)).hexdigest()[:12] - vars_ = {"REV": rev, "AI_MODEL": cf.env("AICHARTS_AI_MODEL", cf.AI_MODEL), "AI_DAILY": cf.env("AICHARTS_AI_DAILY", "300"), + vars_ = {"REV": rev, "AI_MODEL": cf.env("AICHARTS_AI_MODEL", "@cf/meta/llama-3.3-70b-instruct-fp8-fast"), "AI_DAILY": cf.env("AICHARTS_AI_DAILY", "300"), "SAVE_DAILY": cf.env("AICHARTS_SAVE_DAILY", "1000")} db = cf.database("aicharts") # named time-aicharts, like the script meta = {"main_module": "main.js", "compatibility_date": cf.COMPAT, diff --git a/.github/time/labs/aicharts/worker.js b/.github/time/labs/aicharts/worker.js index 97106e2..a1e6cca 100644 --- a/.github/time/labs/aicharts/worker.js +++ b/.github/time/labs/aicharts/worker.js @@ -162,7 +162,7 @@ export function normalizeSpec(spec) { // Plain prompt first: the prompt's grammar and example steer small models better than a constrained decoder does (a // one-size schema for every step made them drop agg and by). JSON mode only when no object came back at all. async function model(env, messages) { - const input = { messages, max_tokens: 700, temperature: 0.1 }; + const input = { messages, max_tokens: 900, temperature: 0.1 }; const text = (out) => out?.response ?? out?.choices?.[0]?.message?.content ?? ""; let raw = text(await env.AI.run(env.AI_MODEL, input)); if (!firstObject(raw)) {