Skip to content

Commit abd0436

Browse files
committed
Adding H3s to examples.
1 parent 54c4959 commit abd0436

File tree

12 files changed

+30
-6
lines changed

12 files changed

+30
-6
lines changed

src/content/docs/ai-gateway/providers/anthropic.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ curl https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/anthropic/v1
2727
}'
2828
```
2929

30+
### Use Anthropic SDK with JavaScript
31+
3032
If you are using the `@anthropic-ai/sdk`, you can set your endpoint like this:
3133

3234
```js title="JavaScript"

src/content/docs/ai-gateway/providers/azureopenai.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ curl 'https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/azure-opena
4141
}'
4242
```
4343

44+
### Use `openai-node` with JavaScript
45+
4446
If you are using the `openai-node` library, you can set your endpoint like this:
4547

4648
```js title="JavaScript"

src/content/docs/ai-gateway/providers/bedrock.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ When making requests to Amazon Bedrock, replace `https://bedrock-runtime.us-east
2020

2121
With Bedrock, you will need to sign the URL before you make requests to AI Gateway. You can try using the [`aws4fetch`](https://github.com/mhart/aws4fetch) SDK.
2222

23-
## Example:
23+
## Example
24+
25+
### Use `aws4fetch1` SDK with TypeScript
2426

2527
```typescript
2628
import { AwsClient } from "aws4fetch";

src/content/docs/ai-gateway/providers/cohere.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ curl https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/cohere/v1/ch
3131
}'
3232
```
3333

34+
### Use Cohere SDK with Python
35+
3436
If using the [`cohere-python-sdk`](https://github.com/cohere-ai/cohere-python), set your endpoint like this:
3537

3638
```js title="Python"

src/content/docs/ai-gateway/providers/google-ai-studio.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ curl "https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_name}/google-ai
5151
}'
5252
```
5353

54-
### JavaScript
54+
### Use `@google/generative-ai` with JavaScript
5555

5656
If you are using the `@google/generative-ai` package, you can set your endpoint like this:
5757

src/content/docs/ai-gateway/providers/grok.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ curl https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/grok/v1/chat
3737
}'
3838
```
3939

40+
### Use OpenAI SDK with JavaScript
41+
4042
If you are using the OpenAI SDK with JavaScript, you can set your endpoint like this:
4143

4244
```js title="JavaScript"
@@ -66,6 +68,8 @@ const completion = await openai.chat.completions.create({
6668
console.log(completion.choices[0].message);
6769
```
6870

71+
### Use OpenAI SDK with Python
72+
6973
If you are using the OpenAI SDK with Python, you can set your endpoint like this:
7074

7175
```python title="Python"
@@ -89,6 +93,8 @@ completion = client.chat.completions.create(
8993
print(completion.choices[0].message)
9094
```
9195

96+
### Use Anthropic SDK with JavaScript
97+
9298
If you are using the Anthropic SDK with JavaScript, you can set your endpoint like this:
9399

94100
```js title="JavaScript"
@@ -116,6 +122,8 @@ const msg = await anthropic.messages.create({
116122
console.log(msg);
117123
```
118124

125+
### Use Anthropic SDK with Python
126+
119127
If you are using the Anthropic SDK with Python, you can set your endpoint like this:
120128

121129
```python title="Python"

src/content/docs/ai-gateway/providers/groq.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ curl https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/groq/chat/co
3232
}'
3333
```
3434

35+
### Use Groq SDK with JavaScript
36+
3537
If using the [`groq-sdk`](https://www.npmjs.com/package/groq-sdk), set your endpoint like this:
3638

3739
```js title="JavaScript"

src/content/docs/ai-gateway/providers/huggingface.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ curl https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/huggingface/
2626
}'
2727
```
2828

29+
### Use HuggingFace.js library with JavaScript
30+
2931
If you are using the HuggingFace.js library, you can set your inference endpoint like this:
3032

3133
```js title="JavaScript"

src/content/docs/ai-gateway/providers/mistral.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ curl -X POST https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/mist
5050
}'
5151
```
5252

53-
### JavaScript
53+
### Use `@mistralai/mistralai` package with JavaScript
5454

5555
If you are using the `@mistralai/mistralai` package, you can set your endpoint like this:
5656

src/content/docs/ai-gateway/providers/open-router.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ curl -X POST https://gateway.ai.cloudflare.com/v1/ACCOUNT_TAG/GATEWAY/openrouter
3838

3939
```
4040

41-
### OpenAI SDK with JavaScript
41+
### Use OpenAI SDK with JavaScript
4242

4343
If you are using the OpenAI SDK with JavaScript, you can set your endpoint like this:
4444

0 commit comments

Comments
 (0)