Any chance Claude Haiku or Sonnet will come to workers ai?
Any chance Claude Haiku or Sonnet will come to workers ai?
atob() on it to convert the string to binaryBuffer.from(base64Image, 'base64')
Uint8Array.from(binaryString, (m) => m.codePointAt(0));


12/8/24, 9:07 PM
Uint8Array.from(binaryString, (m) => m.codePointAt(0)); const response = await config.ai.run('@cf/black-forest-labs/flux-1-schnell',
{
prompt,
steps: DEFAULT_STEPS
},
{
gateway: { id: 'misu-ai' },
extraHeaders: {
Authorization: `Bearer ${config.aiGateway.apiToken}`,
'cf-aig-authorization': `Bearer ${config.aiGateway.apiToken}`,
'cf-aig-token': `Bearer ${config.aiGateway.apiToken}`
}
}
)const embedding = await env.AI.run('@cf/baai/bge-base-en-v1.5', {
text: query
});
const values = Array.from(embedding.data[0]);
const results = await vectorIndex.query({
topK: 5,
values: values
});{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "Bundler",
"strict": true,
"skipLibCheck": true,
"lib": [
"ESNext"
],
"types": [
"@cloudflare/workers-types/experimental"
],
"jsx": "react-jsx",
"jsxImportSource": "hono/jsx"
},
}orkerd/server/workerd-api.c++:759: error: wrapped binding module can't be resolved (internal modules only); moduleName = miniflare-internal:wrapped:__WRANGLER_EXTERNAL_AI_WORKER
workerd/jsg/util.c++:274: error: e = workerd/server/workerd-api.c++:789: failed: expected !value.IsEmpty(); global did not produce v8::Value
stack: 102abb063 10302858b 10300fe4b 102a679a7 102a6d647 102a70d7b 102a6f58b 102a6124f 104f28b03 104f28e13 104f277ff 104f27583 102a507c7 18c208273; sentryErrorContext = jsgInternalError
service core:user:vitest-pool-workers-runner-: Uncaught Error: internal error