does env.ASSETS.fetch cache by default? Or I would have to work with the Cache API?
does env.ASSETS.fetch cache by default? Or I would have to work with the Cache API?
nodejs_compat compatibility flag is not active by default nor it will be.
import { Ai } from '@cloudflare/ai'
export async function onRequest(context) {
const ai = new Ai(context.env.AI);
const input = { prompt: "What is the origin of the phrase Hello, World" }
const answer = await ai.run('@cf/meta/llama-2-7b-chat-int8', input);
return Response.json(answer);
}
npm i @cloudflare/ai The package "crypto" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
The package "crypto" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this errorconst uuid = crypto.randomUUID()vite build
import { Ai } from '@cloudflare/ai'
export async function onRequest(context) {
const ai = new Ai(context.env.AI);
const input = { prompt: "What is the origin of the phrase Hello, World" }
const answer = await ai.run('@cf/meta/llama-2-7b-chat-int8', input);
return Response.json(answer);
}
npm i @cloudflare/ai The package "crypto" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.The package "crypto" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this errorconst uuid = crypto.randomUUID()vite build