Skip to content

Commit 5455ac3

Browse files
daisyfaithaumaRebeccaTamachiro
authored andcommitted
[Workers AI]moved markdown to features (#21716)
* moved markdown to features * links * redirect
1 parent d5e855a commit 5455ac3

File tree

6 files changed

+32
-25
lines changed

6 files changed

+32
-25
lines changed

public/__redirects

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,10 +1607,14 @@
16071607
# Guides section
16081608
/workers-ai/demos/ /workers-ai/guides/demos-architectures/ 301
16091609

1610+
# Features section
1611+
/workers-ai/markdown-conversion/ /workers-ai/features/markdown-conversion/ 301
1612+
16101613
# workflows
16111614

16121615
/workflows/reference/storage-options/ /workers/platform/storage-options/ 301
16131616

1617+
16141618
# workers KV
16151619
/kv/platform/environments/ /kv/reference/environments/ 301
16161620
/kv/platform/kv-commands/ /kv/reference/kv-commands/ 301

src/content/changelog/workers-ai/2025-03-20-markdown-conversion.mdx

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,30 @@ In this example, we fetch a PDF document and an image from R2 and feed them both
1414
import { Env } from "./env";
1515

1616
export default {
17-
async fetch(request: Request, env: Env, ctx: ExecutionContext) {
18-
19-
// https://pub-979cb28270cc461d94bc8a169d8f389d.r2.dev/somatosensory.pdf
20-
const pdf = await env.R2.get('somatosensory.pdf');
21-
22-
// https://pub-979cb28270cc461d94bc8a169d8f389d.r2.dev/cat.jpeg
23-
const cat = await env.R2.get('cat.jpeg');
24-
25-
return Response.json(
26-
await env.AI.toMarkdown([
27-
{
28-
name: "somatosensory.pdf",
29-
blob: new Blob([await pdf.arrayBuffer()], { type: "application/octet-stream" }),
30-
},
31-
{
32-
name: "cat.jpeg",
33-
blob: new Blob([await cat.arrayBuffer()], { type: "application/octet-stream" }),
34-
},
35-
]),
36-
);
37-
},
17+
async fetch(request: Request, env: Env, ctx: ExecutionContext) {
18+
// https://pub-979cb28270cc461d94bc8a169d8f389d.r2.dev/somatosensory.pdf
19+
const pdf = await env.R2.get("somatosensory.pdf");
20+
21+
// https://pub-979cb28270cc461d94bc8a169d8f389d.r2.dev/cat.jpeg
22+
const cat = await env.R2.get("cat.jpeg");
23+
24+
return Response.json(
25+
await env.AI.toMarkdown([
26+
{
27+
name: "somatosensory.pdf",
28+
blob: new Blob([await pdf.arrayBuffer()], {
29+
type: "application/octet-stream",
30+
}),
31+
},
32+
{
33+
name: "cat.jpeg",
34+
blob: new Blob([await cat.arrayBuffer()], {
35+
type: "application/octet-stream",
36+
}),
37+
},
38+
]),
39+
);
40+
},
3841
};
3942
```
4043

@@ -59,4 +62,4 @@ This is the result:
5962
]
6063
```
6164

62-
See [Markdown Conversion](/workers-ai/markdown-conversion/) for more information on supported formats, REST API and pricing.
65+
See [Markdown Conversion](/workers-ai/features/markdown-conversion/) for more information on supported formats, REST API and pricing.

src/content/docs/autorag/concepts/how-autorag-works.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Indexing begins automatically when you create an AutoRAG instance and connect a
1919
Here is what happens during indexing:
2020

2121
1. **Data ingestion:** AutoRAG reads from your connected data source.
22-
2. **Markdown conversion:** AutoRAG uses [Workers AI’s Markdown Conversion](/workers-ai/markdown-conversion/) to convert [supported data types](/autorag/configuration/data-source/) into structured Markdown. This ensures consistency across diverse file types. For images, Workers AI is used to perform object detection followed by vision-to-language transformation to convert images into Markdown text.
22+
2. **Markdown conversion:** AutoRAG uses [Workers AI’s Markdown Conversion](/workers-ai/features/markdown-conversion/) to convert [supported data types](/autorag/configuration/data-source/) into structured Markdown. This ensures consistency across diverse file types. For images, Workers AI is used to perform object detection followed by vision-to-language transformation to convert images into Markdown text.
2323
3. **Chunking:** The extracted text is [chunked](/autorag/configuration/chunking/) into smaller pieces to improve retrieval granularity.
2424
4. **Embedding:** Each chunk is embedded using Workers AI’s embedding model to transform the content into vectors.
2525
5. **Vector storage:** The resulting vectors, along with metadata like file name, are stored in a the [Vectorize](/vectorize/) database created on your Cloudflare account.

src/content/docs/autorag/configuration/data-source.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@ AutoRAG supports the following plain text file types:
5555

5656
### Rich format file types
5757

58-
AutoRAG uses [Markdown Conversion](/workers-ai/markdown-conversion/) to convert rich format files to markdown. The following table lists the supported formats that will be converted to Markdown:
58+
AutoRAG uses [Markdown Conversion](/workers-ai/features/markdown-conversion/) to convert rich format files to markdown. The following table lists the supported formats that will be converted to Markdown:
5959

6060
<Render file="markdown-conversion-support" product="workers-ai" />
File renamed without changes.

src/content/partials/workers-ai/markdown-conversion-support.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,4 @@
109109

110110
<sup>1</sup> Image conversion uses two Workers AI models for object detection
111111
and summarization. See [Workers AI
112-
pricing](/workers-ai/markdown-conversion/#pricing) for more details.
112+
pricing](/workers-ai/features/markdown-conversion/#pricing) for more details.

0 commit comments

Comments
 (0)