Compare commits

..

15 Commits

Author SHA1 Message Date
yisding 25257f49d7 changeset 2023-11-14 14:50:27 -08:00
yisding dd615f106d fix #182 (thanks @RayFernando1337)
add license
make contextchatengine the default
change git commit message
2023-11-14 14:48:08 -08:00
yisding 5db64d61e0 Merge pull request #155 from team-dev-docs/avb-is-me-patch-1
Add Interactive Tutorials Using Codespaces
2023-11-14 12:08:07 -08:00
yisding ee5e1f94e4 create-llama 0.0.4 2023-11-14 09:16:13 -08:00
yisding 031e926414 changeset 2023-11-14 09:14:30 -08:00
yisding 88b4b3143d Merge pull request #181 from run-llama/logan/update_create_llama_readme
create-llama readme update
2023-11-14 09:09:15 -08:00
yisding c1ce84ecec Update README.md 2023-11-14 09:06:56 -08:00
Logan Markewich d670011363 typo 2023-11-14 10:57:16 -06:00
Logan Markewich c88332366b readme update 2023-11-14 10:30:55 -06:00
yisding cfee282c28 create-llama 0.0.3 2023-11-13 20:19:43 -08:00
yisding 91b42a3539 changeset 2023-11-13 20:15:18 -08:00
yisding 02b1d176c5 Merge pull request #180 from run-llama/fix/create-llama-version
fix: use llamaindex version and not create-llama version
2023-11-13 20:00:05 -08:00
Marcus Schiesser 63d072b8cc fix: use llamaindex version and not create-llama version 2023-11-14 10:50:26 +07:00
yisding 256d44f255 create llama 0.0.2 and llamaindex 0.0.35 2023-11-13 18:10:18 -08:00
avb-is-me a5ae1eea30 Update end_to_end.md
Adds interactive Dev-Docs Tutorials
2023-10-27 16:04:32 -07:00
15 changed files with 109 additions and 33 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"create-llama": patch
---
Fix issue where it doesn't find OpenAI Key when running npm run generate (#182) (thanks @RayFernando1337)
-5
View File
@@ -1,5 +0,0 @@
---
"llamaindex": patch
---
Add multimodal support (thanks Marcus)
-5
View File
@@ -1,5 +0,0 @@
---
"create-llama": patch
---
Hello Create Llama (thanks Marcus!)
+2
View File
@@ -6,6 +6,8 @@ sidebar_position: 4
We include several end-to-end examples using LlamaIndex.TS in the repository
Check out the examples below or try them out and complete them in minutes with interactive Github Codespace tutorials provided by Dev-Docs [here](https://codespaces.new/team-dev-docs/lits-dev-docs-playground?devcontainer_path=.devcontainer%2Fjavascript_ltsquickstart%2Fdevcontainer.json):
## [Chat Engine](https://github.com/run-llama/LlamaIndexTS/blob/main/apps/simple/chatEngine.ts)
Read a file and chat about it with the LLM.
+7
View File
@@ -1,5 +1,12 @@
# simple
## 0.0.33
### Patch Changes
- Updated dependencies [63f2108]
- llamaindex@0.0.35
## 0.0.32
### Patch Changes
+1 -1
View File
@@ -1,5 +1,5 @@
{
"version": "0.0.32",
"version": "0.0.33",
"private": true,
"name": "simple",
"dependencies": {
+6
View File
@@ -1,5 +1,11 @@
# llamaindex
## 0.0.35
### Patch Changes
- 63f2108: Add multimodal support (thanks Marcus)
## 0.0.34
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "llamaindex",
"version": "0.0.34",
"version": "0.0.35",
"license": "MIT",
"dependencies": {
"@anthropic-ai/sdk": "^0.9.0",
+19
View File
@@ -0,0 +1,19 @@
# create-llama
## 0.0.4
### Patch Changes
- 031e926: Update create-llama readme (thanks Logan)
## 0.0.3
### Patch Changes
- 91b42a3: change version (thanks Marcus)
## 0.0.2
### Patch Changes
- e2a6805: Hello Create Llama (thanks Marcus!)
+9
View File
@@ -0,0 +1,9 @@
The MIT License (MIT)
Copyright (c) 2023 LlamaIndex, Vercel, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+33 -9
View File
@@ -1,7 +1,16 @@
# Create LlamaIndex App
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.
To get started, use the following command:
The easiest way to get started with [LlamaIndex](https://www.llamaindex.ai/) is by using `create-llama`. This CLI tool enables you to quickly start building a new LlamaIndex application, with everything set up for you.
## Features
- NextJS, ExpressJS, or FastAPI (python) stateless backend generation 💻
- Streaming or non-streaming backend ⚡
- Optional `shadcn` frontend generation 🎨
## Get Started
You can run `create-llama` in interactive or non-interactive mode.
### Interactive
@@ -10,22 +19,32 @@ You can create a new project interactively by running:
```bash
npx create-llama@latest
# or
npm create llama
npm create llama@latest
# or
yarn create llama
# or
pnpm create llama
pnpm create llama@latest
```
You will be asked for the name of your project, and then which framework you want to use
create a TypeScript project:
You will be asked for the name of your project, along with other configuration options.
Here is an example:
```bash
>> npm create llama
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 choose between NextJS and Express.
### Non-interactive
You can also pass command line arguments to set up a new project
@@ -36,7 +55,6 @@ create-llama <project-directory> [options]
Options:
-V, --version output the version number
--use-npm
@@ -52,3 +70,9 @@ Options:
```
## LlamaIndex Documentation
- [TS/JS docs](https://ts.llamaindex.ai/)
- [Python docs](https://docs.llamaindex.ai/en/stable/)
Inspired by and adapted from [create-next-app](https://github.com/vercel/next.js/tree/canary/packages/create-next-app)
+1 -1
View File
@@ -43,7 +43,7 @@ export function tryGitInit(root: string): boolean {
}
execSync("git add -A", { stdio: "ignore" });
execSync('git commit -m "Initial commit from Create Next App"', {
execSync('git commit -m "Initial commit from Create Llama"', {
stdio: "ignore",
});
return true;
+7 -4
View File
@@ -288,8 +288,11 @@ async function run(): Promise<void> {
name: "engine",
message: "Which chat engine would you like to use?",
choices: [
{ title: "SimpleChatEngine", value: "simple" },
{ title: "ContextChatEngine", value: "context" },
{
title: "SimpleChatEngine",
value: "simple (no data, just chat)",
},
],
initial: 0,
},
@@ -359,10 +362,10 @@ async function notifyUpdate(): Promise<void> {
if (res?.latest) {
const updateMessage =
packageManager === "yarn"
? "yarn global add create-llama"
? "yarn global add create-llama@latest"
: packageManager === "pnpm"
? "pnpm add -g create-llama"
: "npm i -g create-llama";
? "pnpm add -g create-llama@latest"
: "npm i -g create-llama@latest";
console.log(
yellow(bold("A new version of `create-llama` is available!")) +
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "create-llama",
"version": "0.0.1",
"version": "0.0.4",
"keywords": [
"rag",
"llamaindex",
+17 -6
View File
@@ -5,7 +5,7 @@ import fs from "fs/promises";
import os from "os";
import path from "path";
import { bold, cyan } from "picocolors";
import { version } from "../package.json";
import { version } from "../../core/package.json";
import { PackageManager } from "../helpers/get-pkg-manager";
import {
@@ -33,6 +33,7 @@ const createEnvLocalFile = async (
`OPENAI_API_KEY=${openAIKey}\n`,
);
console.log(`Created '${envFileName}' file containing OPENAI_API_KEY`);
process.env["OPENAI_API_KEY"] = openAIKey;
}
};
@@ -53,11 +54,21 @@ const copyTestData = async (
}
if (packageManager && engine === "context") {
console.log(
`\nRunning ${cyan("npm run generate")} to generate the context data.\n`,
);
await callPackageManager(packageManager, true, ["run", "generate"]);
console.log();
if (process.env["OPENAI_API_KEY"]) {
console.log(
`\nRunning ${cyan(
`${packageManager} run generate`,
)} to generate the context data.\n`,
);
await callPackageManager(packageManager, true, ["run", "generate"]);
console.log();
} else {
console.log(
`\nAfter setting your OpenAI key, run ${cyan(
`${packageManager} run generate`,
)} to generate the context data.\n`,
);
}
}
};