Installation and Setup
Make sure you have NodeJS v18 or higher.
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.
yarn create llama
pnpm create llama@latest
to get started. Once your app is generated, run
npm run dev
pnpm run dev
to start the development server. You can then visit http://localhost:3000 to see your app
Installation from NPM
npm install llamaindex
yarn add llamaindex
pnpm add llamaindex
Our examples use OpenAI by default. You'll need to set up your Open AI key like so:
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
WARNING: do not check in your OpenAI key into version control.