Skip to content

Commit

Permalink
updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
yisding committed Jul 21, 2023
1 parent 3cab956 commit 5a765aa
Show file tree
Hide file tree
Showing 78 changed files with 483 additions and 465 deletions.
5 changes: 5 additions & 0 deletions .changeset/olive-ladybugs-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"llamaindex": patch
---

Updated README
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ In a new folder:

```bash
export OPEN_AI_KEY="sk-......" # Replace with your key from https://platform.openai.com/account/api-keys
npx tsc –-init # if needed
pnpm init
pnpm install typescript
pnpm exec tsc –-init # if needed
pnpm install llamaindex
pnpm install @types/node
```

Create the file example.ts
Expand All @@ -40,19 +43,21 @@ async function main() {

// Query the index
const queryEngine = index.asQueryEngine();
const response = await queryEngine.aquery(
const response = await queryEngine.query(
"What did the author do in college?"
);

// Output response
console.log(response.toString());
}

main();
```

Then you can run it using

```bash
npx ts-node example.ts
pnpm dlx ts-node example.ts
```

## Core concepts for getting started:
Expand Down
6 changes: 3 additions & 3 deletions apps/docs/docs/api/classes/BaseEmbedding.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ custom_edit_url: null

#### Defined in

[Embedding.ts:206](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/Embedding.ts#L206)
[Embedding.ts:206](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/Embedding.ts#L206)

___

Expand All @@ -56,7 +56,7 @@ ___

#### Defined in

[Embedding.ts:205](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/Embedding.ts#L205)
[Embedding.ts:205](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/Embedding.ts#L205)

___

Expand All @@ -78,4 +78,4 @@ ___

#### Defined in

[Embedding.ts:197](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/Embedding.ts#L197)
[Embedding.ts:197](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/Embedding.ts#L197)
18 changes: 9 additions & 9 deletions apps/docs/docs/api/classes/BaseIndex.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ they can be retrieved for our queries.

#### Defined in

[indices/BaseIndex.ts:78](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/indices/BaseIndex.ts#L78)
[indices/BaseIndex.ts:78](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/indices/BaseIndex.ts#L78)

## Properties

Expand All @@ -53,7 +53,7 @@ they can be retrieved for our queries.

#### Defined in

[indices/BaseIndex.ts:73](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/indices/BaseIndex.ts#L73)
[indices/BaseIndex.ts:73](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/indices/BaseIndex.ts#L73)

___

Expand All @@ -63,7 +63,7 @@ ___

#### Defined in

[indices/BaseIndex.ts:75](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/indices/BaseIndex.ts#L75)
[indices/BaseIndex.ts:75](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/indices/BaseIndex.ts#L75)

___

Expand All @@ -73,7 +73,7 @@ ___

#### Defined in

[indices/BaseIndex.ts:76](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/indices/BaseIndex.ts#L76)
[indices/BaseIndex.ts:76](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/indices/BaseIndex.ts#L76)

___

Expand All @@ -83,7 +83,7 @@ ___

#### Defined in

[indices/BaseIndex.ts:71](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/indices/BaseIndex.ts#L71)
[indices/BaseIndex.ts:71](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/indices/BaseIndex.ts#L71)

___

Expand All @@ -93,7 +93,7 @@ ___

#### Defined in

[indices/BaseIndex.ts:72](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/indices/BaseIndex.ts#L72)
[indices/BaseIndex.ts:72](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/indices/BaseIndex.ts#L72)

___

Expand All @@ -103,7 +103,7 @@ ___

#### Defined in

[indices/BaseIndex.ts:74](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/indices/BaseIndex.ts#L74)
[indices/BaseIndex.ts:74](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/indices/BaseIndex.ts#L74)

## Methods

Expand All @@ -128,7 +128,7 @@ and response synthezier if they are not provided.

#### Defined in

[indices/BaseIndex.ts:98](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/indices/BaseIndex.ts#L98)
[indices/BaseIndex.ts:98](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/indices/BaseIndex.ts#L98)

___

Expand All @@ -150,4 +150,4 @@ Create a new retriever from the index.

#### Defined in

[indices/BaseIndex.ts:91](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/indices/BaseIndex.ts#L91)
[indices/BaseIndex.ts:91](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/indices/BaseIndex.ts#L91)
40 changes: 20 additions & 20 deletions apps/docs/docs/api/classes/BaseNode.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Generic abstract class for retrievable nodes

#### Defined in

[Node.ts:48](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/Node.ts#L48)
[Node.ts:48](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/Node.ts#L48)

## Properties

Expand All @@ -38,7 +38,7 @@ Generic abstract class for retrievable nodes

#### Defined in

[Node.ts:39](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/Node.ts#L39)
[Node.ts:39](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/Node.ts#L39)

___

Expand All @@ -48,7 +48,7 @@ ___

#### Defined in

[Node.ts:43](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/Node.ts#L43)
[Node.ts:43](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/Node.ts#L43)

___

Expand All @@ -58,7 +58,7 @@ ___

#### Defined in

[Node.ts:44](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/Node.ts#L44)
[Node.ts:44](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/Node.ts#L44)

___

Expand All @@ -68,7 +68,7 @@ ___

#### Defined in

[Node.ts:46](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/Node.ts#L46)
[Node.ts:46](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/Node.ts#L46)

___

Expand All @@ -78,7 +78,7 @@ ___

#### Defined in

[Node.ts:38](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/Node.ts#L38)
[Node.ts:38](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/Node.ts#L38)

___

Expand All @@ -88,7 +88,7 @@ ___

#### Defined in

[Node.ts:42](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/Node.ts#L42)
[Node.ts:42](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/Node.ts#L42)

___

Expand All @@ -98,7 +98,7 @@ ___

#### Defined in

[Node.ts:45](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/Node.ts#L45)
[Node.ts:45](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/Node.ts#L45)

## Accessors

Expand All @@ -112,7 +112,7 @@ ___

#### Defined in

[Node.ts:104](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/Node.ts#L104)
[Node.ts:104](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/Node.ts#L104)

___

Expand All @@ -126,7 +126,7 @@ ___

#### Defined in

[Node.ts:84](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/Node.ts#L84)
[Node.ts:84](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/Node.ts#L84)

___

Expand All @@ -140,7 +140,7 @@ ___

#### Defined in

[Node.ts:58](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/Node.ts#L58)
[Node.ts:58](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/Node.ts#L58)

___

Expand All @@ -154,7 +154,7 @@ ___

#### Defined in

[Node.ts:94](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/Node.ts#L94)
[Node.ts:94](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/Node.ts#L94)

___

Expand All @@ -168,7 +168,7 @@ ___

#### Defined in

[Node.ts:72](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/Node.ts#L72)
[Node.ts:72](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/Node.ts#L72)

___

Expand All @@ -182,7 +182,7 @@ ___

#### Defined in

[Node.ts:62](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/Node.ts#L62)
[Node.ts:62](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/Node.ts#L62)

## Methods

Expand All @@ -196,7 +196,7 @@ ___

#### Defined in

[Node.ts:124](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/Node.ts#L124)
[Node.ts:124](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/Node.ts#L124)

___

Expand All @@ -216,7 +216,7 @@ ___

#### Defined in

[Node.ts:54](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/Node.ts#L54)
[Node.ts:54](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/Node.ts#L54)

___

Expand All @@ -230,7 +230,7 @@ ___

#### Defined in

[Node.ts:116](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/Node.ts#L116)
[Node.ts:116](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/Node.ts#L116)

___

Expand All @@ -250,7 +250,7 @@ ___

#### Defined in

[Node.ts:55](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/Node.ts#L55)
[Node.ts:55](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/Node.ts#L55)

___

Expand All @@ -264,7 +264,7 @@ ___

#### Defined in

[Node.ts:52](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/Node.ts#L52)
[Node.ts:52](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/Node.ts#L52)

___

Expand All @@ -284,4 +284,4 @@ ___

#### Defined in

[Node.ts:56](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/Node.ts#L56)
[Node.ts:56](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/Node.ts#L56)
6 changes: 3 additions & 3 deletions apps/docs/docs/api/classes/CallbackManager.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ custom_edit_url: null

#### Defined in

[callbacks/CallbackManager.ts:68](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/callbacks/CallbackManager.ts#L68)
[callbacks/CallbackManager.ts:68](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/callbacks/CallbackManager.ts#L68)

## Properties

Expand Down Expand Up @@ -52,7 +52,7 @@ CallbackManagerMethods.onLLMStream

#### Defined in

[callbacks/CallbackManager.ts:65](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/callbacks/CallbackManager.ts#L65)
[callbacks/CallbackManager.ts:65](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/callbacks/CallbackManager.ts#L65)

___

Expand Down Expand Up @@ -80,4 +80,4 @@ CallbackManagerMethods.onRetrieve

#### Defined in

[callbacks/CallbackManager.ts:66](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/callbacks/CallbackManager.ts#L66)
[callbacks/CallbackManager.ts:66](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/callbacks/CallbackManager.ts#L66)
10 changes: 5 additions & 5 deletions apps/docs/docs/api/classes/CompactAndRefine.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ CompactAndRefine is a slight variation of Refine that first compacts the text ch

#### Defined in

[ResponseSynthesizer.ts:78](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/ResponseSynthesizer.ts#L78)
[ResponseSynthesizer.ts:78](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/ResponseSynthesizer.ts#L78)

## Properties

Expand All @@ -48,7 +48,7 @@ CompactAndRefine is a slight variation of Refine that first compacts the text ch

#### Defined in

[ResponseSynthesizer.ts:76](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/ResponseSynthesizer.ts#L76)
[ResponseSynthesizer.ts:76](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/ResponseSynthesizer.ts#L76)

___

Expand All @@ -62,7 +62,7 @@ ___

#### Defined in

[ResponseSynthesizer.ts:74](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/ResponseSynthesizer.ts#L74)
[ResponseSynthesizer.ts:74](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/ResponseSynthesizer.ts#L74)

___

Expand All @@ -76,7 +76,7 @@ ___

#### Defined in

[ResponseSynthesizer.ts:75](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/ResponseSynthesizer.ts#L75)
[ResponseSynthesizer.ts:75](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/ResponseSynthesizer.ts#L75)

## Methods

Expand All @@ -103,4 +103,4 @@ ___

#### Defined in

[ResponseSynthesizer.ts:181](https://github.com/run-llama/LlamaIndexTS/blob/c65d671/packages/core/src/ResponseSynthesizer.ts#L181)
[ResponseSynthesizer.ts:181](https://github.com/run-llama/LlamaIndexTS/blob/3cab956/packages/core/src/ResponseSynthesizer.ts#L181)
Loading

0 comments on commit 5a765aa

Please sign in to comment.