Skip to content

Commit becf9c4

Browse files
committed
fix tabs closing tags
1 parent 1713f92 commit becf9c4

File tree

1 file changed

+33
-27
lines changed

1 file changed

+33
-27
lines changed

src/content/docs/agents/index.mdx

Lines changed: 33 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,42 @@ Build full-stack AI applications with Vectorize, Cloudflare’s vector database.
6363
</TabItem>
6464
<TabItem label="Browser Rendering">
6565

66+
Use the [Browser Rendering API](/browser-rendering/) to allow your agents to search the web, take screenshots, and directly interact with websites.
67+
68+
```ts
69+
70+
```
71+
72+
6673
</TabItem>
6774
<TabItem label="AI Gateway">
6875

76+
Use [AI Gateway](/ai-gateway/) to cache, log, retry and run [evals](/ai-gateway/evaluations/) (evaluations) for your agents, no matter where they're deployed.
77+
78+
```py
79+
from anthropic import Anthropic
80+
81+
anthropic = Anthropic(
82+
api_key="<your_anthropic_api_key>",
83+
# Route, cache, fallback and log prompt-response pairs between your app
84+
# and your AI model provider.
85+
base_url="https://gateway.ai.cloudflare.com/v1/${accountId}/${gatewayId}/anthropic"
86+
)
87+
88+
message = anthropic.messages.create(
89+
model="claude-3-opus-20240229",
90+
max_tokens=1000,
91+
messages=[{
92+
"role": "user",
93+
"content": "Generate a Cloudflare Worker that returns a simple JSON payload based on a query param",
94+
}]
95+
)
96+
97+
print(message.content)
98+
```
99+
69100
</TabItem>
101+
</Tabs>
70102

71103
## Use your favorite AI framework
72104

@@ -230,32 +262,6 @@ export default {
230262
```
231263

232264
</TabItem>
233-
<TabItem label="AI Gateway">
234-
235-
Use [AI Gateway](/ai-gateway/) to cache, log, retry and run [evals](/ai-gateway/evaluations/) (evaluations) for your agents, no matter where they're deployed.
236-
237-
```py
238-
from anthropic import Anthropic
239-
240-
anthropic = Anthropic(
241-
api_key="<your_anthropic_api_key>",
242-
# Route, cache, fallback and log prompt-response pairs between your app
243-
# and your AI model provider.
244-
base_url="https://gateway.ai.cloudflare.com/v1/${accountId}/${gatewayId}/anthropic"
245-
)
246-
247-
message = anthropic.messages.create(
248-
model="claude-3-opus-20240229",
249-
max_tokens=1000,
250-
messages=[{
251-
"role": "user",
252-
"content": "Generate a Cloudflare Worker that returns a simple JSON payload based on a query param",
253-
}]
254-
)
255-
256-
print(message.content)
257-
```
258-
259-
</TabItem>
265+
</Tabs>
260266

261267
***

0 commit comments

Comments
 (0)