From ee86f36128bff627b39f283305607412bf6579d3 Mon Sep 17 00:00:00 2001 From: thucpn Date: Fri, 20 Dec 2024 16:00:05 +0700 Subject: [PATCH 1/3] fix: docs migration issues --- README.md | 2 +- .../docs/llamaindex/getting_started/index.mdx | 40 +++++++++++++++++- .../getting_started/setup/cloudflare.mdx | 2 +- .../getting_started/setup/getting-started.mdx | 42 ------------------- .../getting_started/setup/meta.json | 9 +--- .../llamaindex/getting_started/setup/next.mdx | 2 +- .../llamaindex/getting_started/setup/node.mdx | 2 +- .../llamaindex/getting_started/setup/vite.mdx | 2 +- .../content/docs/llamaindex/guide/meta.json | 2 +- 9 files changed, 46 insertions(+), 57 deletions(-) delete mode 100644 apps/next/src/content/docs/llamaindex/getting_started/setup/getting-started.mdx diff --git a/README.md b/README.md index 171499c197..fc0a07ee8e 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ yarn add llamaindex ### Setup in Node.js, Deno, Bun, TypeScript...? -See our official document: +See our official document: ### Tips when using in non-Node.js environments diff --git a/apps/next/src/content/docs/llamaindex/getting_started/index.mdx b/apps/next/src/content/docs/llamaindex/getting_started/index.mdx index f77fa845a0..b0cc4ffcf8 100644 --- a/apps/next/src/content/docs/llamaindex/getting_started/index.mdx +++ b/apps/next/src/content/docs/llamaindex/getting_started/index.mdx @@ -4,6 +4,13 @@ description: Install llamaindex by running a single command. --- import { Tab, Tabs } from "fumadocs-ui/components/tabs"; +import { + SiNodedotjs, + SiTypescript, + SiNextdotjs, + SiCloudflareworkers, + SiVite +} from "@icons-pack/react-simple-icons"; ```shell tab="npm" @@ -19,13 +26,44 @@ import { Tab, Tabs } from "fumadocs-ui/components/tabs"; ``` + + + Node.js + + } href="/docs/llamaindex/getting_started/setup/node" /> + + TypeScript + + } href="/docs/llamaindex/getting_started/setup/typescript" /> + + Vite + + } href="/docs/llamaindex/getting_started/setup/vite" /> + + Next.js (React Server Component) + + } + href="/docs/llamaindex/getting_started/setup/next" + /> + + Cloudflare Workers + + } href="/docs/llamaindex/getting_started/setup/cloudflare" /> + + ## What's next? Also, you need have the basic understanding of Cloudflare Worker. diff --git a/apps/next/src/content/docs/llamaindex/getting_started/setup/getting-started.mdx b/apps/next/src/content/docs/llamaindex/getting_started/setup/getting-started.mdx deleted file mode 100644 index f65880d920..0000000000 --- a/apps/next/src/content/docs/llamaindex/getting_started/setup/getting-started.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: Getting Started -description: We support multiple JS runtime and frameworks, bundlers. ---- -import { - SiNodedotjs, - SiTypescript, - SiNextdotjs, - SiCloudflareworkers, - SiVite -} from "@icons-pack/react-simple-icons"; - - - - Node.js - - } href="/docs/llamaindex/setup/node" /> - - TypeScript - - } href="/docs/llamaindex/setup/typescript" /> - - Vite - - } href="/docs/llamaindex/setup/vite" /> - - Next.js (React Server Component) - - } - href="/docs/llamaindex/setup/next" - /> - - Cloudflare Workers - - } href="/docs/llamaindex/setup/cloudflare" /> - diff --git a/apps/next/src/content/docs/llamaindex/getting_started/setup/meta.json b/apps/next/src/content/docs/llamaindex/getting_started/setup/meta.json index 7d84e67070..1ea0d8bb76 100644 --- a/apps/next/src/content/docs/llamaindex/getting_started/setup/meta.json +++ b/apps/next/src/content/docs/llamaindex/getting_started/setup/meta.json @@ -2,12 +2,5 @@ "title": "Setup", "description": "The setup guide", "defaultOpen": true, - "pages": [ - "getting-started", - "next", - "node", - "typescript", - "vite", - "cloudflare" - ] + "pages": ["next", "node", "typescript", "vite", "cloudflare"] } diff --git a/apps/next/src/content/docs/llamaindex/getting_started/setup/next.mdx b/apps/next/src/content/docs/llamaindex/getting_started/setup/next.mdx index 135e1543e4..7f7ab87ed5 100644 --- a/apps/next/src/content/docs/llamaindex/getting_started/setup/next.mdx +++ b/apps/next/src/content/docs/llamaindex/getting_started/setup/next.mdx @@ -7,7 +7,7 @@ Before you start, make sure you have try LlamaIndex.TS in Node.js to make sure y ## Differences between Node.js and Next.js diff --git a/apps/next/src/content/docs/llamaindex/getting_started/setup/node.mdx b/apps/next/src/content/docs/llamaindex/getting_started/setup/node.mdx index dd06e41f95..e49bc79c09 100644 --- a/apps/next/src/content/docs/llamaindex/getting_started/setup/node.mdx +++ b/apps/next/src/content/docs/llamaindex/getting_started/setup/node.mdx @@ -26,5 +26,5 @@ For more information, see the [How to read environment variables from Node.js](h diff --git a/apps/next/src/content/docs/llamaindex/getting_started/setup/vite.mdx b/apps/next/src/content/docs/llamaindex/getting_started/setup/vite.mdx index 441727707e..c75c8fed93 100644 --- a/apps/next/src/content/docs/llamaindex/getting_started/setup/vite.mdx +++ b/apps/next/src/content/docs/llamaindex/getting_started/setup/vite.mdx @@ -7,7 +7,7 @@ Before you start, make sure you have try LlamaIndex.TS in Node.js to make sure y Also, make sure you have a basic understanding of [Vite](https://vitejs.dev/). diff --git a/apps/next/src/content/docs/llamaindex/guide/meta.json b/apps/next/src/content/docs/llamaindex/guide/meta.json index d03e40e3ac..b5d74a767e 100644 --- a/apps/next/src/content/docs/llamaindex/guide/meta.json +++ b/apps/next/src/content/docs/llamaindex/guide/meta.json @@ -1,5 +1,5 @@ { "title": "Guide", "description": "See our guide", - "pages": ["workflow", "chat", "agents", "loading", "cost-analysis"] + "pages": ["loading", "workflow", "chat", "agents", "cost-analysis"] } From 70b4d4d2063f92591c30de57e32cbf95db7a7da8 Mon Sep 17 00:00:00 2001 From: thucpn Date: Fri, 20 Dec 2024 16:04:15 +0700 Subject: [PATCH 2/3] remove icons --- .../src/content/docs/llamaindex/getting_started/index.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/next/src/content/docs/llamaindex/getting_started/index.mdx b/apps/next/src/content/docs/llamaindex/getting_started/index.mdx index b0cc4ffcf8..417d2a0cd0 100644 --- a/apps/next/src/content/docs/llamaindex/getting_started/index.mdx +++ b/apps/next/src/content/docs/llamaindex/getting_started/index.mdx @@ -26,7 +26,7 @@ import { ``` - +{/* Node.js @@ -55,7 +55,7 @@ import { Cloudflare Workers } href="/docs/llamaindex/getting_started/setup/cloudflare" /> - + */} ## What's next? From 5327cb834dac9cb44b722f4720c115e76516739f Mon Sep 17 00:00:00 2001 From: thucpn Date: Fri, 20 Dec 2024 16:19:54 +0700 Subject: [PATCH 3/3] fix: installation --- .../docs/llamaindex/getting_started/index.mdx | 42 +------------------ .../getting_started/setup/index.mdx | 42 +++++++++++++++++++ .../getting_started/setup/meta.json | 2 +- .../retrieval_augmented_generation.mdx | 2 +- .../structured_data_extraction.mdx | 2 +- 5 files changed, 47 insertions(+), 43 deletions(-) create mode 100644 apps/next/src/content/docs/llamaindex/getting_started/setup/index.mdx diff --git a/apps/next/src/content/docs/llamaindex/getting_started/index.mdx b/apps/next/src/content/docs/llamaindex/getting_started/index.mdx index 417d2a0cd0..01e71a398f 100644 --- a/apps/next/src/content/docs/llamaindex/getting_started/index.mdx +++ b/apps/next/src/content/docs/llamaindex/getting_started/index.mdx @@ -1,16 +1,9 @@ --- -title: Getting Started with LlamaIndex.TS +title: Installation description: Install llamaindex by running a single command. --- import { Tab, Tabs } from "fumadocs-ui/components/tabs"; -import { - SiNodedotjs, - SiTypescript, - SiNextdotjs, - SiCloudflareworkers, - SiVite -} from "@icons-pack/react-simple-icons"; ```shell tab="npm" @@ -26,44 +19,13 @@ import { ``` -{/* - - Node.js - - } href="/docs/llamaindex/getting_started/setup/node" /> - - TypeScript - - } href="/docs/llamaindex/getting_started/setup/typescript" /> - - Vite - - } href="/docs/llamaindex/getting_started/setup/vite" /> - - Next.js (React Server Component) - - } - href="/docs/llamaindex/getting_started/setup/next" - /> - - Cloudflare Workers - - } href="/docs/llamaindex/getting_started/setup/cloudflare" /> - */} - ## What's next? + + Node.js + + } href="/docs/llamaindex/getting_started/setup/node" /> + + TypeScript + + } href="/docs/llamaindex/getting_started/setup/typescript" /> + + Vite + + } href="/docs/llamaindex/getting_started/setup/vite" /> + + Next.js (React Server Component) + + } + href="/docs/llamaindex/getting_started/setup/next" + /> + + Cloudflare Workers + + } href="/docs/llamaindex/getting_started/setup/cloudflare" /> + \ No newline at end of file diff --git a/apps/next/src/content/docs/llamaindex/getting_started/setup/meta.json b/apps/next/src/content/docs/llamaindex/getting_started/setup/meta.json index 1ea0d8bb76..2a5e97a348 100644 --- a/apps/next/src/content/docs/llamaindex/getting_started/setup/meta.json +++ b/apps/next/src/content/docs/llamaindex/getting_started/setup/meta.json @@ -2,5 +2,5 @@ "title": "Setup", "description": "The setup guide", "defaultOpen": true, - "pages": ["next", "node", "typescript", "vite", "cloudflare"] + "pages": ["index", "next", "node", "typescript", "vite", "cloudflare"] } diff --git a/apps/next/src/content/docs/llamaindex/getting_started/starter_tutorial/retrieval_augmented_generation.mdx b/apps/next/src/content/docs/llamaindex/getting_started/starter_tutorial/retrieval_augmented_generation.mdx index 2da654d1e8..eef95d0e80 100644 --- a/apps/next/src/content/docs/llamaindex/getting_started/starter_tutorial/retrieval_augmented_generation.mdx +++ b/apps/next/src/content/docs/llamaindex/getting_started/starter_tutorial/retrieval_augmented_generation.mdx @@ -17,7 +17,7 @@ npm init npm install -D typescript @types/node ``` -Then, check out the [installation](../installation) steps to install LlamaIndex.TS and prepare an OpenAI key. +Then, check out the [installation](../setup) steps to install LlamaIndex.TS and prepare an OpenAI key. You can use [other LLMs](../../examples/other_llms) via their APIs; if you would prefer to use local models check out our [local LLM example](../../examples/local_llm). diff --git a/apps/next/src/content/docs/llamaindex/getting_started/starter_tutorial/structured_data_extraction.mdx b/apps/next/src/content/docs/llamaindex/getting_started/starter_tutorial/structured_data_extraction.mdx index e925192cd1..e88d93efe5 100644 --- a/apps/next/src/content/docs/llamaindex/getting_started/starter_tutorial/structured_data_extraction.mdx +++ b/apps/next/src/content/docs/llamaindex/getting_started/starter_tutorial/structured_data_extraction.mdx @@ -5,7 +5,7 @@ title: Structured data extraction tutorial import { DynamicCodeBlock } from 'fumadocs-ui/components/dynamic-codeblock'; import CodeSource from "!raw-loader!../../../../../../../../examples/jsonExtract"; -Make sure you have installed LlamaIndex.TS and have an OpenAI key. If you haven't, check out the [installation](../installation) guide. +Make sure you have installed LlamaIndex.TS and have an OpenAI key. If you haven't, check out the [installation](../setup) guide. You can use [other LLMs](../../examples/other_llms) via their APIs; if you would prefer to use local models check out our [local LLM example](../../examples/local_llm).