github cloudflare/workers-sdk wrangler@3.9.1

latest releases: create-cloudflare@2.32.1, wrangler@3.86.1, @cloudflare/vitest-pool-workers@0.5.27...
13 months ago

Patch Changes

  • #3992 35564741 Thanks @edevil! - Add AI binding that will be used to interact with the AI project.

    Example wrangler.toml

    name = "ai-worker"
    main = "src/index.ts"
    
    [ai]
    binding = "AI"
    

    Example script:

    import Ai from "@cloudflare/ai"
    
    export default {
        async fetch(request: Request, env: Env): Promise<Response> {
            const ai = new Ai(env.AI);
    
            const story = await ai.run({
                model: 'llama-2',
                input: {
                    prompt: 'Tell me a story about the future of the Cloudflare dev platform'
                }
            });
    
        return new Response(JSON.stringify(story));
        },
    };
    
    export interface Env {
        AI: any;
    }
    
  • #4006 bc8c147a Thanks @rozenmd! - fix: remove warning around using D1's binding, and clean up the epilogue when running D1 commands

  • #4027 9e466599 Thanks @jspspike! - Add WebGPU support through miniflare update

  • #3986 00247a8d Thanks @edevil! - Added AI related CLI commands

Don't miss a new workers-sdk release

NewReleases is sending notifications on new releases.