You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/ai-gateway/integrations/worker-binding-methods.mdx
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,8 @@ binding = "AI"
25
25
26
26
This configuration sets up the AI binding accessible in your Worker code as `env.AI`.
27
27
28
+
<Renderfile="wrangler-typegen" />
29
+
28
30
## 2. Basic Usage with Workers AI + Gateway
29
31
30
32
To perform an inference task using Workers AI and an AI Gateway, you can use the following code:
@@ -78,7 +80,7 @@ gateway.patchLog("my-log-id", {
78
80
79
81
### 3.2. `getLog`: Read Log Details
80
82
81
-
The `getLog` method retrieves details of a specific log ID. It returns an object of type `Promise<AiGatewayLog>`. If this type is missing, ensure you have run [`wrangler types`](/workers/languages/typescript/#generate-types)
83
+
The `getLog` method retrieves details of a specific log ID. It returns an object of type `Promise<AiGatewayLog>`. If this type is missing, ensure you have run [`wrangler types`](/workers/languages/typescript/#generate-types).
0 commit comments