@juspay/neurolink 12.46.1 → 12.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -3
- package/README.md +75 -50
- package/dist/browser/neurolink.min.js +409 -409
- package/dist/cli/commands/decide.js +2 -2
- package/dist/cli/commands/setup.js +2 -1
- package/dist/cli/factories/commandFactory.js +1 -1
- package/dist/constants/enums.d.ts +16 -0
- package/dist/constants/enums.js +17 -0
- package/dist/factories/providerDescriptors.js +84 -5
- package/dist/factories/providerRegistry.js +10 -1
- package/dist/models/manifestRegistry.js +2 -0
- package/dist/models/manifests/cloudflareClef.d.ts +16 -0
- package/dist/models/manifests/cloudflareClef.js +42 -0
- package/dist/providers/cloudflareClef.d.ts +52 -0
- package/dist/providers/cloudflareClef.js +331 -0
- package/dist/providers/systemOneDecision.d.ts +12 -1
- package/dist/providers/systemOneDecision.js +70 -18
- package/dist/types/decision.d.ts +22 -0
- package/dist/types/providers.d.ts +15 -0
- package/dist/utils/modelChoices.js +13 -1
- package/dist/utils/pricing.js +12 -0
- package/dist/utils/providerConfig.d.ts +7 -0
- package/dist/utils/providerConfig.js +19 -0
- package/docs-site/static/search-index.json +78 -56
- package/package.json +2 -1
|
@@ -1376,3 +1376,22 @@ export function createPerplexityDeciderConfig() {
|
|
|
1376
1376
|
],
|
|
1377
1377
|
};
|
|
1378
1378
|
}
|
|
1379
|
+
/**
|
|
1380
|
+
* Cloudflare Clef — the `decide` inference type, reached through Workers AI,
|
|
1381
|
+
* not the Workers AI text models. It reads the same CLOUDFLARE_API_KEY and
|
|
1382
|
+
* CLOUDFLARE_ACCOUNT_ID as the `cloudflare` text provider; the endpoint is
|
|
1383
|
+
* Cloudflare's own, so the two together configure it.
|
|
1384
|
+
*/
|
|
1385
|
+
export function createCloudflareClefConfig() {
|
|
1386
|
+
return {
|
|
1387
|
+
providerName: "Cloudflare Clef",
|
|
1388
|
+
envVarName: "CLOUDFLARE_API_KEY",
|
|
1389
|
+
setupUrl: "https://dash.cloudflare.com/profile/api-tokens",
|
|
1390
|
+
description: "API token (Workers AI scope) for Cloudflare's Clef decision models",
|
|
1391
|
+
instructions: [
|
|
1392
|
+
"1. Create an API token with the 'Workers AI: Read + Write' permission (https://dash.cloudflare.com/profile/api-tokens)",
|
|
1393
|
+
"2. Set CLOUDFLARE_API_KEY to it, and CLOUDFLARE_ACCOUNT_ID to your account id (in the dashboard URL, or under 'Account ID'); they are the same settings the Cloudflare text provider reads, so setting them also lets decide() use Clef when no other decision provider is configured",
|
|
1394
|
+
"3. The Clef endpoint ignores state text past about 2,048 tokens, so use it for short decisions",
|
|
1395
|
+
],
|
|
1396
|
+
};
|
|
1397
|
+
}
|