Yeah, sorry I saw that at a second look, but this pretty opaque with just a link
Yeah, sorry I saw that at a second look, but this pretty opaque with just a link
flux-1-schnell and dreamshaper-8-lcm consistently for several days, yet my reported usage is 0. I have never seen my usage page show any actual usage. I know a while ago, Beta models weren't charged yet, but I assume this is no longer the case. Am I missing out something?
"@cloudflare/ai": "^1.2.2",
@cloudflare/ai package has been deprecated in favor of running AI requests directly via the workers bindings as described in https://developers.cloudflare.com/workers-ai/configuration/bindings/
getFormatInstructions when i'm home.{) would only work with the raw completions API, not the chat completions API.Tensor error: Unknown internal error: failed to decode u8
BAAI/bge-m3 ... but I'm not super picky...

flux-1-schnelldreamshaper-8-lcmYour worker has access to the following bindings:
- AI:
- Name: AI
✘ [ERROR] Build failed with 1 error:
✘ [ERROR] Could not resolve "base64-js"
node_modules/.pnpm/@cloudflare+ai@1.2.2/node_modules/@cloudflare/ai/dist/index.js:1:16:
1 │ import*as e from"base64-js";import*as t from"mustache";var s;!funct...
╵ ~~~~~~~~~~~
You can mark the path "base64-js" as external to exclude it from the bundle, which will remove
this error."@cloudflare/ai": "^1.2.2",@cloudflare/aiimport { StructuredOutputParser } from "@langchain/core/output_parsers";
const parser = StructuredOutputParser.fromZodSchema(generateFixSchema); Use the following analysis information to generate precise, non-redundant fixes:
Generate fixes following these guidelines:
1. ..........
2. ..........
3. ..........
4. ..........
addAttribute: This method is used to add an attribute to the element or override the existing attribute.
injectCss: This method is used to add style values to the element.
${parser.getFormatInstructions()}getFormatInstructions{image one of
0 array
An array of integers that represent the image data constrained to 8-bit unsigned integer values
items number
A value between 0 and 255
1 string
Binary string representing the image contents.Tensor error: Unknown internal error: failed to decode u8import { parseAsJSON } from '@acusti/parsing';
const parsedResult = parseAsJSON(resultFromLLM);BAAI/bge-m3router.get('/fruitInfo2', async (req, env) => {
return runWithTools(env.AI, model, {
messages: [{
role: 'system',
content: `
The user message is a cryptic clue about a fruit.
Extract the name and shape of the fruit.
`
}, {
role: 'user',
content: 'garden of eden'
}],
tools: [{
name: 'fruitInfo',
description: 'Extract the fruit name and shape.',
parameters: {
type: 'object',
properties: {
name: {type: 'string', description: 'The name of the fruit'},
shape: {type: 'string', description: 'The shape of the fruit'}
},
required: ['name', 'shape']
},
function: ({name, shape}) => `Fruit is ${name} and shape is ${shape}`
}]
});
})