cloudflare / workers-sdk

⛅️ Home to Wrangler, the CLI for Cloudflare Workers®
https://developers.cloudflare.com/workers/
Apache License 2.0
2.41k stars 590 forks source link

🚀 Feature Request: #6131

Closed Playgirlkaybraz11 closed 2 days ago

Playgirlkaybraz11 commented 1 week ago

Describe the solution

export interface Env {
  // If you set another name in wrangler.toml as the value for 'binding',
  // replace "AI" with the variable name you defined.
  AI: Ai;
}

export default {
  async fetch(request, env): Promise<Response> {
    const response = await env.AI.run('@cf/meta/llama-3-8b-instruct', {
        prompt: "What is the origin of the phrase Hello, World"
      }
    );

    return new Response(JSON.stringify(response));
  },
} satisfies ExportedHandler<Env>;  

5608 #4882

threepointone commented 6 days ago

What is the feature request here? Not sure I understand what you want.

threepointone commented 2 days ago

closing this issue, please file a new issue if you have more info.