From 52bc1d8387863539ea44d1e95e7cb7420e350a10 Mon Sep 17 00:00:00 2001 From: Marcus Schiesser <mail@marcusschiesser.de> Date: Tue, 28 Nov 2023 13:52:14 +0700 Subject: [PATCH] doc: added create-llama --- apps/docs/docs/installation.md | 25 ------------- apps/docs/docs/installation.mdx | 63 +++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 25 deletions(-) delete mode 100644 apps/docs/docs/installation.md create mode 100644 apps/docs/docs/installation.mdx diff --git a/apps/docs/docs/installation.md b/apps/docs/docs/installation.md deleted file mode 100644 index 8c5047244..000000000 --- a/apps/docs/docs/installation.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -sidebar_position: 1 ---- - -# Installation and Setup - -## Installation from NPM - -Make sure you have NodeJS v18 or higher. - -```bash npm2yarn -npm install llamaindex -``` - -## Environment variables - -Our examples use OpenAI by default. You'll need to set up your Open AI key like so: - -```bash -export OPENAI_API_KEY="sk-......" # Replace with your key from https://platform.openai.com/account/api-keys -``` - -If you want to have it automatically loaded every time, add it to your .zshrc/.bashrc. - -WARNING: do not check in your OpenAI key into version control. diff --git a/apps/docs/docs/installation.mdx b/apps/docs/docs/installation.mdx new file mode 100644 index 000000000..9dfa1085e --- /dev/null +++ b/apps/docs/docs/installation.mdx @@ -0,0 +1,63 @@ +--- +sidebar_position: 1 +--- + +# Installation and Setup + +Make sure you have NodeJS v18 or higher. + +## Using create-llama + +The easiest way to get started with LlamaIndex is by using `create-llama`. This CLI tool enables you to quickly start building a new LlamaIndex application, with everything set up for you. + +Just run + +<Tabs> +<TabItem value="1" label="npm" default> + +```bash +npx create-llama@latest +``` + +</TabItem> +<TabItem value="2" label="Yarn"> + +```bash +yarn create llama +``` + +</TabItem> +<TabItem value="3" label="pnpm"> + +```bash +pnpm create llama@latest +``` + +</TabItem> +</Tabs> + +to get started. Once your app is generated, run + +```bash npm2yarn +npm run dev +``` + +to start the development server. You can then visit [http://localhost:3000](http://localhost:3000) to see your app + +## Installation from NPM + +```bash npm2yarn +npm install llamaindex +``` + +### Environment variables + +Our examples use OpenAI by default. You'll need to set up your Open AI key like so: + +```bash +export OPENAI_API_KEY="sk-......" # Replace with your key from https://platform.openai.com/account/api-keys +``` + +If you want to have it automatically loaded every time, add it to your .zshrc/.bashrc. + +WARNING: do not check in your OpenAI key into version control. -- GitLab