JSON.stringify(inputs).length needs to be less than 9.5 MB, to be precise.)
zh-tw and pt-brBeta on this page are free until they come out of beta. https://developers.cloudflare.com/workers-ai/models/#text-to-imageexport async function onRequest(context) {
const input = { prompt: "What is the origin of the phrase Hello, World" }
const answer = await context.env.AI.run('@cf/meta/llama-3.1-8b-instruct', input);
return Response.json(answer);
}A ReadableStream branch was created but never consumed. Such branches can be created, for instance, by calling the tee() method on a ReadableStream, or by calling the clone() method on a Request or Response object. If a branch is created but never consumed, it can force the runtime to buffer the entire body of the stream in memory, which may cause the Worker to exceed its memory limit and be terminated. To avoid this, ensure that all branches created are consumed.JSON.stringify(inputs).lengthzh-twpt-brBeta