From dc52a91ace2a89e373e42b822be2f5f99f820d37 Mon Sep 17 00:00:00 2001 From: daisyfaithauma Date: Mon, 13 Jan 2025 13:46:28 +0000 Subject: [PATCH] fixed code syntax --- .../integrations/aig-workers-ai-binding.mdx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/content/docs/ai-gateway/integrations/aig-workers-ai-binding.mdx b/src/content/docs/ai-gateway/integrations/aig-workers-ai-binding.mdx index 3b746944400da9b..056c35ebc79dc9d 100644 --- a/src/content/docs/ai-gateway/integrations/aig-workers-ai-binding.mdx +++ b/src/content/docs/ai-gateway/integrations/aig-workers-ai-binding.mdx @@ -80,13 +80,17 @@ export interface Env { export default { async fetch(request, env): Promise { // Specify the gateway label and other options here - const response = await env.AI.run("@cf/meta/llama-3.1-8b-instruct-fast", { - prompt: "What is the origin of the phrase Hello, World", - gateway: { - id: "GATEWAYID", // Use your gateway label here - skipCache: true, // Optional: Skip cache if needed + const response = await env.AI.run( + "@cf/meta/llama-3.1-8b-instruct-fast", + { + prompt: "What is the origin of the phrase Hello, World", + }, + { + gateway: { + id: "GATEWAYID", // Use your gateway label here + skipCache: true, // Optional: Skip cache if needed + }, }, - }); // Return the AI response as a JSON object return new Response(JSON.stringify(response), {