Skip to content

Commit 9916e18

Browse files
fixed code syntax (#19163)
1 parent 97594c5 commit 9916e18

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/content/docs/ai-gateway/integrations/aig-workers-ai-binding.mdx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,17 @@ export interface Env {
8080
export default {
8181
async fetch(request, env): Promise<Response> {
8282
// Specify the gateway label and other options here
83-
const response = await env.AI.run("@cf/meta/llama-3.1-8b-instruct-fast", {
84-
prompt: "What is the origin of the phrase Hello, World",
85-
gateway: {
86-
id: "GATEWAYID", // Use your gateway label here
87-
skipCache: true, // Optional: Skip cache if needed
83+
const response = await env.AI.run(
84+
"@cf/meta/llama-3.1-8b-instruct-fast",
85+
{
86+
prompt: "What is the origin of the phrase Hello, World",
87+
},
88+
{
89+
gateway: {
90+
id: "GATEWAYID", // Use your gateway label here
91+
skipCache: true, // Optional: Skip cache if needed
92+
},
8893
},
89-
});
9094

9195
// Return the AI response as a JSON object
9296
return new Response(JSON.stringify(response), {

0 commit comments

Comments
 (0)