mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
feat(ai): add Cloudflare Clef classifiers to Workers AI (#10316)
builds on https://github.com/earendil-works/pi/pull/10322 by @RealAlexandreAI
This commit is contained in:
parent
c10bfb0d79
commit
4812cb268e
4 changed files with 83 additions and 9 deletions
|
|
@ -2738,6 +2738,32 @@ const OPENCODE_CLASSIFIER_MODELS: ClassifierModel<"typesafe-system-one">[] = [
|
|||
];
|
||||
|
||||
const CLOUDFLARE_WORKERS_AI_CLASSIFIER_MODELS: ClassifierModel<"cloudflare-workers-ai-system-one">[] = [
|
||||
// Cloudflare-hosted Clef decision models. They accept images, but classifier
|
||||
// contexts carry text or JSON state only, so the catalog advertises text.
|
||||
// Pricing: https://developers.cloudflare.com/workers-ai/models/clef/
|
||||
// and https://developers.cloudflare.com/workers-ai/models/clef-flash/
|
||||
{
|
||||
type: "classifier",
|
||||
id: "@cf/cloudflare/clef",
|
||||
name: "Clef",
|
||||
api: "cloudflare-workers-ai-system-one",
|
||||
provider: "cloudflare-workers-ai",
|
||||
baseUrl: CLOUDFLARE_WORKERS_AI_REST_BASE_URL,
|
||||
input: ["text"],
|
||||
cost: { input: 0.24, output: 0, cacheRead: 0, cacheWrite: 0 },
|
||||
contextWindow: 65536,
|
||||
},
|
||||
{
|
||||
type: "classifier",
|
||||
id: "@cf/cloudflare/clef-flash",
|
||||
name: "Clef Flash",
|
||||
api: "cloudflare-workers-ai-system-one",
|
||||
provider: "cloudflare-workers-ai",
|
||||
baseUrl: CLOUDFLARE_WORKERS_AI_REST_BASE_URL,
|
||||
input: ["text"],
|
||||
cost: { input: 0.09, output: 0, cacheRead: 0, cacheWrite: 0 },
|
||||
contextWindow: 65536,
|
||||
},
|
||||
{
|
||||
type: "classifier",
|
||||
id: "typesafe/jev",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue