Skip to content

Commit 62bdcf1

Browse files
committed
Create C3 Frameworks component and rename Typescript to TypeScript
1 parent bbfd90e commit 62bdcf1

File tree

53 files changed

+644
-645
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+644
-645
lines changed

src/components/models/code/AutomaticSpeechRecognitionCode.astro

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Code, Details } from "~/components";
55
type Props = z.infer<typeof props>;
66
77
const props = z.object({
8-
name: z.string()
8+
name: z.string(),
99
});
1010
1111
const { name } = props.parse(Astro.props);
@@ -36,7 +36,6 @@ export default {
3636
} satisfies ExportedHandler<Env>;
3737
`;
3838
39-
4039
const curl = `
4140
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run/${name} \\
4241
-X POST \\
@@ -46,11 +45,10 @@ curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run
4645
---
4746

4847
<h2>Code Examples</h2>
49-
<Details header="Workers - Typescript">
50-
<Code code={worker} lang="ts" />
48+
<Details header="Workers - TypeScript">
49+
<Code code={worker} lang="ts" />
5150
</Details>
5251

5352
<Details header="curl">
54-
<Code code={curl} lang="sh" />
53+
<Code code={curl} lang="sh" />
5554
</Details>
56-

src/components/models/code/ImageClassificationCode.astro

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Code, Details } from "~/components";
55
type Props = z.infer<typeof props>;
66
77
const props = z.object({
8-
name: z.string()
8+
name: z.string(),
99
});
1010
1111
const { name } = props.parse(Astro.props);
@@ -34,7 +34,6 @@ export default {
3434
} satisfies ExportedHandler<Env>;
3535
`;
3636
37-
3837
const curl = `
3938
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run/${name} \\
4039
-X POST \\
@@ -44,11 +43,10 @@ curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run
4443
---
4544

4645
<h2>Code Examples</h2>
47-
<Details header="Workers - Typescript">
48-
<Code code={worker} lang="ts" />
46+
<Details header="Workers - TypeScript">
47+
<Code code={worker} lang="ts" />
4948
</Details>
5049

5150
<Details header="curl">
52-
<Code code={curl} lang="sh" />
51+
<Code code={curl} lang="sh" />
5352
</Details>
54-

src/components/models/code/ImageToTextCode.astro

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Code, Details } from "~/components";
55
type Props = z.infer<typeof props>;
66
77
const props = z.object({
8-
name: z.string()
8+
name: z.string(),
99
});
1010
1111
const { name } = props.parse(Astro.props);
@@ -36,7 +36,6 @@ export default {
3636
---
3737

3838
<h2>Code Examples</h2>
39-
<Details header="Workers - Typescript">
40-
<Code code={worker} lang="ts" />
39+
<Details header="Workers - TypeScript">
40+
<Code code={worker} lang="ts" />
4141
</Details>
42-

src/components/models/code/ObjectDetectionCode.astro

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Code, Details } from "~/components";
55
type Props = z.infer<typeof props>;
66
77
const props = z.object({
8-
name: z.string()
8+
name: z.string(),
99
});
1010
1111
const { name } = props.parse(Astro.props);
@@ -34,7 +34,6 @@ export default {
3434
} satisfies ExportedHandler<Env>;
3535
`;
3636
37-
3837
const curl = `
3938
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run/${name} \\
4039
-X POST \\
@@ -44,11 +43,10 @@ curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run
4443
---
4544

4645
<h2>Code Examples</h2>
47-
<Details header="Workers - Typescript">
48-
<Code code={worker} lang="ts" />
46+
<Details header="Workers - TypeScript">
47+
<Code code={worker} lang="ts" />
4948
</Details>
5049

5150
<Details header="curl">
52-
<Code code={curl} lang="sh" />
51+
<Code code={curl} lang="sh" />
5352
</Details>
54-

src/components/models/code/StableDiffusion-v1-5-img2imgCode.astro

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Code, Details } from "~/components";
55
type Props = z.infer<typeof props>;
66
77
const props = z.object({
8-
name: z.string()
8+
name: z.string(),
99
});
1010
1111
const { name } = props.parse(Astro.props);
@@ -42,7 +42,6 @@ export default {
4242
} satisfies ExportedHandler<Env>;
4343
`;
4444
45-
4645
const curl = `
4746
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run/${name} \\
4847
-X POST \\
@@ -52,11 +51,10 @@ curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run
5251
---
5352

5453
<h2>Code Examples</h2>
55-
<Details header="Workers - Typescript">
56-
<Code code={worker} lang="ts" />
54+
<Details header="Workers - TypeScript">
55+
<Code code={worker} lang="ts" />
5756
</Details>
5857

5958
<Details header="curl">
60-
<Code code={curl} lang="sh" />
59+
<Code code={curl} lang="sh" />
6160
</Details>
62-

src/components/models/code/StableDiffusion-v1-5-inpaintingCode.astro

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Code, Details } from "~/components";
55
type Props = z.infer<typeof props>;
66
77
const props = z.object({
8-
name: z.string()
8+
name: z.string(),
99
});
1010
1111
const { name } = props.parse(Astro.props);
@@ -49,7 +49,6 @@ export default {
4949
} satisfies ExportedHandler<Env>;
5050
`;
5151
52-
5352
const curl = `
5453
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run/${name} \\
5554
-X POST \\
@@ -59,11 +58,10 @@ curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run
5958
---
6059

6160
<h2>Code Examples</h2>
62-
<Details header="Workers - Typescript">
63-
<Code code={worker} lang="ts" />
61+
<Details header="Workers - TypeScript">
62+
<Code code={worker} lang="ts" />
6463
</Details>
6564

6665
<Details header="curl">
67-
<Code code={curl} lang="sh" />
66+
<Code code={curl} lang="sh" />
6867
</Details>
69-

src/components/models/code/SummarizationCode.astro

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Code, Details } from "~/components";
55
type Props = z.infer<typeof props>;
66
77
const props = z.object({
8-
name: z.string()
8+
name: z.string(),
99
});
1010
1111
const { name } = props.parse(Astro.props);
@@ -26,7 +26,6 @@ export default {
2626
} satisfies ExportedHandler<Env>;
2727
`;
2828
29-
3029
const curl = `
3130
curl https://api.cloudflare.com/client/v4/accounts/{cf_account_id}/ai/run/${name} \\
3231
-H "Authorization: Bearer {cf_api_token}" \\
@@ -38,11 +37,10 @@ curl https://api.cloudflare.com/client/v4/accounts/{cf_account_id}/ai/run/${name
3837
---
3938

4039
<h2>Code Examples</h2>
41-
<Details header="Workers - Typescript">
42-
<Code code={worker} lang="ts" />
40+
<Details header="Workers - TypeScript">
41+
<Code code={worker} lang="ts" />
4342
</Details>
4443

4544
<Details header="curl">
46-
<Code code={curl} lang="sh" />
45+
<Code code={curl} lang="sh" />
4746
</Details>
48-

src/components/models/code/TextClassificationCode.astro

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Code, Details } from "~/components";
55
type Props = z.infer<typeof props>;
66
77
const props = z.object({
8-
name: z.string()
8+
name: z.string(),
99
});
1010
1111
const { name } = props.parse(Astro.props);
@@ -40,8 +40,7 @@ def run(model, input):
4040
4141
output = run("${name}", { "text": "This pizza is great!" })
4242
print(output)
43-
`
44-
43+
`;
4544
4645
const curl = `
4746
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run/${name} \\
@@ -52,15 +51,14 @@ curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run
5251
---
5352

5453
<h2>Code Examples</h2>
55-
<Details header="Workers - Typescript">
56-
<Code code={worker} lang="ts" />
54+
<Details header="Workers - TypeScript">
55+
<Code code={worker} lang="ts" />
5756
</Details>
5857

5958
<Details header="Python">
60-
<Code code={python} lang="py" />
59+
<Code code={python} lang="py" />
6160
</Details>
6261

6362
<Details header="curl">
64-
<Code code={curl} lang="sh" />
63+
<Code code={curl} lang="sh" />
6564
</Details>
66-

src/components/models/code/TextEmbeddingCode.astro

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Aside, Code, Details } from "~/components";
55
type Props = z.infer<typeof props>;
66
77
const props = z.object({
8-
name: z.string()
8+
name: z.string(),
99
});
1010
1111
const { name } = props.parse(Astro.props);
@@ -58,36 +58,35 @@ response = requests.post(
5858
)
5959
6060
print(response.json())
61-
`
62-
61+
`;
6362
6463
const curl = `
6564
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run/${name} \\
6665
-X POST \\
6766
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \\
6867
-d '{ "text": ["This is a story about an orange cloud", "This is a story about a llama", "This is a story about a hugging emoji"] }'
69-
`
68+
`;
7069
---
7170

7271
<h2>Code Examples</h2>
73-
<Details header="Workers - Typescript">
74-
<Code code={worker} lang="ts" />
72+
<Details header="Workers - TypeScript">
73+
<Code code={worker} lang="ts" />
7574
</Details>
7675

7776
<Details header="Python">
78-
<Code code={python} lang="py" />
77+
<Code code={python} lang="py" />
7978
</Details>
8079

8180
<Details header="curl">
82-
<Code code={curl} lang="sh" />
81+
<Code code={curl} lang="sh" />
8382
</Details>
8483

8584
<Aside type="note" title="OpenAI compatible endpoints">
86-
Workers AI also supports OpenAI compatible API endpoints for{" "}
87-
<code>/v1/chat/completions</code> and <code>/v1/embeddings</code>. For
88-
more details, refer to{" "}
89-
<a href="/workers-ai/configuration/open-ai-compatibility/">
90-
Configurations
91-
</a>
92-
.
93-
</Aside>
85+
Workers AI also supports OpenAI compatible API endpoints for{" "}
86+
<code>/v1/chat/completions</code> and <code>/v1/embeddings</code>. For more
87+
details, refer to{" "}
88+
<a href="/workers-ai/configuration/open-ai-compatibility/">
89+
Configurations
90+
</a>
91+
.
92+
</Aside>

src/components/models/code/TextToImageCode.astro

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Code, Details } from "~/components";
55
type Props = z.infer<typeof props>;
66
77
const props = z.object({
8-
name: z.string()
8+
name: z.string(),
99
});
1010
1111
const { name } = props.parse(Astro.props);
@@ -36,7 +36,6 @@ export default {
3636
} satisfies ExportedHandler<Env>;
3737
`;
3838
39-
4039
const curl = `
4140
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run/${name} \\
4241
-X POST \\
@@ -46,11 +45,10 @@ curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run
4645
---
4746

4847
<h2>Code Examples</h2>
49-
<Details header="Workers - Typescript">
50-
<Code code={worker} lang="ts" />
48+
<Details header="Workers - TypeScript">
49+
<Code code={worker} lang="ts" />
5150
</Details>
5251

5352
<Details header="curl">
54-
<Code code={curl} lang="sh" />
53+
<Code code={curl} lang="sh" />
5554
</Details>
56-

0 commit comments

Comments
 (0)