![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
create-llama
Advanced tools
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
npx create-llama@latest
to get started, or see below for more options. Once your app is generated, run
npm run dev
to start the development server. You can then visit http://localhost:3000 to see your app.
ContextChatEngine
or SimpleChatEngine
SimpleChatEngine
will just talk to the LLM directly without using your dataContextChatEngine
will use your data to answer questions (see below).If you've enabled ContextChatEngine
, you can supply your own data and the app will index it and answer questions. Your generated app will have a folder called data
:
./data
./backend/data
The app will ingest any supported files you put in this directory. Your Next.js and Express apps use LlamaIndex.TS so they will be able to ingest any PDF, text, CSV, Markdown, Word and HTML files. The Python backend can read even more types, including video and audio files.
Before you can use your data, you need to index it. If you're using the Next.js or Express apps, run:
npm run generate
Then re-start your app. Remember you'll need to re-run generate
if you add new files to your data
folder. If you're using the Python backend, you can trigger indexing of your data by deleting the ./storage
folder and re-starting the app.
It's optional! If you've selected the Python or Express back-ends, just delete the frontend
folder and you'll get an API without any front-end code.
By default the app will use OpenAI's gpt-3.5-turbo model. If you want to use GPT-4, you can modify this by editing a file:
./app/api/chat/route.ts
and replace gpt-3.5-turbo
with gpt-4
./backend/src/controllers/chat.controller.ts
and likewise replace gpt-3.5-turbo
with gpt-4
./backend/app/utils/index.py
and once again replace gpt-3.5-turbo
with gpt-4
You can also replace OpenAI with one of our dozens of other supported LLMs.
The simplest thing to do is run create-llama
in interactive mode:
npx create-llama@latest
# or
npm create llama@latest
# or
yarn create llama
# or
pnpm create llama@latest
You will be asked for the name of your project, along with other configuration options, something like this:
>> npm create llama@latest
Need to install the following packages:
create-llama@latest
Ok to proceed? (y) y
✔ What is your project named? … my-app
✔ Which template would you like to use? › Chat with streaming
✔ Which framework would you like to use? › NextJS
✔ Which UI would you like to use? › Just HTML
✔ Which chat engine would you like to use? › ContextChatEngine
✔ Please provide your OpenAI API key (leave blank to skip): …
✔ Would you like to use ESLint? … No / Yes
Creating a new LlamaIndex app in /home/my-app.
You can also pass command line arguments to set up a new project
non-interactively. See create-llama --help
:
create-llama <project-directory> [options]
Options:
-V, --version output the version number
--use-npm
Explicitly tell the CLI to bootstrap the app using npm
--use-pnpm
Explicitly tell the CLI to bootstrap the app using pnpm
--use-yarn
Explicitly tell the CLI to bootstrap the app using Yarn
Inspired by and adapted from create-next-app
0.0.12
FAQs
Create LlamaIndex-powered apps with one command
The npm package create-llama receives a total of 196 weekly downloads. As such, create-llama popularity was classified as not popular.
We found that create-llama demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.