Skip to content

wrangler@3.9.1

Compare
Choose a tag to compare
@workers-devprod workers-devprod released this 25 Sep 17:05
· 2769 commits to main since this release
63e937a

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