JSPM

  • Created
  • Published
  • Downloads 12604
  • Score
    100M100P100Q33720F
  • License MIT

Cloudflare's Workers AI SDK

Package Exports

  • @cloudflare/ai
  • @cloudflare/ai/dist/index.cjs
  • @cloudflare/ai/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@cloudflare/ai) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Workers AI SDK

This package has been deprecated in favor of a new native AI binding, read more here.

You can use the new native binding just by calling the .run() directly in the binding like this:

const answer = env.AI.run('@cf/meta/llama-2-7b-chat-int8', {
    prompt: "What is the origin of the phrase 'Hello, World'"
});