Compare commits

..

81 Commits

Author SHA1 Message Date
sweep-ai[bot] e9e01c3aaa Added sourceNode property to TextNode class 2023-08-15 14:33:13 +00:00
Yi Ding 18b8915f22 changeset 2023-08-09 15:20:09 -07:00
Yi Ding 9bbfc2414e example npm update 2023-08-09 14:50:38 -07:00
yisding 9487aa1ed5 Merge pull request #65 from TomPenguin/export-store
Export storage
2023-08-09 06:30:27 -07:00
TomPenguin fd74c52fe8 export storage 2023-08-09 18:13:27 +09:00
Yi Ding 0d2bf51a2e 0.0.17 2023-08-08 18:13:08 -07:00
yisding 551c0edadf Merge pull request #64 from run-llama/llama2-fixes
Llama2 4bit support
2023-08-08 18:10:26 -07:00
Yi Ding f80b06293b changed default temp to 0.1 2023-08-08 17:28:56 -07:00
Yi Ding b3fec86413 Llama2 fixes with 4 bit model support 2023-08-08 17:22:42 -07:00
Yi Ding ab886a34d7 add other @tyre PR to the CHANGELOG 2023-08-07 06:46:11 -07:00
Yi Ding 1ec9da120e 0.0.16 2023-08-07 06:30:23 -07:00
yisding 817178272d Merge pull request #59 from run-llama/azure
add azure OpenAI
2023-08-07 06:28:40 -07:00
Yi Ding 3316c6b41c add azure OpenAI
Update OpenAI v4 to latest beta and fixed a few bugs
2023-08-07 06:23:47 -07:00
Yi Ding 9214b0669d fix persistence bug 2023-08-04 23:33:16 -07:00
yisding b3d659b9af Merge pull request #58 from tyre/index-constructor
add constructor to index node so it keeps passed-in indexId
2023-08-02 14:37:25 -07:00
Chris Maddox 05b0fca610 add constructor to index node so it keeps passed-in indexId 2023-08-02 22:33:20 +02:00
yisding 64b909f436 Merge pull request #57 from tyre/typed-filters
add a filter type to exact match filters
2023-08-01 16:09:11 -07:00
Chris Maddox a2e6299aaa add a filter type to exact match filters 2023-08-02 01:04:28 +02:00
yisding 1fbfcab55e Merge pull request #55 from run-llama/repo-maintenance
Repo maintenance
2023-08-01 08:15:39 -07:00
Yi Ding 7db567ea74 remove unnecessary package-lock.json from docs
Also ran some upgrades on npm/pnpm
pnpm install should install the right packages without the
package-lock.json in the docs folder
2023-08-01 08:11:12 -07:00
Yi Ding 6354c16776 add the docs/api folder back in 2023-08-01 08:01:59 -07:00
Yi Ding eb4c3dd3c7 Revert "try replacing CONTRIBUTING and README with symlinks"
This reverts commit 8a4330132c.

Symlinks didn't quite work
2023-07-31 22:54:31 -07:00
Yi Ding 8a4330132c try replacing CONTRIBUTING and README with symlinks
Avoid duplication
2023-07-31 22:49:48 -07:00
Yi Ding f2d4f828d4 repo maintenance
upgrade packages
update docs
update README and CONTRIBUTING
2023-07-31 22:47:13 -07:00
Yi Ding fe8030a9ad updated docs and removed trim vuln
dependabot was complaining about the trim version in the docusaurus so
pinned it to a non-vuln version
2023-07-31 10:50:43 -07:00
Yi Ding ec12633ae0 changeset for #54 2023-07-31 10:30:16 -07:00
yisding 5e24733e41 Merge pull request #54 from tyre/async-vector-stores
make VectorStore function signatures unique, export VectorStore types
2023-07-31 10:23:12 -07:00
Chris Maddox a13911435f make VectorStore function signatures unique, export VectorStore types to allow for extensions 2023-07-31 19:15:50 +02:00
Yi Ding 857bb4596a 0.0.15 2023-07-31 00:29:57 -07:00
yisding 1359de75b5 Merge pull request #52 from run-llama/anthropic
Anthropic support
2023-07-31 00:28:51 -07:00
Yi Ding f9d1a6e013 add top P 2023-07-31 00:27:09 -07:00
Yi Ding b18e1228a8 have examples use snapshot build 2023-07-29 19:37:59 -07:00
Yi Ding b501eb5a19 anthropic support 2023-07-29 19:35:14 -07:00
Yi Ding bfab1d407b 0.0.14 2023-07-27 21:02:20 -07:00
Yi Ding 4ef334a70f changesets 2023-07-27 21:01:13 -07:00
yisding af60503115 Merge pull request #45 from run-llama/sweep/add-docstrings
Add missing docstrings to NodeParser.ts and handleOpenAIStream.ts
2023-07-27 20:59:07 -07:00
Yi Ding b3a7a9df2c slight update 2023-07-27 20:57:52 -07:00
Yi Ding 6b90e4c1b3 updated docs 2023-07-27 20:56:59 -07:00
sweep-ai[bot] 108634b94f Merge main into sweep/add-docstrings 2023-07-28 03:53:24 +00:00
yisding 4bb92be1e4 Merge pull request #47 from run-llama/better-deuce
add meta delimitation strategy for llama2
2023-07-27 20:53:21 -07:00
sweep-ai[bot] 7678d319f2 Merge main into sweep/add-docstrings 2023-07-28 03:45:48 +00:00
yisding aaff02bc4b Merge pull request #48 from ysak-y/modify_bug_of_vector_store_index
[BUG FIX] Use retriever from argument if exist in asQueryEngine of VectorStoreIndex
2023-07-27 20:45:45 -07:00
yoshiaki-yamada 34f5398f41 refactor: Integrate some module imports from BaseIndex 2023-07-28 11:43:17 +09:00
yoshiaki-yamada c06d1e5b09 fix: Use retriever from argument if exist in asQueryEngine 2023-07-28 11:42:01 +09:00
Yi Ding 0af7773c40 add meta delimitation strategy for llama2 2023-07-27 18:00:09 -07:00
sweep-ai[bot] a44ee19114 Merge main into sweep/add-docstrings 2023-07-27 23:46:24 +00:00
Yi Ding 2726e375ea remove storage from gitignore 2023-07-27 16:46:07 -07:00
sweep-ai[bot] b599813600 Merge main into sweep/add-docstrings 2023-07-27 15:25:52 +00:00
Yi Ding bea4af984f fix sentence splitter overlap logic 2023-07-27 08:24:38 -07:00
sweep-ai[bot] 5dbbb7d4c1 Update packages/core/src/NodeParser.ts 2023-07-27 08:23:43 +00:00
sweep-ai[bot] c8ea424c7a Update packages/core/src/callbacks/utility/handleOpenAIStream.ts 2023-07-27 07:52:49 +00:00
sweep-ai[bot] 8de110e577 Update packages/core/src/NodeParser.ts 2023-07-27 07:52:11 +00:00
yisding 7e82b89f36 Merge pull request #42 from run-llama/sweep/add-gha-workflow_1
[DRAFT] Add GitHub Actions workflow to run tests
2023-07-27 00:50:13 -07:00
sweep-ai[bot] 669483699f Merge main into sweep/add-gha-workflow_1 2023-07-27 07:42:26 +00:00
yisding 672dde6e58 Merge pull request #34 from run-llama/stop-thrashing-docs
set typedoc revision to main
2023-07-27 00:42:21 -07:00
sweep-ai[bot] 31a1a4b4d0 Merge main into sweep/add-gha-workflow_1 2023-07-27 07:39:27 +00:00
yisding f12a8d8006 Merge pull request #36 from run-llama/sweep/add-sweep-config
Configure Sweep
2023-07-27 00:39:23 -07:00
sweep-ai[bot] 03ea3af58c Merge main into sweep/add-gha-workflow_1 2023-07-27 07:38:44 +00:00
sweep-ai[bot] cc2585360b Merge main into sweep/add-sweep-config 2023-07-27 07:38:44 +00:00
yisding ff59660585 Merge pull request #40 from run-llama/sweep/add-gha-workflow
Add GitHub Actions workflow for linting on push/pull
2023-07-27 00:38:39 -07:00
sweep-ai[bot] 6063ce22fd sweep: Create .github/workflows/test.yml 2023-07-27 00:36:26 +00:00
sweep-ai[bot] bc7cf343cc Update .github/workflows/lint_on_push_or_pull.yml 2023-07-27 00:32:16 +00:00
sweep-ai[bot] 938eaf5d2d sweep: Create .github/workflows/lint_on_push_or_pull.yml 2023-07-27 00:30:59 +00:00
sweep-ai[bot] a0bf44addb Create refactor template 2023-07-26 23:25:54 +00:00
sweep-ai[bot] 8d7e1624c7 Create feature template 2023-07-26 23:25:54 +00:00
sweep-ai[bot] d1c9f30dfc Create bugfix template 2023-07-26 23:25:53 +00:00
sweep-ai[bot] e57eb0caa3 Create sweep.yaml config file 2023-07-26 23:25:53 +00:00
Yi Ding 7699f5432d set typedoc revision to main
In theory this will stop the API docs thrashing on every build.

Of course, there is a drawback in that if main changes but we haven't
released a new version of the docs yet the links will go out of date.

So longer term we might want to investigate some kind of variable where
we can continue to have up to date revs but keep the rev in a single
variable somewhere:

https://github.com/facebook/docusaurus/issues/395

In the meantime much smaller commits will be a relief
2023-07-25 23:06:44 -07:00
Yi Ding fe3b1f4f50 0.0.13 2023-07-25 22:57:08 -07:00
yisding 35f3030db6 Merge pull request #33 from run-llama/openaiv4
openai v4
2023-07-25 22:55:32 -07:00
Yi Ding c0f31bbef2 build docs 2023-07-25 22:53:16 -07:00
Yi Ding 0f654ae04b get response message role from OpenAI 2023-07-25 22:52:10 -07:00
Yi Ding be2dc5df28 upgraded packages in docs
docusaurus is causing a dependabot issue with trim 0.0.1. It's probably
not a real vuln but it's a bit annoying.

Unfortunately this didn't solve it.
2023-07-25 22:35:16 -07:00
Yi Ding d6aeedd0e3 fixed broken link in api docs
Also deleting LLM Predictor
2023-07-25 22:23:12 -07:00
Yi Ding dc91f5fdf7 correctly handle retries and timeout settings 2023-07-25 22:19:00 -07:00
Yi Ding 4f6f245006 changeset, packages, and cleanup 2023-07-25 21:25:41 -07:00
Yi Ding ac69adba7a openai v4 2023-07-25 21:04:54 -07:00
Yi Ding b0bb4108a8 bug fix: merge the indexStructs 2023-07-25 18:00:11 -07:00
yisding 6ff932a055 Merge pull request #29 from run-llama/jerry/add_link_fix
add link to starter guide to installation
2023-07-24 18:56:28 -07:00
Jerry Liu c850e7578b cr 2023-07-24 18:53:13 -07:00
yisding 577534813d Merge pull request #28 from run-llama/small-fixes
Small fixes
2023-07-24 18:18:31 -07:00
153 changed files with 4226 additions and 15129 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"llamaindex": patch
---
Update storage exports (thanks @TomPenguin)
+11
View File
@@ -0,0 +1,11 @@
name: Bugfix
title: 'Sweep: '
description: Write something like "We notice ... behavior when ... happens instead of ...""
labels: sweep
body:
- type: textarea
id: description
attributes:
label: Details
description: More details about the bug
placeholder: The bug might be in ... file
+11
View File
@@ -0,0 +1,11 @@
name: Feature Request
title: 'Sweep: '
description: Write something like "Write an api endpoint that does "..." in the "..." file"
labels: sweep
body:
- type: textarea
id: description
attributes:
label: Details
description: More details for Sweep
placeholder: The new endpoint should use the ... class from ... file because it contains ... logic
+11
View File
@@ -0,0 +1,11 @@
name: Refactor
title: 'Sweep: '
description: Write something like "Modify the ... api endpoint to use ... version and ... framework"
labels: sweep
body:
- type: textarea
id: description
attributes:
label: Details
description: More details for Sweep
placeholder: We are migrating this function to ... version because ...
@@ -0,0 +1,25 @@
name: Lint on push or pull request
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install
- name: Run lint
run: pnpm run lint
+24
View File
@@ -0,0 +1,24 @@
name: Run Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install dependencies
run: |
npm i -g pnpm
pnpm install
- name: Run tests
run: pnpm run test
+1 -3
View File
@@ -35,6 +35,4 @@ yarn-error.log*
# vercel
.vercel
storage/
dist/
dist/
+4 -2
View File
@@ -12,7 +12,7 @@ apps/simple is where the demo code lives
### Turborepo docs
You can checkout how Turborepo works using the built in [README-turborepo.md](README-turborepo.md)
You can checkout how Turborepo works using the default [README-turborepo.md](/README-turborepo.md)
## Getting Started
@@ -41,12 +41,14 @@ To run them, run
pnpm run test
```
To write new test cases write them in packages/core/src/tests
To write new test cases write them in [packages/core/src/tests](/packages/core/src/tests)
We use Jest https://jestjs.io/ to write our test cases. Jest comes with a bunch of built in assertions using the expect function: https://jestjs.io/docs/expect
### Demo applications
There is an existing ["simple"](/apps/simple/README.md) demos folder with mainly NodeJS scripts. Feel free to add additional demos to that folder. If you would like to try out your changes in the core package with a new demo, you need to run the build command in the README.
You can create new demo applications in the apps folder. Just run pnpm init in the folder after you create it to create its own package.json
### Installing packages
+23 -17
View File
@@ -64,29 +64,35 @@ Then you can run it using
pnpm dlx ts-node example.ts
```
## Core concepts for getting started:
- [Document](packages/core/src/Node.ts): A document represents a text file, PDF file or other contiguous piece of data.
- [Node](packages/core/src/Node.ts): The basic data building block. Most commonly, these are parts of the document split into manageable pieces that are small enough to be fed into an embedding model and LLM.
- [Embedding](packages/core/src/Embedding.ts): Embeddings are sets of floating point numbers which represent the data in a Node. By comparing the similarity of embeddings, we can derive an understanding of the similarity of two pieces of data. One use case is to compare the embedding of a question with the embeddings of our Nodes to see which Nodes may contain the data needed to answer that quesiton.
- [Indices](packages/core/src/indices/): Indices store the Nodes and the embeddings of those nodes. QueryEngines retrieve Nodes from these Indices using embedding similarity.
- [QueryEngine](packages/core/src/QueryEngine.ts): Query engines are what generate the query you put in and give you back the result. Query engines generally combine a pre-built prompt with selected Nodes from your Index to give the LLM the context it needs to answer your query.
- [ChatEngine](packages/core/src/ChatEngine.ts): A ChatEngine helps you build a chatbot that will interact with your Indices.
- [SimplePrompt](packages/core/src/Prompt.ts): A simple standardized function call definition that takes in inputs and formats them in a template literal. SimplePrompts can be specialized using currying and combined using other SimplePrompt functions.
## Playground
Check out our NextJS playground at https://llama-playground.vercel.app/. The source is available at https://github.com/run-llama/ts-playground
## Core concepts for getting started:
- [Document](/packages/core/src/Node.ts): A document represents a text file, PDF file or other contiguous piece of data.
- [Node](/packages/core/src/Node.ts): The basic data building block. Most commonly, these are parts of the document split into manageable pieces that are small enough to be fed into an embedding model and LLM.
- [Embedding](/packages/core/src/Embedding.ts): Embeddings are sets of floating point numbers which represent the data in a Node. By comparing the similarity of embeddings, we can derive an understanding of the similarity of two pieces of data. One use case is to compare the embedding of a question with the embeddings of our Nodes to see which Nodes may contain the data needed to answer that quesiton.
- [Indices](/packages/core/src/indices/): Indices store the Nodes and the embeddings of those nodes. QueryEngines retrieve Nodes from these Indices using embedding similarity.
- [QueryEngine](/packages/core/src/QueryEngine.ts): Query engines are what generate the query you put in and give you back the result. Query engines generally combine a pre-built prompt with selected Nodes from your Index to give the LLM the context it needs to answer your query.
- [ChatEngine](/packages/core/src/ChatEngine.ts): A ChatEngine helps you build a chatbot that will interact with your Indices.
- [SimplePrompt](/packages/core/src/Prompt.ts): A simple standardized function call definition that takes in inputs and formats them in a template literal. SimplePrompts can be specialized using currying and combined using other SimplePrompt functions.
## Supported LLMs:
- OpenAI GPT-3.5-turbo and GPT-4
- Anthropic Claude Instant and Claude 2
- Llama2 Chat LLMs (70B, 13B, and 7B parameters)
## Contributing:
We are in the very early days of LlamaIndex.TS. If youre interested in hacking on it with us check out our [contributing guide](CONTRIBUTING.md)
We are in the very early days of LlamaIndex.TS. If youre interested in hacking on it with us check out our [contributing guide](/CONTRIBUTING.md)
## Bugs? Questions?
+193
View File
@@ -0,0 +1,193 @@
---
id: "Anthropic"
title: "Class: Anthropic"
sidebar_label: "Anthropic"
sidebar_position: 0
custom_edit_url: null
---
Anthropic LLM implementation
## Implements
- [`LLM`](../interfaces/LLM.md)
## Constructors
### constructor
**new Anthropic**(`init?`)
#### Parameters
| Name | Type |
| :------ | :------ |
| `init?` | `Partial`<[`Anthropic`](Anthropic.md)\> |
#### Defined in
[llm/LLM.ts:387](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L387)
## Properties
### apiKey
`Optional` **apiKey**: `string` = `undefined`
#### Defined in
[llm/LLM.ts:380](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L380)
___
### callbackManager
`Optional` **callbackManager**: [`CallbackManager`](CallbackManager.md)
#### Defined in
[llm/LLM.ts:385](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L385)
___
### maxRetries
**maxRetries**: `number`
#### Defined in
[llm/LLM.ts:381](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L381)
___
### maxTokens
`Optional` **maxTokens**: `number`
#### Defined in
[llm/LLM.ts:377](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L377)
___
### model
**model**: `string`
#### Defined in
[llm/LLM.ts:374](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L374)
___
### session
**session**: `AnthropicSession`
#### Defined in
[llm/LLM.ts:383](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L383)
___
### temperature
**temperature**: `number`
#### Defined in
[llm/LLM.ts:375](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L375)
___
### timeout
`Optional` **timeout**: `number`
#### Defined in
[llm/LLM.ts:382](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L382)
___
### topP
**topP**: `number`
#### Defined in
[llm/LLM.ts:376](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L376)
## Methods
### chat
**chat**(`messages`, `parentEvent?`): `Promise`<[`ChatResponse`](../interfaces/ChatResponse.md)\>
Get a chat response from the LLM
#### Parameters
| Name | Type |
| :------ | :------ |
| `messages` | [`ChatMessage`](../interfaces/ChatMessage.md)[] |
| `parentEvent?` | [`Event`](../interfaces/Event.md) |
#### Returns
`Promise`<[`ChatResponse`](../interfaces/ChatResponse.md)\>
#### Implementation of
[LLM](../interfaces/LLM.md).[chat](../interfaces/LLM.md#chat)
#### Defined in
[llm/LLM.ts:422](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L422)
___
### complete
**complete**(`prompt`, `parentEvent?`): `Promise`<[`ChatResponse`](../interfaces/ChatResponse.md)\>
Get a prompt completion from the LLM
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `prompt` | `string` | the prompt to complete |
| `parentEvent?` | [`Event`](../interfaces/Event.md) | - |
#### Returns
`Promise`<[`ChatResponse`](../interfaces/ChatResponse.md)\>
#### Implementation of
[LLM](../interfaces/LLM.md).[complete](../interfaces/LLM.md#complete)
#### Defined in
[llm/LLM.ts:440](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L440)
___
### mapMessagesToPrompt
**mapMessagesToPrompt**(`messages`): `string`
#### Parameters
| Name | Type |
| :------ | :------ |
| `messages` | [`ChatMessage`](../interfaces/ChatMessage.md)[] |
#### Returns
`string`
#### Defined in
[llm/LLM.ts:407](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L407)
+3 -3
View File
@@ -36,7 +36,7 @@ custom_edit_url: null
#### Defined in
[Embedding.ts:206](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Embedding.ts#L206)
[Embedding.ts:213](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L213)
___
@@ -56,7 +56,7 @@ ___
#### Defined in
[Embedding.ts:205](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Embedding.ts#L205)
[Embedding.ts:212](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L212)
___
@@ -78,4 +78,4 @@ ___
#### Defined in
[Embedding.ts:197](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Embedding.ts#L197)
[Embedding.ts:204](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L204)
+10 -10
View File
@@ -43,7 +43,7 @@ they can be retrieved for our queries.
#### Defined in
[indices/BaseIndex.ts:104](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L104)
[indices/BaseIndex.ts:127](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L127)
## Properties
@@ -53,7 +53,7 @@ they can be retrieved for our queries.
#### Defined in
[indices/BaseIndex.ts:99](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L99)
[indices/BaseIndex.ts:122](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L122)
___
@@ -63,7 +63,7 @@ ___
#### Defined in
[indices/BaseIndex.ts:101](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L101)
[indices/BaseIndex.ts:124](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L124)
___
@@ -73,7 +73,7 @@ ___
#### Defined in
[indices/BaseIndex.ts:102](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L102)
[indices/BaseIndex.ts:125](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L125)
___
@@ -83,7 +83,7 @@ ___
#### Defined in
[indices/BaseIndex.ts:97](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L97)
[indices/BaseIndex.ts:120](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L120)
___
@@ -93,17 +93,17 @@ ___
#### Defined in
[indices/BaseIndex.ts:98](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L98)
[indices/BaseIndex.ts:121](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L121)
___
### vectorStore
`Optional` **vectorStore**: `VectorStore`
`Optional` **vectorStore**: [`VectorStore`](../interfaces/VectorStore.md)
#### Defined in
[indices/BaseIndex.ts:100](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L100)
[indices/BaseIndex.ts:123](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L123)
## Methods
@@ -128,7 +128,7 @@ and response synthezier if they are not provided.
#### Defined in
[indices/BaseIndex.ts:124](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L124)
[indices/BaseIndex.ts:147](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L147)
___
@@ -150,4 +150,4 @@ Create a new retriever from the index.
#### Defined in
[indices/BaseIndex.ts:117](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L117)
[indices/BaseIndex.ts:140](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L140)
+36 -20
View File
@@ -28,7 +28,7 @@ Generic abstract class for retrievable nodes
#### Defined in
[Node.ts:48](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L48)
[Node.ts:48](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L48)
## Properties
@@ -38,7 +38,7 @@ Generic abstract class for retrievable nodes
#### Defined in
[Node.ts:39](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L39)
[Node.ts:39](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L39)
___
@@ -48,7 +48,7 @@ ___
#### Defined in
[Node.ts:43](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L43)
[Node.ts:43](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L43)
___
@@ -58,7 +58,7 @@ ___
#### Defined in
[Node.ts:44](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L44)
[Node.ts:44](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L44)
___
@@ -68,7 +68,7 @@ ___
#### Defined in
[Node.ts:46](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L46)
[Node.ts:46](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L46)
___
@@ -78,7 +78,7 @@ ___
#### Defined in
[Node.ts:38](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L38)
[Node.ts:38](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L38)
___
@@ -88,7 +88,7 @@ ___
#### Defined in
[Node.ts:42](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L42)
[Node.ts:42](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L42)
___
@@ -98,7 +98,7 @@ ___
#### Defined in
[Node.ts:45](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L45)
[Node.ts:45](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L45)
## Accessors
@@ -112,7 +112,7 @@ ___
#### Defined in
[Node.ts:104](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L104)
[Node.ts:104](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L104)
___
@@ -126,7 +126,7 @@ ___
#### Defined in
[Node.ts:84](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L84)
[Node.ts:84](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L84)
___
@@ -140,7 +140,7 @@ ___
#### Defined in
[Node.ts:58](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L58)
[Node.ts:58](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L58)
___
@@ -154,7 +154,7 @@ ___
#### Defined in
[Node.ts:94](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L94)
[Node.ts:94](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L94)
___
@@ -168,7 +168,7 @@ ___
#### Defined in
[Node.ts:72](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L72)
[Node.ts:72](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L72)
___
@@ -182,7 +182,7 @@ ___
#### Defined in
[Node.ts:62](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L62)
[Node.ts:62](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L62)
## Methods
@@ -196,7 +196,7 @@ ___
#### Defined in
[Node.ts:124](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L124)
[Node.ts:124](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L124)
___
@@ -216,7 +216,7 @@ ___
#### Defined in
[Node.ts:54](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L54)
[Node.ts:54](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L54)
___
@@ -230,7 +230,7 @@ ___
#### Defined in
[Node.ts:116](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L116)
[Node.ts:116](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L116)
___
@@ -250,7 +250,7 @@ ___
#### Defined in
[Node.ts:55](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L55)
[Node.ts:55](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L55)
___
@@ -264,7 +264,7 @@ ___
#### Defined in
[Node.ts:52](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L52)
[Node.ts:52](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L52)
___
@@ -284,4 +284,20 @@ ___
#### Defined in
[Node.ts:56](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L56)
[Node.ts:56](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L56)
___
### toJSON
**toJSON**(): `Record`<`string`, `any`\>
Used with built in JSON.stringify
#### Returns
`Record`<`string`, `any`\>
#### Defined in
[Node.ts:136](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L136)
@@ -24,7 +24,7 @@ custom_edit_url: null
#### Defined in
[callbacks/CallbackManager.ts:68](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/callbacks/CallbackManager.ts#L68)
[callbacks/CallbackManager.ts:67](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/callbacks/CallbackManager.ts#L67)
## Properties
@@ -52,7 +52,7 @@ CallbackManagerMethods.onLLMStream
#### Defined in
[callbacks/CallbackManager.ts:65](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/callbacks/CallbackManager.ts#L65)
[callbacks/CallbackManager.ts:64](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/callbacks/CallbackManager.ts#L64)
___
@@ -80,4 +80,4 @@ CallbackManagerMethods.onRetrieve
#### Defined in
[callbacks/CallbackManager.ts:66](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/callbacks/CallbackManager.ts#L66)
[callbacks/CallbackManager.ts:65](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/callbacks/CallbackManager.ts#L65)
@@ -1,114 +0,0 @@
---
id: "ChatGPTLLMPredictor"
title: "Class: ChatGPTLLMPredictor"
sidebar_label: "ChatGPTLLMPredictor"
sidebar_position: 0
custom_edit_url: null
---
ChatGPTLLMPredictor is a predictor that uses GPT.
## Implements
- [`BaseLLMPredictor`](../interfaces/BaseLLMPredictor.md)
## Constructors
### constructor
**new ChatGPTLLMPredictor**(`props?`)
#### Parameters
| Name | Type |
| :------ | :------ |
| `props?` | `Partial`<[`ChatGPTLLMPredictor`](ChatGPTLLMPredictor.md)\> |
#### Defined in
[LLMPredictor.ts:26](https://github.com/run-llama/LlamaIndexTS/blob/9d0cadf/packages/core/src/LLMPredictor.ts#L26)
## Properties
### callbackManager
`Optional` **callbackManager**: [`CallbackManager`](CallbackManager.md)
#### Defined in
[LLMPredictor.ts:24](https://github.com/run-llama/LlamaIndexTS/blob/9d0cadf/packages/core/src/LLMPredictor.ts#L24)
___
### languageModel
**languageModel**: [`OpenAI`](OpenAI.md)
#### Defined in
[LLMPredictor.ts:23](https://github.com/run-llama/LlamaIndexTS/blob/9d0cadf/packages/core/src/LLMPredictor.ts#L23)
___
### model
**model**: ``"gpt-3.5-turbo"`` \| ``"gpt-3.5-turbo-16k"`` \| ``"gpt-4"`` \| ``"gpt-4-32k"``
#### Defined in
[LLMPredictor.ts:21](https://github.com/run-llama/LlamaIndexTS/blob/9d0cadf/packages/core/src/LLMPredictor.ts#L21)
___
### retryOnThrottling
• **retryOnThrottling**: `boolean`
#### Defined in
[LLMPredictor.ts:22](https://github.com/run-llama/LlamaIndexTS/blob/9d0cadf/packages/core/src/LLMPredictor.ts#L22)
## Methods
### getLlmMetadata
▸ **getLlmMetadata**(): `Promise`<`void`\>
#### Returns
`Promise`<`void`\>
#### Implementation of
[BaseLLMPredictor](../interfaces/BaseLLMPredictor.md).[getLlmMetadata](../interfaces/BaseLLMPredictor.md#getllmmetadata)
#### Defined in
[LLMPredictor.ts:45](https://github.com/run-llama/LlamaIndexTS/blob/9d0cadf/packages/core/src/LLMPredictor.ts#L45)
___
### predict
▸ **predict**(`prompt`, `input?`, `parentEvent?`, `logProgress?`): `Promise`<`string`\>
#### Parameters
| Name | Type | Default value |
| :------ | :------ | :------ |
| `prompt` | `string` \| [`SimplePrompt`](../modules.md#simpleprompt) | `undefined` |
| `input?` | `Record`<`string`, `string`\> | `undefined` |
| `parentEvent?` | [`Event`](../interfaces/Event.md) | `undefined` |
| `logProgress` | `boolean` | `false` |
#### Returns
`Promise`<`string`\>
#### Implementation of
[BaseLLMPredictor](../interfaces/BaseLLMPredictor.md).[predict](../interfaces/BaseLLMPredictor.md#predict)
#### Defined in
[LLMPredictor.ts:49](https://github.com/run-llama/LlamaIndexTS/blob/9d0cadf/packages/core/src/LLMPredictor.ts#L49)
@@ -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/68bdaaa/packages/core/src/ResponseSynthesizer.ts#L78)
[ResponseSynthesizer.ts:78](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L78)
## Properties
@@ -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/68bdaaa/packages/core/src/ResponseSynthesizer.ts#L76)
[ResponseSynthesizer.ts:76](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L76)
___
@@ -62,7 +62,7 @@ ___
#### Defined in
[ResponseSynthesizer.ts:74](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ResponseSynthesizer.ts#L74)
[ResponseSynthesizer.ts:74](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L74)
___
@@ -76,7 +76,7 @@ ___
#### Defined in
[ResponseSynthesizer.ts:75](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ResponseSynthesizer.ts#L75)
[ResponseSynthesizer.ts:75](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L75)
## Methods
@@ -103,4 +103,4 @@ ___
#### Defined in
[ResponseSynthesizer.ts:181](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ResponseSynthesizer.ts#L181)
[ResponseSynthesizer.ts:181](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L181)
@@ -37,7 +37,7 @@ data, or are very referential to previous context.
#### Defined in
[ChatEngine.ts:75](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ChatEngine.ts#L75)
[ChatEngine.ts:75](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L75)
## Properties
@@ -47,7 +47,7 @@ data, or are very referential to previous context.
#### Defined in
[ChatEngine.ts:71](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ChatEngine.ts#L71)
[ChatEngine.ts:71](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L71)
___
@@ -57,7 +57,7 @@ ___
#### Defined in
[ChatEngine.ts:73](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ChatEngine.ts#L73)
[ChatEngine.ts:73](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L73)
___
@@ -67,7 +67,7 @@ ___
#### Defined in
[ChatEngine.ts:70](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ChatEngine.ts#L70)
[ChatEngine.ts:70](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L70)
___
@@ -77,7 +77,7 @@ ___
#### Defined in
[ChatEngine.ts:72](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ChatEngine.ts#L72)
[ChatEngine.ts:72](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L72)
## Methods
@@ -104,7 +104,7 @@ Send message along with the class's current chat history to the LLM.
#### Defined in
[ChatEngine.ts:100](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ChatEngine.ts#L100)
[ChatEngine.ts:100](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L100)
___
@@ -125,7 +125,7 @@ ___
#### Defined in
[ChatEngine.ts:89](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ChatEngine.ts#L89)
[ChatEngine.ts:89](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L89)
___
@@ -145,4 +145,4 @@ Resets the chat history so that it's empty.
#### Defined in
[ChatEngine.ts:118](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ChatEngine.ts#L118)
[ChatEngine.ts:118](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L118)
@@ -31,7 +31,7 @@ ideally allowing the appropriate context to be surfaced for each query.
#### Defined in
[ChatEngine.ts:133](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ChatEngine.ts#L133)
[ChatEngine.ts:133](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L133)
## Properties
@@ -41,7 +41,7 @@ ideally allowing the appropriate context to be surfaced for each query.
#### Defined in
[ChatEngine.ts:131](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ChatEngine.ts#L131)
[ChatEngine.ts:131](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L131)
___
@@ -51,7 +51,7 @@ ___
#### Defined in
[ChatEngine.ts:130](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ChatEngine.ts#L130)
[ChatEngine.ts:130](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L130)
___
@@ -61,7 +61,7 @@ ___
#### Defined in
[ChatEngine.ts:129](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ChatEngine.ts#L129)
[ChatEngine.ts:129](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L129)
## Methods
@@ -88,7 +88,7 @@ Send message along with the class's current chat history to the LLM.
#### Defined in
[ChatEngine.ts:144](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ChatEngine.ts#L144)
[ChatEngine.ts:144](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L144)
___
@@ -108,4 +108,4 @@ Resets the chat history so that it's empty.
#### Defined in
[ChatEngine.ts:182](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ChatEngine.ts#L182)
[ChatEngine.ts:182](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L182)
+48 -28
View File
@@ -32,7 +32,7 @@ A document is just a special text node with a docId.
#### Defined in
[Node.ts:216](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L216)
[Node.ts:229](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L229)
## Properties
@@ -46,7 +46,7 @@ A document is just a special text node with a docId.
#### Defined in
[Node.ts:39](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L39)
[Node.ts:39](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L39)
___
@@ -60,7 +60,7 @@ ___
#### Defined in
[Node.ts:139](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L139)
[Node.ts:147](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L147)
___
@@ -74,7 +74,7 @@ ___
#### Defined in
[Node.ts:43](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L43)
[Node.ts:43](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L43)
___
@@ -88,7 +88,7 @@ ___
#### Defined in
[Node.ts:44](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L44)
[Node.ts:44](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L44)
___
@@ -102,7 +102,7 @@ ___
#### Defined in
[Node.ts:46](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L46)
[Node.ts:46](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L46)
___
@@ -116,7 +116,7 @@ ___
#### Defined in
[Node.ts:38](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L38)
[Node.ts:38](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L38)
___
@@ -130,7 +130,7 @@ ___
#### Defined in
[Node.ts:42](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L42)
[Node.ts:42](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L42)
___
@@ -144,7 +144,7 @@ ___
#### Defined in
[Node.ts:142](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L142)
[Node.ts:150](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L150)
___
@@ -158,7 +158,7 @@ ___
#### Defined in
[Node.ts:45](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L45)
[Node.ts:45](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L45)
___
@@ -172,7 +172,7 @@ ___
#### Defined in
[Node.ts:138](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L138)
[Node.ts:146](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L146)
___
@@ -186,7 +186,7 @@ ___
#### Defined in
[Node.ts:137](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L137)
[Node.ts:145](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L145)
## Accessors
@@ -204,7 +204,7 @@ TextNode.childNodes
#### Defined in
[Node.ts:104](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L104)
[Node.ts:104](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L104)
___
@@ -218,7 +218,7 @@ ___
#### Defined in
[Node.ts:225](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L225)
[Node.ts:238](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L238)
___
@@ -236,7 +236,7 @@ TextNode.nextNode
#### Defined in
[Node.ts:84](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L84)
[Node.ts:84](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L84)
___
@@ -254,7 +254,7 @@ TextNode.nodeId
#### Defined in
[Node.ts:58](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L58)
[Node.ts:58](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L58)
___
@@ -272,7 +272,7 @@ TextNode.parentNode
#### Defined in
[Node.ts:94](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L94)
[Node.ts:94](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L94)
___
@@ -290,7 +290,7 @@ TextNode.prevNode
#### Defined in
[Node.ts:72](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L72)
[Node.ts:72](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L72)
___
@@ -308,7 +308,7 @@ TextNode.sourceNode
#### Defined in
[Node.ts:62](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L62)
[Node.ts:62](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L62)
## Methods
@@ -326,7 +326,7 @@ TextNode.sourceNode
#### Defined in
[Node.ts:124](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L124)
[Node.ts:124](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L124)
___
@@ -344,7 +344,7 @@ ___
#### Defined in
[Node.ts:149](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L149)
[Node.ts:157](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L157)
___
@@ -368,7 +368,7 @@ ___
#### Defined in
[Node.ts:157](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L157)
[Node.ts:165](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L165)
___
@@ -386,7 +386,7 @@ ___
#### Defined in
[Node.ts:116](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L116)
[Node.ts:116](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L116)
___
@@ -410,7 +410,7 @@ ___
#### Defined in
[Node.ts:162](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L162)
[Node.ts:170](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L170)
___
@@ -433,7 +433,7 @@ ___
#### Defined in
[Node.ts:187](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L187)
[Node.ts:195](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L195)
___
@@ -451,7 +451,7 @@ ___
#### Defined in
[Node.ts:191](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L191)
[Node.ts:199](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L199)
___
@@ -469,7 +469,7 @@ ___
#### Defined in
[Node.ts:221](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L221)
[Node.ts:234](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L234)
___
@@ -493,4 +493,24 @@ ___
#### Defined in
[Node.ts:183](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L183)
[Node.ts:191](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L191)
___
### toJSON
**toJSON**(): `Record`<`string`, `any`\>
Used with built in JSON.stringify
#### Returns
`Record`<`string`, `any`\>
#### Inherited from
[TextNode](TextNode.md).[toJSON](TextNode.md#tojson)
#### Defined in
[Node.ts:136](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L136)
@@ -26,7 +26,7 @@ A filesystem implementation that stores files in memory.
#### Defined in
[storage/FileSystem.ts:25](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/storage/FileSystem.ts#L25)
[storage/FileSystem.ts:25](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/FileSystem.ts#L25)
## Methods
@@ -50,7 +50,7 @@ A filesystem implementation that stores files in memory.
#### Defined in
[storage/FileSystem.ts:38](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/storage/FileSystem.ts#L38)
[storage/FileSystem.ts:38](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/FileSystem.ts#L38)
___
@@ -75,7 +75,7 @@ ___
#### Defined in
[storage/FileSystem.ts:44](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/storage/FileSystem.ts#L44)
[storage/FileSystem.ts:44](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/FileSystem.ts#L44)
___
@@ -100,7 +100,7 @@ ___
#### Defined in
[storage/FileSystem.ts:31](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/storage/FileSystem.ts#L31)
[storage/FileSystem.ts:31](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/FileSystem.ts#L31)
___
@@ -126,4 +126,4 @@ ___
#### Defined in
[storage/FileSystem.ts:27](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/storage/FileSystem.ts#L27)
[storage/FileSystem.ts:27](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/FileSystem.ts#L27)
+10 -10
View File
@@ -33,7 +33,7 @@ The underlying structure of each index.
#### Defined in
[indices/BaseIndex.ts:20](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L20)
[indices/BaseIndex.ts:19](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L19)
## Properties
@@ -43,7 +43,7 @@ The underlying structure of each index.
#### Defined in
[indices/BaseIndex.ts:42](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L42)
[indices/BaseIndex.ts:46](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L46)
___
@@ -57,7 +57,7 @@ ___
#### Defined in
[indices/BaseIndex.ts:17](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L17)
[indices/BaseIndex.ts:16](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L16)
___
@@ -67,7 +67,7 @@ ___
#### Defined in
[indices/BaseIndex.ts:41](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L41)
[indices/BaseIndex.ts:45](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L45)
___
@@ -81,17 +81,17 @@ ___
#### Defined in
[indices/BaseIndex.ts:18](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L18)
[indices/BaseIndex.ts:17](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L17)
___
### type
**type**: `IndexStructType` = `IndexStructType.SIMPLE_DICT`
**type**: [`IndexStructType`](../enums/IndexStructType.md) = `IndexStructType.SIMPLE_DICT`
#### Defined in
[indices/BaseIndex.ts:43](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L43)
[indices/BaseIndex.ts:47](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L47)
## Methods
@@ -112,7 +112,7 @@ ___
#### Defined in
[indices/BaseIndex.ts:52](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L52)
[indices/BaseIndex.ts:56](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L56)
___
@@ -130,7 +130,7 @@ ___
#### Defined in
[indices/BaseIndex.ts:45](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L45)
[indices/BaseIndex.ts:49](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L49)
___
@@ -148,4 +148,4 @@ ___
#### Defined in
[indices/BaseIndex.ts:57](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L57)
[indices/BaseIndex.ts:61](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L61)
+9 -9
View File
@@ -33,7 +33,7 @@ The underlying structure of each index.
#### Defined in
[indices/BaseIndex.ts:20](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L20)
[indices/BaseIndex.ts:19](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L19)
## Properties
@@ -47,7 +47,7 @@ The underlying structure of each index.
#### Defined in
[indices/BaseIndex.ts:17](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L17)
[indices/BaseIndex.ts:16](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L16)
___
@@ -57,7 +57,7 @@ ___
#### Defined in
[indices/BaseIndex.ts:67](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L67)
[indices/BaseIndex.ts:90](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L90)
___
@@ -71,17 +71,17 @@ ___
#### Defined in
[indices/BaseIndex.ts:18](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L18)
[indices/BaseIndex.ts:17](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L17)
___
### type
**type**: `IndexStructType` = `IndexStructType.LIST`
**type**: [`IndexStructType`](../enums/IndexStructType.md) = `IndexStructType.LIST`
#### Defined in
[indices/BaseIndex.ts:68](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L68)
[indices/BaseIndex.ts:91](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L91)
## Methods
@@ -101,7 +101,7 @@ ___
#### Defined in
[indices/BaseIndex.ts:70](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L70)
[indices/BaseIndex.ts:93](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L93)
___
@@ -119,7 +119,7 @@ ___
#### Defined in
[indices/BaseIndex.ts:32](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L32)
[indices/BaseIndex.ts:31](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L31)
___
@@ -137,4 +137,4 @@ ___
#### Defined in
[indices/BaseIndex.ts:74](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L74)
[indices/BaseIndex.ts:97](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L97)
+50 -30
View File
@@ -24,15 +24,15 @@ TextNode is the default node type for text. Most common node type in LlamaIndex.
| Name | Type |
| :------ | :------ |
| `init?` | `Partial`<[`TextNode`](TextNode.md)\> |
| `init?` | `Partial`<[`IndexNode`](IndexNode.md)\> |
#### Inherited from
#### Overrides
[TextNode](TextNode.md).[constructor](TextNode.md#constructor)
#### Defined in
[Node.ts:144](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L144)
[Node.ts:215](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L215)
## Properties
@@ -46,7 +46,7 @@ TextNode is the default node type for text. Most common node type in LlamaIndex.
#### Defined in
[Node.ts:39](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L39)
[Node.ts:39](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L39)
___
@@ -60,7 +60,7 @@ ___
#### Defined in
[Node.ts:139](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L139)
[Node.ts:147](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L147)
___
@@ -74,7 +74,7 @@ ___
#### Defined in
[Node.ts:43](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L43)
[Node.ts:43](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L43)
___
@@ -88,7 +88,7 @@ ___
#### Defined in
[Node.ts:44](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L44)
[Node.ts:44](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L44)
___
@@ -102,7 +102,7 @@ ___
#### Defined in
[Node.ts:46](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L46)
[Node.ts:46](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L46)
___
@@ -116,7 +116,7 @@ ___
#### Defined in
[Node.ts:38](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L38)
[Node.ts:38](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L38)
___
@@ -126,7 +126,7 @@ ___
#### Defined in
[Node.ts:205](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L205)
[Node.ts:213](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L213)
___
@@ -140,7 +140,7 @@ ___
#### Defined in
[Node.ts:42](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L42)
[Node.ts:42](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L42)
___
@@ -154,7 +154,7 @@ ___
#### Defined in
[Node.ts:142](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L142)
[Node.ts:150](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L150)
___
@@ -168,7 +168,7 @@ ___
#### Defined in
[Node.ts:45](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L45)
[Node.ts:45](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L45)
___
@@ -182,7 +182,7 @@ ___
#### Defined in
[Node.ts:138](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L138)
[Node.ts:146](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L146)
___
@@ -196,7 +196,7 @@ ___
#### Defined in
[Node.ts:137](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L137)
[Node.ts:145](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L145)
## Accessors
@@ -214,7 +214,7 @@ TextNode.childNodes
#### Defined in
[Node.ts:104](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L104)
[Node.ts:104](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L104)
___
@@ -232,7 +232,7 @@ TextNode.nextNode
#### Defined in
[Node.ts:84](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L84)
[Node.ts:84](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L84)
___
@@ -250,7 +250,7 @@ TextNode.nodeId
#### Defined in
[Node.ts:58](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L58)
[Node.ts:58](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L58)
___
@@ -268,7 +268,7 @@ TextNode.parentNode
#### Defined in
[Node.ts:94](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L94)
[Node.ts:94](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L94)
___
@@ -286,7 +286,7 @@ TextNode.prevNode
#### Defined in
[Node.ts:72](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L72)
[Node.ts:72](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L72)
___
@@ -304,7 +304,7 @@ TextNode.sourceNode
#### Defined in
[Node.ts:62](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L62)
[Node.ts:62](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L62)
## Methods
@@ -322,7 +322,7 @@ TextNode.sourceNode
#### Defined in
[Node.ts:124](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L124)
[Node.ts:124](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L124)
___
@@ -340,7 +340,7 @@ ___
#### Defined in
[Node.ts:149](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L149)
[Node.ts:157](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L157)
___
@@ -364,7 +364,7 @@ ___
#### Defined in
[Node.ts:157](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L157)
[Node.ts:165](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L165)
___
@@ -382,7 +382,7 @@ ___
#### Defined in
[Node.ts:116](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L116)
[Node.ts:116](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L116)
___
@@ -406,7 +406,7 @@ ___
#### Defined in
[Node.ts:162](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L162)
[Node.ts:170](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L170)
___
@@ -429,7 +429,7 @@ ___
#### Defined in
[Node.ts:187](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L187)
[Node.ts:195](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L195)
___
@@ -447,7 +447,7 @@ ___
#### Defined in
[Node.ts:191](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L191)
[Node.ts:199](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L199)
___
@@ -465,7 +465,7 @@ ___
#### Defined in
[Node.ts:207](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L207)
[Node.ts:220](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L220)
___
@@ -489,4 +489,24 @@ ___
#### Defined in
[Node.ts:183](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L183)
[Node.ts:191](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L191)
___
### toJSON
**toJSON**(): `Record`<`string`, `any`\>
Used with built in JSON.stringify
#### Returns
`Record`<`string`, `any`\>
#### Inherited from
[TextNode](TextNode.md).[toJSON](TextNode.md#tojson)
#### Defined in
[Node.ts:136](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L136)
+5 -5
View File
@@ -31,7 +31,7 @@ The underlying structure of each index.
#### Defined in
[indices/BaseIndex.ts:20](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L20)
[indices/BaseIndex.ts:19](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L19)
## Properties
@@ -41,7 +41,7 @@ The underlying structure of each index.
#### Defined in
[indices/BaseIndex.ts:17](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L17)
[indices/BaseIndex.ts:16](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L16)
___
@@ -51,7 +51,7 @@ ___
#### Defined in
[indices/BaseIndex.ts:18](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L18)
[indices/BaseIndex.ts:17](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L17)
## Methods
@@ -65,7 +65,7 @@ ___
#### Defined in
[indices/BaseIndex.ts:32](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L32)
[indices/BaseIndex.ts:31](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L31)
___
@@ -79,4 +79,4 @@ ___
#### Defined in
[indices/BaseIndex.ts:25](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L25)
[indices/BaseIndex.ts:24](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L24)
@@ -26,7 +26,7 @@ LLMQuestionGenerator uses the LLM to generate new questions for the LLM using to
#### Defined in
[QuestionGenerator.ts:34](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/QuestionGenerator.ts#L34)
[QuestionGenerator.ts:34](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QuestionGenerator.ts#L34)
## Properties
@@ -36,7 +36,7 @@ LLMQuestionGenerator uses the LLM to generate new questions for the LLM using to
#### Defined in
[QuestionGenerator.ts:30](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/QuestionGenerator.ts#L30)
[QuestionGenerator.ts:30](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QuestionGenerator.ts#L30)
___
@@ -46,7 +46,7 @@ ___
#### Defined in
[QuestionGenerator.ts:32](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/QuestionGenerator.ts#L32)
[QuestionGenerator.ts:32](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QuestionGenerator.ts#L32)
___
@@ -56,7 +56,7 @@ ___
#### Defined in
[QuestionGenerator.ts:31](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/QuestionGenerator.ts#L31)
[QuestionGenerator.ts:31](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QuestionGenerator.ts#L31)
## Methods
@@ -81,4 +81,4 @@ ___
#### Defined in
[QuestionGenerator.ts:40](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/QuestionGenerator.ts#L40)
[QuestionGenerator.ts:40](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QuestionGenerator.ts#L40)
+16 -16
View File
@@ -32,7 +32,7 @@ A ListIndex keeps nodes in a sequential list structure
#### Defined in
[indices/list/ListIndex.ts:43](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/list/ListIndex.ts#L43)
[indices/list/ListIndex.ts:43](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndex.ts#L43)
## Properties
@@ -46,7 +46,7 @@ A ListIndex keeps nodes in a sequential list structure
#### Defined in
[indices/BaseIndex.ts:99](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L99)
[indices/BaseIndex.ts:122](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L122)
___
@@ -60,7 +60,7 @@ ___
#### Defined in
[indices/BaseIndex.ts:101](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L101)
[indices/BaseIndex.ts:124](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L124)
___
@@ -74,7 +74,7 @@ ___
#### Defined in
[indices/BaseIndex.ts:102](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L102)
[indices/BaseIndex.ts:125](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L125)
___
@@ -88,7 +88,7 @@ ___
#### Defined in
[indices/BaseIndex.ts:97](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L97)
[indices/BaseIndex.ts:120](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L120)
___
@@ -102,13 +102,13 @@ ___
#### Defined in
[indices/BaseIndex.ts:98](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L98)
[indices/BaseIndex.ts:121](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L121)
___
### vectorStore
`Optional` **vectorStore**: `VectorStore`
`Optional` **vectorStore**: [`VectorStore`](../interfaces/VectorStore.md)
#### Inherited from
@@ -116,7 +116,7 @@ ___
#### Defined in
[indices/BaseIndex.ts:100](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L100)
[indices/BaseIndex.ts:123](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L123)
## Methods
@@ -136,7 +136,7 @@ ___
#### Defined in
[indices/list/ListIndex.ts:193](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/list/ListIndex.ts#L193)
[indices/list/ListIndex.ts:193](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndex.ts#L193)
___
@@ -156,7 +156,7 @@ ___
#### Defined in
[indices/list/ListIndex.ts:187](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/list/ListIndex.ts#L187)
[indices/list/ListIndex.ts:187](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndex.ts#L187)
___
@@ -185,7 +185,7 @@ and response synthezier if they are not provided.
#### Defined in
[indices/list/ListIndex.ts:151](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/list/ListIndex.ts#L151)
[indices/list/ListIndex.ts:151](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndex.ts#L151)
___
@@ -212,7 +212,7 @@ Create a new retriever from the index.
#### Defined in
[indices/list/ListIndex.ts:138](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/list/ListIndex.ts#L138)
[indices/list/ListIndex.ts:138](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndex.ts#L138)
___
@@ -226,7 +226,7 @@ ___
#### Defined in
[indices/list/ListIndex.ts:199](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/list/ListIndex.ts#L199)
[indices/list/ListIndex.ts:199](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndex.ts#L199)
___
@@ -248,7 +248,7 @@ ___
#### Defined in
[indices/list/ListIndex.ts:172](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/list/ListIndex.ts#L172)
[indices/list/ListIndex.ts:172](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndex.ts#L172)
___
@@ -271,7 +271,7 @@ ___
#### Defined in
[indices/list/ListIndex.ts:112](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/list/ListIndex.ts#L112)
[indices/list/ListIndex.ts:112](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndex.ts#L112)
___
@@ -291,4 +291,4 @@ ___
#### Defined in
[indices/list/ListIndex.ts:47](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/list/ListIndex.ts#L47)
[indices/list/ListIndex.ts:47](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndex.ts#L47)
@@ -31,7 +31,7 @@ LLM retriever for ListIndex.
#### Defined in
[indices/list/ListIndexRetriever.ts:64](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/list/ListIndexRetriever.ts#L64)
[indices/list/ListIndexRetriever.ts:64](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndexRetriever.ts#L64)
## Properties
@@ -41,7 +41,7 @@ LLM retriever for ListIndex.
#### Defined in
[indices/list/ListIndexRetriever.ts:59](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/list/ListIndexRetriever.ts#L59)
[indices/list/ListIndexRetriever.ts:59](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndexRetriever.ts#L59)
___
@@ -51,7 +51,7 @@ ___
#### Defined in
[indices/list/ListIndexRetriever.ts:58](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/list/ListIndexRetriever.ts#L58)
[indices/list/ListIndexRetriever.ts:58](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndexRetriever.ts#L58)
___
@@ -61,7 +61,7 @@ ___
#### Defined in
[indices/list/ListIndexRetriever.ts:60](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/list/ListIndexRetriever.ts#L60)
[indices/list/ListIndexRetriever.ts:60](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndexRetriever.ts#L60)
___
@@ -71,7 +71,7 @@ ___
#### Defined in
[indices/list/ListIndexRetriever.ts:57](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/list/ListIndexRetriever.ts#L57)
[indices/list/ListIndexRetriever.ts:57](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndexRetriever.ts#L57)
___
@@ -81,7 +81,7 @@ ___
#### Defined in
[indices/list/ListIndexRetriever.ts:61](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/list/ListIndexRetriever.ts#L61)
[indices/list/ListIndexRetriever.ts:61](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndexRetriever.ts#L61)
___
@@ -91,7 +91,7 @@ ___
#### Defined in
[indices/list/ListIndexRetriever.ts:62](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/list/ListIndexRetriever.ts#L62)
[indices/list/ListIndexRetriever.ts:62](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndexRetriever.ts#L62)
## Methods
@@ -109,7 +109,7 @@ ___
#### Defined in
[indices/list/ListIndexRetriever.ts:127](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/list/ListIndexRetriever.ts#L127)
[indices/list/ListIndexRetriever.ts:127](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndexRetriever.ts#L127)
___
@@ -134,4 +134,4 @@ ___
#### Defined in
[indices/list/ListIndexRetriever.ts:81](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/list/ListIndexRetriever.ts#L81)
[indices/list/ListIndexRetriever.ts:81](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndexRetriever.ts#L81)
@@ -26,7 +26,7 @@ Simple retriever for ListIndex that returns all nodes
#### Defined in
[indices/list/ListIndexRetriever.ts:22](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/list/ListIndexRetriever.ts#L22)
[indices/list/ListIndexRetriever.ts:22](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndexRetriever.ts#L22)
## Properties
@@ -36,7 +36,7 @@ Simple retriever for ListIndex that returns all nodes
#### Defined in
[indices/list/ListIndexRetriever.ts:20](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/list/ListIndexRetriever.ts#L20)
[indices/list/ListIndexRetriever.ts:20](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndexRetriever.ts#L20)
## Methods
@@ -54,7 +54,7 @@ Simple retriever for ListIndex that returns all nodes
#### Defined in
[indices/list/ListIndexRetriever.ts:48](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/list/ListIndexRetriever.ts#L48)
[indices/list/ListIndexRetriever.ts:48](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndexRetriever.ts#L48)
___
@@ -79,4 +79,4 @@ ___
#### Defined in
[indices/list/ListIndexRetriever.ts:26](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/list/ListIndexRetriever.ts#L26)
[indices/list/ListIndexRetriever.ts:26](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndexRetriever.ts#L26)
+92 -11
View File
@@ -26,17 +26,27 @@ Llama2 LLM implementation
#### Defined in
[llm/LLM.ts:179](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/llm/LLM.ts#L179)
[llm/LLM.ts:242](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L242)
## Properties
### chatStrategy
**chatStrategy**: [`DeuceChatStrategy`](../enums/DeuceChatStrategy.md)
#### Defined in
[llm/LLM.ts:236](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L236)
___
### maxTokens
`Optional` **maxTokens**: `number`
#### Defined in
[llm/LLM.ts:176](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/llm/LLM.ts#L176)
[llm/LLM.ts:239](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L239)
___
@@ -46,7 +56,7 @@ ___
#### Defined in
[llm/LLM.ts:174](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/llm/LLM.ts#L174)
[llm/LLM.ts:235](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L235)
___
@@ -56,7 +66,7 @@ ___
#### Defined in
[llm/LLM.ts:177](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/llm/LLM.ts#L177)
[llm/LLM.ts:240](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L240)
___
@@ -66,7 +76,17 @@ ___
#### Defined in
[llm/LLM.ts:175](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/llm/LLM.ts#L175)
[llm/LLM.ts:237](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L237)
___
### topP
• **topP**: `number`
#### Defined in
[llm/LLM.ts:238](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L238)
## Methods
@@ -93,7 +113,7 @@ Get a chat response from the LLM
#### Defined in
[llm/LLM.ts:199](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/llm/LLM.ts#L199)
[llm/LLM.ts:333](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L333)
___
@@ -120,19 +140,19 @@ Get a prompt completion from the LLM
#### Defined in
[llm/LLM.ts:224](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/llm/LLM.ts#L224)
[llm/LLM.ts:360](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L360)
___
### mapMessageType
### mapMessageTypeA16Z
▸ **mapMessageType**(`messageType`): `string`
▸ **mapMessageTypeA16Z**(`messageType`): `string`
#### Parameters
| Name | Type |
| :------ | :------ |
| `messageType` | `MessageType` |
| `messageType` | [`MessageType`](../modules.md#messagetype) |
#### Returns
@@ -140,4 +160,65 @@ ___
#### Defined in
[llm/LLM.ts:186](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/llm/LLM.ts#L186)
[llm/LLM.ts:274](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L274)
___
### mapMessagesToPrompt
▸ **mapMessagesToPrompt**(`messages`): `string`
#### Parameters
| Name | Type |
| :------ | :------ |
| `messages` | [`ChatMessage`](../interfaces/ChatMessage.md)[] |
#### Returns
`string`
#### Defined in
[llm/LLM.ts:251](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L251)
___
### mapMessagesToPromptA16Z
▸ **mapMessagesToPromptA16Z**(`messages`): `string`
#### Parameters
| Name | Type |
| :------ | :------ |
| `messages` | [`ChatMessage`](../interfaces/ChatMessage.md)[] |
#### Returns
`string`
#### Defined in
[llm/LLM.ts:263](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L263)
___
### mapMessagesToPromptMeta
▸ **mapMessagesToPromptMeta**(`messages`, `withBos?`): `string`
#### Parameters
| Name | Type | Default value |
| :------ | :------ | :------ |
| `messages` | [`ChatMessage`](../interfaces/ChatMessage.md)[] | `undefined` |
| `withBos` | `boolean` | `false` |
#### Returns
`string`
#### Defined in
[llm/LLM.ts:287](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L287)
+44 -34
View File
@@ -22,21 +22,31 @@ OpenAI LLM implementation
| Name | Type |
| :------ | :------ |
| `init?` | `Partial`<[`OpenAI`](OpenAI.md)\> |
| `init?` | `Partial`<[`OpenAI`](OpenAI.md)\> & { `azure?`: `AzureOpenAIConfig` } |
#### Defined in
[llm/LLM.ts:75](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/llm/LLM.ts#L75)
[llm/LLM.ts:94](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L94)
## Properties
### apiKey
`Optional` **apiKey**: `string` = `undefined`
#### Defined in
[llm/LLM.ts:87](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L87)
___
### callbackManager
`Optional` **callbackManager**: [`CallbackManager`](CallbackManager.md)
#### Defined in
[llm/LLM.ts:73](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/llm/LLM.ts#L73)
[llm/LLM.ts:92](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L92)
___
@@ -46,7 +56,7 @@ ___
#### Defined in
[llm/LLM.ts:71](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/llm/LLM.ts#L71)
[llm/LLM.ts:88](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L88)
___
@@ -56,7 +66,7 @@ ___
#### Defined in
[llm/LLM.ts:69](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/llm/LLM.ts#L69)
[llm/LLM.ts:84](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L84)
___
@@ -66,27 +76,7 @@ ___
#### Defined in
[llm/LLM.ts:66](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/llm/LLM.ts#L66)
___
### n
• **n**: `number` = `1`
#### Defined in
[llm/LLM.ts:68](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/llm/LLM.ts#L68)
___
### requestTimeout
• **requestTimeout**: ``null`` \| `number`
#### Defined in
[llm/LLM.ts:72](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/llm/LLM.ts#L72)
[llm/LLM.ts:81](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L81)
___
@@ -96,7 +86,7 @@ ___
#### Defined in
[llm/LLM.ts:70](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/llm/LLM.ts#L70)
[llm/LLM.ts:90](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L90)
___
@@ -106,7 +96,27 @@ ___
#### Defined in
[llm/LLM.ts:67](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/llm/LLM.ts#L67)
[llm/LLM.ts:82](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L82)
___
### timeout
• `Optional` **timeout**: `number`
#### Defined in
[llm/LLM.ts:89](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L89)
___
### topP
• **topP**: `number`
#### Defined in
[llm/LLM.ts:83](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L83)
## Methods
@@ -133,7 +143,7 @@ Get a chat response from the LLM
#### Defined in
[llm/LLM.ts:102](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/llm/LLM.ts#L102)
[llm/LLM.ts:157](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L157)
___
@@ -160,24 +170,24 @@ Get a prompt completion from the LLM
#### Defined in
[llm/LLM.ts:144](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/llm/LLM.ts#L144)
[llm/LLM.ts:197](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L197)
___
### mapMessageType
▸ **mapMessageType**(`messageType`): `ChatCompletionRequestMessageRoleEnum`
▸ **mapMessageType**(`messageType`): ``"function"`` \| ``"user"`` \| ``"assistant"`` \| ``"system"``
#### Parameters
| Name | Type |
| :------ | :------ |
| `messageType` | `MessageType` |
| `messageType` | [`MessageType`](../modules.md#messagetype) |
#### Returns
`ChatCompletionRequestMessageRoleEnum`
``"function"`` \| ``"user"`` \| ``"assistant"`` \| ``"system"``
#### Defined in
[llm/LLM.ts:85](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/llm/LLM.ts#L85)
[llm/LLM.ts:140](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L140)
+44 -8
View File
@@ -16,7 +16,13 @@ custom_edit_url: null
### constructor
**new OpenAIEmbedding**()
**new OpenAIEmbedding**(`init?`)
#### Parameters
| Name | Type |
| :------ | :------ |
| `init?` | `Partial`<[`OpenAIEmbedding`](OpenAIEmbedding.md)\> & { `azure?`: `AzureOpenAIConfig` } |
#### Overrides
@@ -24,17 +30,37 @@ custom_edit_url: null
#### Defined in
[Embedding.ts:217](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Embedding.ts#L217)
[Embedding.ts:229](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L229)
## Properties
### apiKey
`Optional` **apiKey**: `string` = `undefined`
#### Defined in
[Embedding.ts:224](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L224)
___
### maxRetries
**maxRetries**: `number`
#### Defined in
[Embedding.ts:225](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L225)
___
### model
**model**: `TEXT_EMBED_ADA_002`
#### Defined in
[Embedding.ts:215](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Embedding.ts#L215)
[Embedding.ts:221](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L221)
___
@@ -44,7 +70,17 @@ ___
#### Defined in
[Embedding.ts:214](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Embedding.ts#L214)
[Embedding.ts:227](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L227)
___
### timeout
`Optional` **timeout**: `number`
#### Defined in
[Embedding.ts:226](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L226)
## Methods
@@ -64,7 +100,7 @@ ___
#### Defined in
[Embedding.ts:224](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Embedding.ts#L224)
[Embedding.ts:270](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L270)
___
@@ -88,7 +124,7 @@ ___
#### Defined in
[Embedding.ts:240](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Embedding.ts#L240)
[Embedding.ts:286](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L286)
___
@@ -112,7 +148,7 @@ ___
#### Defined in
[Embedding.ts:236](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Embedding.ts#L236)
[Embedding.ts:282](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L282)
___
@@ -138,4 +174,4 @@ ___
#### Defined in
[Embedding.ts:197](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Embedding.ts#L197)
[Embedding.ts:204](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L204)
+1 -1
View File
@@ -41,4 +41,4 @@ Read the text of a PDF
#### Defined in
[readers/PDFReader.ts:12](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/readers/PDFReader.ts#L12)
[readers/PDFReader.ts:11](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/readers/PDFReader.ts#L11)
+7 -7
View File
@@ -34,7 +34,7 @@ A response builder that uses the query to ask the LLM generate a better response
#### Defined in
[ResponseSynthesizer.ts:78](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ResponseSynthesizer.ts#L78)
[ResponseSynthesizer.ts:78](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L78)
## Properties
@@ -44,7 +44,7 @@ A response builder that uses the query to ask the LLM generate a better response
#### Defined in
[ResponseSynthesizer.ts:76](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ResponseSynthesizer.ts#L76)
[ResponseSynthesizer.ts:76](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L76)
___
@@ -54,7 +54,7 @@ ___
#### Defined in
[ResponseSynthesizer.ts:74](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ResponseSynthesizer.ts#L74)
[ResponseSynthesizer.ts:74](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L74)
___
@@ -64,7 +64,7 @@ ___
#### Defined in
[ResponseSynthesizer.ts:75](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ResponseSynthesizer.ts#L75)
[ResponseSynthesizer.ts:75](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L75)
## Methods
@@ -91,7 +91,7 @@ BaseResponseBuilder.getResponse
#### Defined in
[ResponseSynthesizer.ts:88](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ResponseSynthesizer.ts#L88)
[ResponseSynthesizer.ts:88](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L88)
___
@@ -113,7 +113,7 @@ ___
#### Defined in
[ResponseSynthesizer.ts:113](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ResponseSynthesizer.ts#L113)
[ResponseSynthesizer.ts:113](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L113)
___
@@ -136,4 +136,4 @@ ___
#### Defined in
[ResponseSynthesizer.ts:149](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ResponseSynthesizer.ts#L149)
[ResponseSynthesizer.ts:149](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L149)
+5 -5
View File
@@ -23,7 +23,7 @@ Respone is the output of a LLM
#### Defined in
[Response.ts:10](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Response.ts#L10)
[Response.ts:10](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Response.ts#L10)
## Properties
@@ -33,7 +33,7 @@ Respone is the output of a LLM
#### Defined in
[Response.ts:7](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Response.ts#L7)
[Response.ts:7](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Response.ts#L7)
___
@@ -43,7 +43,7 @@ ___
#### Defined in
[Response.ts:8](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Response.ts#L8)
[Response.ts:8](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Response.ts#L8)
## Methods
@@ -57,7 +57,7 @@ ___
#### Defined in
[Response.ts:15](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Response.ts#L15)
[Response.ts:15](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Response.ts#L15)
___
@@ -71,4 +71,4 @@ ___
#### Defined in
[Response.ts:19](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Response.ts#L19)
[Response.ts:19](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Response.ts#L19)
@@ -24,7 +24,7 @@ A ResponseSynthesizer is used to generate a response from a query and a list of
#### Defined in
[ResponseSynthesizer.ts:285](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ResponseSynthesizer.ts#L285)
[ResponseSynthesizer.ts:285](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L285)
## Properties
@@ -34,7 +34,7 @@ A ResponseSynthesizer is used to generate a response from a query and a list of
#### Defined in
[ResponseSynthesizer.ts:282](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ResponseSynthesizer.ts#L282)
[ResponseSynthesizer.ts:282](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L282)
___
@@ -44,7 +44,7 @@ ___
#### Defined in
[ResponseSynthesizer.ts:283](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ResponseSynthesizer.ts#L283)
[ResponseSynthesizer.ts:283](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L283)
## Methods
@@ -66,4 +66,4 @@ ___
#### Defined in
[ResponseSynthesizer.ts:297](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ResponseSynthesizer.ts#L297)
[ResponseSynthesizer.ts:297](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L297)
@@ -27,7 +27,7 @@ A query engine that uses a retriever to query an index and then synthesizes the
#### Defined in
[QueryEngine.ts:34](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/QueryEngine.ts#L34)
[QueryEngine.ts:34](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QueryEngine.ts#L34)
## Properties
@@ -37,7 +37,7 @@ A query engine that uses a retriever to query an index and then synthesizes the
#### Defined in
[QueryEngine.ts:32](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/QueryEngine.ts#L32)
[QueryEngine.ts:32](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QueryEngine.ts#L32)
___
@@ -47,7 +47,7 @@ ___
#### Defined in
[QueryEngine.ts:31](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/QueryEngine.ts#L31)
[QueryEngine.ts:31](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QueryEngine.ts#L31)
## Methods
@@ -74,4 +74,4 @@ Query the query engine and get a response.
#### Defined in
[QueryEngine.ts:45](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/QueryEngine.ts#L45)
[QueryEngine.ts:45](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QueryEngine.ts#L45)
+16 -14
View File
@@ -8,6 +8,8 @@ custom_edit_url: null
SentenceSplitter is our default text splitter that supports splitting into sentences, paragraphs, or fixed length chunks with overlap.
One of the advantages of SentenceSplitter is that even in the fixed length chunks it will try to keep sentences together.
## Constructors
### constructor
@@ -27,7 +29,7 @@ SentenceSplitter is our default text splitter that supports splitting into sente
#### Defined in
[TextSplitter.ts:33](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/TextSplitter.ts#L33)
[TextSplitter.ts:35](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/TextSplitter.ts#L35)
## Properties
@@ -37,7 +39,7 @@ SentenceSplitter is our default text splitter that supports splitting into sente
#### Defined in
[TextSplitter.ts:26](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/TextSplitter.ts#L26)
[TextSplitter.ts:28](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/TextSplitter.ts#L28)
___
@@ -47,7 +49,7 @@ ___
#### Defined in
[TextSplitter.ts:25](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/TextSplitter.ts#L25)
[TextSplitter.ts:27](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/TextSplitter.ts#L27)
___
@@ -57,7 +59,7 @@ ___
#### Defined in
[TextSplitter.ts:30](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/TextSplitter.ts#L30)
[TextSplitter.ts:32](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/TextSplitter.ts#L32)
___
@@ -67,7 +69,7 @@ ___
#### Defined in
[TextSplitter.ts:29](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/TextSplitter.ts#L29)
[TextSplitter.ts:31](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/TextSplitter.ts#L31)
___
@@ -77,7 +79,7 @@ ___
#### Defined in
[TextSplitter.ts:27](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/TextSplitter.ts#L27)
[TextSplitter.ts:29](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/TextSplitter.ts#L29)
___
@@ -87,7 +89,7 @@ ___
#### Defined in
[TextSplitter.ts:28](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/TextSplitter.ts#L28)
[TextSplitter.ts:30](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/TextSplitter.ts#L30)
## Methods
@@ -108,7 +110,7 @@ ___
#### Defined in
[TextSplitter.ts:153](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/TextSplitter.ts#L153)
[TextSplitter.ts:155](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/TextSplitter.ts#L155)
___
@@ -128,7 +130,7 @@ ___
#### Defined in
[TextSplitter.ts:72](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/TextSplitter.ts#L72)
[TextSplitter.ts:74](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/TextSplitter.ts#L74)
___
@@ -149,7 +151,7 @@ ___
#### Defined in
[TextSplitter.ts:89](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/TextSplitter.ts#L89)
[TextSplitter.ts:91](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/TextSplitter.ts#L91)
___
@@ -170,7 +172,7 @@ ___
#### Defined in
[TextSplitter.ts:115](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/TextSplitter.ts#L115)
[TextSplitter.ts:117](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/TextSplitter.ts#L117)
___
@@ -191,7 +193,7 @@ ___
#### Defined in
[TextSplitter.ts:128](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/TextSplitter.ts#L128)
[TextSplitter.ts:130](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/TextSplitter.ts#L130)
___
@@ -212,7 +214,7 @@ ___
#### Defined in
[TextSplitter.ts:233](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/TextSplitter.ts#L233)
[TextSplitter.ts:247](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/TextSplitter.ts#L247)
___
@@ -233,4 +235,4 @@ ___
#### Defined in
[TextSplitter.ts:205](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/TextSplitter.ts#L205)
[TextSplitter.ts:219](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/TextSplitter.ts#L219)
@@ -26,7 +26,7 @@ SimpleChatEngine is the simplest possible chat engine. Useful for using your own
#### Defined in
[ChatEngine.ts:40](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ChatEngine.ts#L40)
[ChatEngine.ts:40](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L40)
## Properties
@@ -36,7 +36,7 @@ SimpleChatEngine is the simplest possible chat engine. Useful for using your own
#### Defined in
[ChatEngine.ts:37](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ChatEngine.ts#L37)
[ChatEngine.ts:37](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L37)
___
@@ -46,7 +46,7 @@ ___
#### Defined in
[ChatEngine.ts:38](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ChatEngine.ts#L38)
[ChatEngine.ts:38](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L38)
## Methods
@@ -73,7 +73,7 @@ Send message along with the class's current chat history to the LLM.
#### Defined in
[ChatEngine.ts:45](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ChatEngine.ts#L45)
[ChatEngine.ts:45](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L45)
___
@@ -93,4 +93,4 @@ Resets the chat history so that it's empty.
#### Defined in
[ChatEngine.ts:54](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ChatEngine.ts#L54)
[ChatEngine.ts:54](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L54)
@@ -40,4 +40,4 @@ Read all of the documents in a directory. Currently supports PDF and TXT files.
#### Defined in
[readers/SimpleDirectoryReader.ts:37](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/readers/SimpleDirectoryReader.ts#L37)
[readers/SimpleDirectoryReader.ts:37](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/readers/SimpleDirectoryReader.ts#L37)
+12 -6
View File
@@ -31,7 +31,7 @@ SimpleNodeParser is the default NodeParser. It splits documents into TextNodes u
#### Defined in
[NodeParser.ts:64](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/NodeParser.ts#L64)
[NodeParser.ts:93](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/NodeParser.ts#L93)
## Properties
@@ -39,9 +39,11 @@ SimpleNodeParser is the default NodeParser. It splits documents into TextNodes u
**includeMetadata**: `boolean`
Whether to include metadata in the nodes.
#### Defined in
[NodeParser.ts:61](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/NodeParser.ts#L61)
[NodeParser.ts:87](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/NodeParser.ts#L87)
___
@@ -49,9 +51,11 @@ ___
**includePrevNextRel**: `boolean`
Whether to include previous and next relationships in the nodes.
#### Defined in
[NodeParser.ts:62](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/NodeParser.ts#L62)
[NodeParser.ts:91](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/NodeParser.ts#L91)
___
@@ -59,9 +63,11 @@ ___
**textSplitter**: [`SentenceSplitter`](SentenceSplitter.md)
The text splitter to use.
#### Defined in
[NodeParser.ts:60](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/NodeParser.ts#L60)
[NodeParser.ts:83](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/NodeParser.ts#L83)
## Methods
@@ -87,7 +93,7 @@ Generate Node objects from documents
#### Defined in
[NodeParser.ts:95](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/NodeParser.ts#L95)
[NodeParser.ts:124](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/NodeParser.ts#L124)
___
@@ -111,4 +117,4 @@ ___
#### Defined in
[NodeParser.ts:82](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/NodeParser.ts#L82)
[NodeParser.ts:111](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/NodeParser.ts#L111)
@@ -26,7 +26,7 @@ A response builder that just concatenates responses.
#### Defined in
[ResponseSynthesizer.ts:49](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ResponseSynthesizer.ts#L49)
[ResponseSynthesizer.ts:49](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L49)
## Properties
@@ -36,7 +36,7 @@ A response builder that just concatenates responses.
#### Defined in
[ResponseSynthesizer.ts:46](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ResponseSynthesizer.ts#L46)
[ResponseSynthesizer.ts:46](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L46)
___
@@ -46,7 +46,7 @@ ___
#### Defined in
[ResponseSynthesizer.ts:47](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ResponseSynthesizer.ts#L47)
[ResponseSynthesizer.ts:47](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L47)
## Methods
@@ -72,4 +72,4 @@ BaseResponseBuilder.getResponse
#### Defined in
[ResponseSynthesizer.ts:54](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ResponseSynthesizer.ts#L54)
[ResponseSynthesizer.ts:54](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L54)
@@ -40,7 +40,7 @@ SubQuestionOutputParser is used to parse the output of the SubQuestionGenerator.
#### Defined in
[OutputParser.ts:97](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/OutputParser.ts#L97)
[OutputParser.ts:97](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/OutputParser.ts#L97)
___
@@ -64,4 +64,4 @@ ___
#### Defined in
[OutputParser.ts:89](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/OutputParser.ts#L89)
[OutputParser.ts:89](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/OutputParser.ts#L89)
@@ -29,7 +29,7 @@ SubQuestionQueryEngine decomposes a question into subquestions and then
#### Defined in
[QueryEngine.ts:65](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/QueryEngine.ts#L65)
[QueryEngine.ts:65](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QueryEngine.ts#L65)
## Properties
@@ -39,7 +39,7 @@ SubQuestionQueryEngine decomposes a question into subquestions and then
#### Defined in
[QueryEngine.ts:63](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/QueryEngine.ts#L63)
[QueryEngine.ts:63](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QueryEngine.ts#L63)
___
@@ -49,7 +49,7 @@ ___
#### Defined in
[QueryEngine.ts:62](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/QueryEngine.ts#L62)
[QueryEngine.ts:62](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QueryEngine.ts#L62)
___
@@ -59,7 +59,7 @@ ___
#### Defined in
[QueryEngine.ts:61](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/QueryEngine.ts#L61)
[QueryEngine.ts:61](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QueryEngine.ts#L61)
___
@@ -69,7 +69,7 @@ ___
#### Defined in
[QueryEngine.ts:60](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/QueryEngine.ts#L60)
[QueryEngine.ts:60](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QueryEngine.ts#L60)
## Methods
@@ -95,7 +95,7 @@ Query the query engine and get a response.
#### Defined in
[QueryEngine.ts:106](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/QueryEngine.ts#L106)
[QueryEngine.ts:106](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QueryEngine.ts#L106)
___
@@ -116,7 +116,7 @@ ___
#### Defined in
[QueryEngine.ts:134](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/QueryEngine.ts#L134)
[QueryEngine.ts:134](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QueryEngine.ts#L134)
___
@@ -140,4 +140,4 @@ ___
#### Defined in
[QueryEngine.ts:82](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/QueryEngine.ts#L82)
[QueryEngine.ts:82](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QueryEngine.ts#L82)
+1 -1
View File
@@ -41,4 +41,4 @@ Read a .txt file
#### Defined in
[readers/SimpleDirectoryReader.ts:12](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/readers/SimpleDirectoryReader.ts#L12)
[readers/SimpleDirectoryReader.ts:12](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/readers/SimpleDirectoryReader.ts#L12)
+47 -27
View File
@@ -36,7 +36,7 @@ TextNode is the default node type for text. Most common node type in LlamaIndex.
#### Defined in
[Node.ts:144](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L144)
[Node.ts:152](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L152)
## Properties
@@ -50,7 +50,7 @@ TextNode is the default node type for text. Most common node type in LlamaIndex.
#### Defined in
[Node.ts:39](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L39)
[Node.ts:39](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L39)
___
@@ -60,7 +60,7 @@ ___
#### Defined in
[Node.ts:139](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L139)
[Node.ts:147](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L147)
___
@@ -74,7 +74,7 @@ ___
#### Defined in
[Node.ts:43](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L43)
[Node.ts:43](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L43)
___
@@ -88,7 +88,7 @@ ___
#### Defined in
[Node.ts:44](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L44)
[Node.ts:44](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L44)
___
@@ -102,7 +102,7 @@ ___
#### Defined in
[Node.ts:46](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L46)
[Node.ts:46](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L46)
___
@@ -116,7 +116,7 @@ ___
#### Defined in
[Node.ts:38](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L38)
[Node.ts:38](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L38)
___
@@ -130,7 +130,7 @@ ___
#### Defined in
[Node.ts:42](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L42)
[Node.ts:42](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L42)
___
@@ -140,7 +140,7 @@ ___
#### Defined in
[Node.ts:142](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L142)
[Node.ts:150](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L150)
___
@@ -154,7 +154,7 @@ ___
#### Defined in
[Node.ts:45](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L45)
[Node.ts:45](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L45)
___
@@ -164,7 +164,7 @@ ___
#### Defined in
[Node.ts:138](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L138)
[Node.ts:146](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L146)
___
@@ -174,7 +174,7 @@ ___
#### Defined in
[Node.ts:137](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L137)
[Node.ts:145](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L145)
## Accessors
@@ -192,7 +192,7 @@ BaseNode.childNodes
#### Defined in
[Node.ts:104](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L104)
[Node.ts:104](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L104)
___
@@ -210,7 +210,7 @@ BaseNode.nextNode
#### Defined in
[Node.ts:84](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L84)
[Node.ts:84](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L84)
___
@@ -228,7 +228,7 @@ BaseNode.nodeId
#### Defined in
[Node.ts:58](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L58)
[Node.ts:58](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L58)
___
@@ -246,7 +246,7 @@ BaseNode.parentNode
#### Defined in
[Node.ts:94](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L94)
[Node.ts:94](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L94)
___
@@ -264,7 +264,7 @@ BaseNode.prevNode
#### Defined in
[Node.ts:72](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L72)
[Node.ts:72](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L72)
___
@@ -282,7 +282,7 @@ BaseNode.sourceNode
#### Defined in
[Node.ts:62](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L62)
[Node.ts:62](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L62)
## Methods
@@ -300,7 +300,7 @@ BaseNode.sourceNode
#### Defined in
[Node.ts:124](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L124)
[Node.ts:124](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L124)
___
@@ -314,7 +314,7 @@ ___
#### Defined in
[Node.ts:149](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L149)
[Node.ts:157](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L157)
___
@@ -338,7 +338,7 @@ ___
#### Defined in
[Node.ts:157](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L157)
[Node.ts:165](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L165)
___
@@ -356,7 +356,7 @@ ___
#### Defined in
[Node.ts:116](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L116)
[Node.ts:116](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L116)
___
@@ -380,7 +380,7 @@ ___
#### Defined in
[Node.ts:162](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L162)
[Node.ts:170](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L170)
___
@@ -399,7 +399,7 @@ ___
#### Defined in
[Node.ts:187](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L187)
[Node.ts:195](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L195)
___
@@ -413,7 +413,7 @@ ___
#### Defined in
[Node.ts:191](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L191)
[Node.ts:199](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L199)
___
@@ -431,7 +431,7 @@ ___
#### Defined in
[Node.ts:153](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L153)
[Node.ts:161](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L161)
___
@@ -455,4 +455,24 @@ ___
#### Defined in
[Node.ts:183](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L183)
[Node.ts:191](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L191)
___
### toJSON
**toJSON**(): `Record`<`string`, `any`\>
Used with built in JSON.stringify
#### Returns
`Record`<`string`, `any`\>
#### Inherited from
[BaseNode](BaseNode.md).[toJSON](BaseNode.md#tojson)
#### Defined in
[Node.ts:136](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L136)
+3 -3
View File
@@ -26,7 +26,7 @@ TreeSummarize repacks the text chunks into the smallest possible number of chunk
#### Defined in
[ResponseSynthesizer.ts:212](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ResponseSynthesizer.ts#L212)
[ResponseSynthesizer.ts:212](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L212)
## Properties
@@ -36,7 +36,7 @@ TreeSummarize repacks the text chunks into the smallest possible number of chunk
#### Defined in
[ResponseSynthesizer.ts:210](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ResponseSynthesizer.ts#L210)
[ResponseSynthesizer.ts:210](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L210)
## Methods
@@ -62,4 +62,4 @@ BaseResponseBuilder.getResponse
#### Defined in
[ResponseSynthesizer.ts:216](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ResponseSynthesizer.ts#L216)
[ResponseSynthesizer.ts:216](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L216)
@@ -28,7 +28,7 @@ VectorIndexRetriever retrieves nodes from a VectorIndex.
#### Defined in
[indices/vectorStore/VectorIndexRetriever.ts:22](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/vectorStore/VectorIndexRetriever.ts#L22)
[indices/vectorStore/VectorIndexRetriever.ts:22](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/vectorStore/VectorIndexRetriever.ts#L22)
## Properties
@@ -38,7 +38,7 @@ VectorIndexRetriever retrieves nodes from a VectorIndex.
#### Defined in
[indices/vectorStore/VectorIndexRetriever.ts:18](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/vectorStore/VectorIndexRetriever.ts#L18)
[indices/vectorStore/VectorIndexRetriever.ts:18](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/vectorStore/VectorIndexRetriever.ts#L18)
___
@@ -48,7 +48,7 @@ ___
#### Defined in
[indices/vectorStore/VectorIndexRetriever.ts:20](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/vectorStore/VectorIndexRetriever.ts#L20)
[indices/vectorStore/VectorIndexRetriever.ts:20](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/vectorStore/VectorIndexRetriever.ts#L20)
___
@@ -58,7 +58,7 @@ ___
#### Defined in
[indices/vectorStore/VectorIndexRetriever.ts:19](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/vectorStore/VectorIndexRetriever.ts#L19)
[indices/vectorStore/VectorIndexRetriever.ts:19](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/vectorStore/VectorIndexRetriever.ts#L19)
## Methods
@@ -76,7 +76,7 @@ ___
#### Defined in
[indices/vectorStore/VectorIndexRetriever.ts:69](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/vectorStore/VectorIndexRetriever.ts#L69)
[indices/vectorStore/VectorIndexRetriever.ts:69](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/vectorStore/VectorIndexRetriever.ts#L69)
___
@@ -101,4 +101,4 @@ ___
#### Defined in
[indices/vectorStore/VectorIndexRetriever.ts:35](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/vectorStore/VectorIndexRetriever.ts#L35)
[indices/vectorStore/VectorIndexRetriever.ts:35](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/vectorStore/VectorIndexRetriever.ts#L35)
+15 -15
View File
@@ -32,7 +32,7 @@ The VectorStoreIndex, an index that stores the nodes only according to their vec
#### Defined in
[indices/vectorStore/VectorStoreIndex.ts:36](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/vectorStore/VectorStoreIndex.ts#L36)
[indices/vectorStore/VectorStoreIndex.ts:36](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/vectorStore/VectorStoreIndex.ts#L36)
## Properties
@@ -46,7 +46,7 @@ The VectorStoreIndex, an index that stores the nodes only according to their vec
#### Defined in
[indices/BaseIndex.ts:99](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L99)
[indices/BaseIndex.ts:122](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L122)
___
@@ -60,7 +60,7 @@ ___
#### Defined in
[indices/BaseIndex.ts:101](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L101)
[indices/BaseIndex.ts:124](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L124)
___
@@ -74,7 +74,7 @@ ___
#### Defined in
[indices/BaseIndex.ts:102](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L102)
[indices/BaseIndex.ts:125](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L125)
___
@@ -88,7 +88,7 @@ ___
#### Defined in
[indices/BaseIndex.ts:97](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L97)
[indices/BaseIndex.ts:120](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L120)
___
@@ -102,13 +102,13 @@ ___
#### Defined in
[indices/BaseIndex.ts:98](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L98)
[indices/BaseIndex.ts:121](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L121)
___
### vectorStore
**vectorStore**: `VectorStore`
**vectorStore**: [`VectorStore`](../interfaces/VectorStore.md)
#### Overrides
@@ -116,7 +116,7 @@ ___
#### Defined in
[indices/vectorStore/VectorStoreIndex.ts:34](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/vectorStore/VectorStoreIndex.ts#L34)
[indices/vectorStore/VectorStoreIndex.ts:34](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/vectorStore/VectorStoreIndex.ts#L34)
## Methods
@@ -145,7 +145,7 @@ and response synthezier if they are not provided.
#### Defined in
[indices/vectorStore/VectorStoreIndex.ts:215](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/vectorStore/VectorStoreIndex.ts#L215)
[indices/vectorStore/VectorStoreIndex.ts:215](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/vectorStore/VectorStoreIndex.ts#L215)
___
@@ -171,7 +171,7 @@ Create a new retriever from the index.
#### Defined in
[indices/vectorStore/VectorStoreIndex.ts:211](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/vectorStore/VectorStoreIndex.ts#L211)
[indices/vectorStore/VectorStoreIndex.ts:211](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/vectorStore/VectorStoreIndex.ts#L211)
___
@@ -187,7 +187,7 @@ Get embeddings for nodes and place them into the index.
| :------ | :------ |
| `nodes` | [`BaseNode`](BaseNode.md)[] |
| `serviceContext` | [`ServiceContext`](../interfaces/ServiceContext.md) |
| `vectorStore` | `VectorStore` |
| `vectorStore` | [`VectorStore`](../interfaces/VectorStore.md) |
| `docStore` | `BaseDocumentStore` |
#### Returns
@@ -196,7 +196,7 @@ Get embeddings for nodes and place them into the index.
#### Defined in
[indices/vectorStore/VectorStoreIndex.ts:151](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/vectorStore/VectorStoreIndex.ts#L151)
[indices/vectorStore/VectorStoreIndex.ts:151](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/vectorStore/VectorStoreIndex.ts#L151)
___
@@ -221,7 +221,7 @@ High level API: split documents, get embeddings, and build index.
#### Defined in
[indices/vectorStore/VectorStoreIndex.ts:186](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/vectorStore/VectorStoreIndex.ts#L186)
[indices/vectorStore/VectorStoreIndex.ts:186](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/vectorStore/VectorStoreIndex.ts#L186)
___
@@ -245,7 +245,7 @@ Get the embeddings for nodes.
#### Defined in
[indices/vectorStore/VectorStoreIndex.ts:123](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/vectorStore/VectorStoreIndex.ts#L123)
[indices/vectorStore/VectorStoreIndex.ts:123](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/vectorStore/VectorStoreIndex.ts#L123)
___
@@ -268,4 +268,4 @@ This is needed to handle persistence.
#### Defined in
[indices/vectorStore/VectorStoreIndex.ts:47](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/vectorStore/VectorStoreIndex.ts#L47)
[indices/vectorStore/VectorStoreIndex.ts:47](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/vectorStore/VectorStoreIndex.ts#L47)
@@ -0,0 +1,37 @@
---
id: "DeuceChatStrategy"
title: "Enumeration: DeuceChatStrategy"
sidebar_label: "DeuceChatStrategy"
sidebar_position: 0
custom_edit_url: null
---
## Enumeration Members
### A16Z
**A16Z** = ``"a16z"``
#### Defined in
[llm/LLM.ts:224](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L224)
___
### META
• **META** = ``"meta"``
#### Defined in
[llm/LLM.ts:225](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L225)
___
### METAWBOS
• **METAWBOS** = ``"metawbos"``
#### Defined in
[llm/LLM.ts:226](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L226)
@@ -0,0 +1,27 @@
---
id: "IndexStructType"
title: "Enumeration: IndexStructType"
sidebar_label: "IndexStructType"
sidebar_position: 0
custom_edit_url: null
---
## Enumeration Members
### LIST
**LIST** = ``"list"``
#### Defined in
[indices/BaseIndex.ts:41](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L41)
___
### SIMPLE\_DICT
• **SIMPLE\_DICT** = ``"simple_dict"``
#### Defined in
[indices/BaseIndex.ts:40](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L40)
@@ -14,7 +14,7 @@ custom_edit_url: null
#### Defined in
[indices/list/ListIndex.ts:26](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/list/ListIndex.ts#L26)
[indices/list/ListIndex.ts:26](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndex.ts#L26)
___
@@ -24,4 +24,4 @@ ___
#### Defined in
[indices/list/ListIndex.ts:28](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/list/ListIndex.ts#L28)
[indices/list/ListIndex.ts:28](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndex.ts#L28)
+4 -4
View File
@@ -14,7 +14,7 @@ custom_edit_url: null
#### Defined in
[Node.ts:19](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L19)
[Node.ts:19](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L19)
___
@@ -24,7 +24,7 @@ ___
#### Defined in
[Node.ts:20](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L20)
[Node.ts:20](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L20)
___
@@ -34,7 +34,7 @@ ___
#### Defined in
[Node.ts:21](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L21)
[Node.ts:21](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L21)
___
@@ -44,4 +44,4 @@ ___
#### Defined in
[Node.ts:22](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L22)
[Node.ts:22](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L22)
+5 -5
View File
@@ -14,7 +14,7 @@ custom_edit_url: null
#### Defined in
[Node.ts:8](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L8)
[Node.ts:8](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L8)
___
@@ -24,7 +24,7 @@ ___
#### Defined in
[Node.ts:6](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L6)
[Node.ts:6](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L6)
___
@@ -34,7 +34,7 @@ ___
#### Defined in
[Node.ts:7](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L7)
[Node.ts:7](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L7)
___
@@ -44,7 +44,7 @@ ___
#### Defined in
[Node.ts:5](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L5)
[Node.ts:5](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L5)
___
@@ -54,4 +54,4 @@ ___
#### Defined in
[Node.ts:4](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L4)
[Node.ts:4](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L4)
+4 -4
View File
@@ -14,7 +14,7 @@ custom_edit_url: null
#### Defined in
[Node.ts:15](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L15)
[Node.ts:15](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L15)
___
@@ -24,7 +24,7 @@ ___
#### Defined in
[Node.ts:13](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L13)
[Node.ts:13](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L13)
___
@@ -34,7 +34,7 @@ ___
#### Defined in
[Node.ts:14](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L14)
[Node.ts:14](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L14)
___
@@ -44,4 +44,4 @@ ___
#### Defined in
[Node.ts:12](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L12)
[Node.ts:12](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L12)
+3 -3
View File
@@ -17,7 +17,7 @@ Default is cosine similarity. Dot product and negative Euclidean distance are al
#### Defined in
[Embedding.ts:10](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Embedding.ts#L10)
[Embedding.ts:17](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L17)
___
@@ -27,7 +27,7 @@ ___
#### Defined in
[Embedding.ts:11](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Embedding.ts#L11)
[Embedding.ts:18](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L18)
___
@@ -37,4 +37,4 @@ ___
#### Defined in
[Embedding.ts:12](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Embedding.ts#L12)
[Embedding.ts:19](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L19)
@@ -0,0 +1,77 @@
---
id: "VectorStoreQueryMode"
title: "Enumeration: VectorStoreQueryMode"
sidebar_label: "VectorStoreQueryMode"
sidebar_position: 0
custom_edit_url: null
---
## Enumeration Members
### DEFAULT
**DEFAULT** = ``"default"``
#### Defined in
[storage/vectorStore/types.ts:12](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L12)
___
### HYBRID
• **HYBRID** = ``"hybrid"``
#### Defined in
[storage/vectorStore/types.ts:14](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L14)
___
### LINEAR\_REGRESSION
• **LINEAR\_REGRESSION** = ``"linear_regression"``
#### Defined in
[storage/vectorStore/types.ts:18](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L18)
___
### LOGISTIC\_REGRESSION
• **LOGISTIC\_REGRESSION** = ``"logistic_regression"``
#### Defined in
[storage/vectorStore/types.ts:17](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L17)
___
### MMR
• **MMR** = ``"mmr"``
#### Defined in
[storage/vectorStore/types.ts:20](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L20)
___
### SPARSE
• **SPARSE** = ``"sparse"``
#### Defined in
[storage/vectorStore/types.ts:13](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L13)
___
### SVM
• **SVM** = ``"svm"``
#### Defined in
[storage/vectorStore/types.ts:16](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L16)
+27 -10
View File
@@ -8,8 +8,12 @@ custom_edit_url: null
# LlamaIndex.TS
LlamaIndex is a data framework for your LLM application.
Use your own data with large language models (LLMs, OpenAI ChatGPT and others) in Typescript and Javascript.
Documentation: https://ts.llamaindex.ai/
## What is LlamaIndex.TS?
LlamaIndex.TS aims to be a lightweight, easy to use set of libraries to help you integrate large language models into your applications with your own data.
@@ -22,8 +26,11 @@ In a new folder:
```bash
export OPENAI_API_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
@@ -62,28 +69,38 @@ main();
Then you can run it using
```bash
npx ts-node example.ts
pnpm dlx ts-node example.ts
```
## Playground
Check out our NextJS playground at https://llama-playground.vercel.app/. The source is available at https://github.com/run-llama/ts-playground
## Core concepts for getting started:
- [Document](packages/core/src/Node.ts): A document represents a text file, PDF file or other contiguous piece of data.
- [Document](/packages/core/src/Node.ts): A document represents a text file, PDF file or other contiguous piece of data.
- [Node](packages/core/src/Node.ts): The basic data building block. Most commonly, these are parts of the document split into manageable pieces that are small enough to be fed into an embedding model and LLM.
- [Node](/packages/core/src/Node.ts): The basic data building block. Most commonly, these are parts of the document split into manageable pieces that are small enough to be fed into an embedding model and LLM.
- [Embedding](packages/core/src/Embedding.ts): Embeddings are sets of floating point numbers which represent the data in a Node. By comparing the similarity of embeddings, we can derive an understanding of the similarity of two pieces of data. One use case is to compare the embedding of a question with the embeddings of our Nodes to see which Nodes may contain the data needed to answer that quesiton.
- [Embedding](/packages/core/src/Embedding.ts): Embeddings are sets of floating point numbers which represent the data in a Node. By comparing the similarity of embeddings, we can derive an understanding of the similarity of two pieces of data. One use case is to compare the embedding of a question with the embeddings of our Nodes to see which Nodes may contain the data needed to answer that quesiton.
- [Indices](packages/core/src/indices/): Indices store the Nodes and the embeddings of those nodes. QueryEngines retrieve Nodes from these Indices using embedding similarity.
- [Indices](/packages/core/src/indices/): Indices store the Nodes and the embeddings of those nodes. QueryEngines retrieve Nodes from these Indices using embedding similarity.
- [QueryEngine](packages/core/src/QueryEngine.ts): Query engines are what generate the query you put in and give you back the result. Query engines generally combine a pre-built prompt with selected Nodes from your Index to give the LLM the context it needs to answer your query.
- [QueryEngine](/packages/core/src/QueryEngine.ts): Query engines are what generate the query you put in and give you back the result. Query engines generally combine a pre-built prompt with selected Nodes from your Index to give the LLM the context it needs to answer your query.
- [ChatEngine](packages/core/src/ChatEngine.ts): A ChatEngine helps you build a chatbot that will interact with your Indices.
- [ChatEngine](/packages/core/src/ChatEngine.ts): A ChatEngine helps you build a chatbot that will interact with your Indices.
- [SimplePrompt](packages/core/src/Prompt.ts): A simple standardized function call definition that takes in inputs and formats them in a template literal. SimplePrompts can be specialized using currying and combined using other SimplePrompt functions.
- [SimplePrompt](/packages/core/src/Prompt.ts): A simple standardized function call definition that takes in inputs and formats them in a template literal. SimplePrompts can be specialized using currying and combined using other SimplePrompt functions.
## Supported LLMs:
- OpenAI GPT-3.5-turbo and GPT-4
- Anthropic Claude Instant and Claude 2
- Llama2 Chat LLMs (70B, 13B, and 7B parameters)
## Contributing:
We are in the very early days of LlamaIndex.TS. If youre interested in hacking on it with us check out our [contributing guide](CONTRIBUTING.md)
We are in the very early days of LlamaIndex.TS. If youre interested in hacking on it with us check out our [contributing guide](/CONTRIBUTING.md)
## Bugs? Questions?
@@ -26,7 +26,7 @@ custom_edit_url: null
#### Defined in
[indices/BaseIndex.ts:86](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L86)
[indices/BaseIndex.ts:109](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L109)
___
@@ -36,7 +36,7 @@ ___
#### Defined in
[indices/BaseIndex.ts:88](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L88)
[indices/BaseIndex.ts:111](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L111)
___
@@ -46,7 +46,7 @@ ___
#### Defined in
[indices/BaseIndex.ts:89](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L89)
[indices/BaseIndex.ts:112](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L112)
___
@@ -56,7 +56,7 @@ ___
#### Defined in
[indices/BaseIndex.ts:84](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L84)
[indices/BaseIndex.ts:107](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L107)
___
@@ -66,14 +66,14 @@ ___
#### Defined in
[indices/BaseIndex.ts:85](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L85)
[indices/BaseIndex.ts:108](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L108)
___
### vectorStore
`Optional` **vectorStore**: `VectorStore`
`Optional` **vectorStore**: [`VectorStore`](VectorStore.md)
#### Defined in
[indices/BaseIndex.ts:87](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L87)
[indices/BaseIndex.ts:110](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L110)
@@ -1,49 +0,0 @@
---
id: "BaseLLMPredictor"
title: "Interface: BaseLLMPredictor"
sidebar_label: "BaseLLMPredictor"
sidebar_position: 0
custom_edit_url: null
---
LLM Predictors are an abstraction to predict the response to a prompt.
## Implemented by
- [`ChatGPTLLMPredictor`](../classes/ChatGPTLLMPredictor.md)
## Methods
### getLlmMetadata
**getLlmMetadata**(): `Promise`<`any`\>
#### Returns
`Promise`<`any`\>
#### Defined in
[LLMPredictor.ts:9](https://github.com/run-llama/LlamaIndexTS/blob/9d0cadf/packages/core/src/LLMPredictor.ts#L9)
___
### predict
**predict**(`prompt`, `input?`, `parentEvent?`): `Promise`<`string`\>
#### Parameters
| Name | Type |
| :------ | :------ |
| `prompt` | `string` \| [`SimplePrompt`](../modules.md#simpleprompt) |
| `input?` | `Record`<`string`, `string`\> |
| `parentEvent?` | [`Event`](Event.md) |
#### Returns
`Promise`<`string`\>
#### Defined in
[LLMPredictor.ts:10](https://github.com/run-llama/LlamaIndexTS/blob/9d0cadf/packages/core/src/LLMPredictor.ts#L10)
@@ -36,7 +36,7 @@ An OutputParser is used to extract structured data from the raw output of the LL
#### Defined in
[OutputParser.ts:8](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/OutputParser.ts#L8)
[OutputParser.ts:8](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/OutputParser.ts#L8)
___
@@ -56,4 +56,4 @@ ___
#### Defined in
[OutputParser.ts:7](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/OutputParser.ts#L7)
[OutputParser.ts:7](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/OutputParser.ts#L7)
@@ -34,4 +34,4 @@ Query the query engine and get a response.
#### Defined in
[QueryEngine.ts:24](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/QueryEngine.ts#L24)
[QueryEngine.ts:24](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QueryEngine.ts#L24)
@@ -31,4 +31,4 @@ QuestionGenerators generate new questions for the LLM using tools and a user que
#### Defined in
[QuestionGenerator.ts:23](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/QuestionGenerator.ts#L23)
[QuestionGenerator.ts:23](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QuestionGenerator.ts#L23)
+1 -1
View File
@@ -32,4 +32,4 @@ A reader takes imports data into Document objects.
#### Defined in
[readers/base.ts:7](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/readers/base.ts#L7)
[readers/base.ts:7](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/readers/base.ts#L7)
@@ -26,7 +26,7 @@ Retrievers retrieve the nodes that most closely match our query in similarity.
#### Defined in
[Retriever.ts:10](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Retriever.ts#L10)
[Retriever.ts:10](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Retriever.ts#L10)
___
@@ -47,4 +47,4 @@ ___
#### Defined in
[Retriever.ts:9](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Retriever.ts#L9)
[Retriever.ts:9](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Retriever.ts#L9)
+1 -1
View File
@@ -22,4 +22,4 @@ Simple Tool interface. Likely to change.
#### Defined in
[Tool.ts:12](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Tool.ts#L12)
[Tool.ts:12](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Tool.ts#L12)
+2 -2
View File
@@ -35,7 +35,7 @@ Send message along with the class's current chat history to the LLM.
#### Defined in
[ChatEngine.ts:25](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ChatEngine.ts#L25)
[ChatEngine.ts:25](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L25)
___
@@ -51,4 +51,4 @@ Resets the chat history so that it's empty.
#### Defined in
[ChatEngine.ts:30](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ChatEngine.ts#L30)
[ChatEngine.ts:30](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L30)
+3 -3
View File
@@ -14,14 +14,14 @@ custom_edit_url: null
#### Defined in
[llm/LLM.ts:14](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/llm/LLM.ts#L14)
[llm/LLM.ts:28](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L28)
___
### role
**role**: `MessageType`
**role**: [`MessageType`](../modules.md#messagetype)
#### Defined in
[llm/LLM.ts:15](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/llm/LLM.ts#L15)
[llm/LLM.ts:29](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L29)
@@ -14,7 +14,7 @@ custom_edit_url: null
#### Defined in
[llm/LLM.ts:21](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/llm/LLM.ts#L21)
[llm/LLM.ts:35](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L35)
___
@@ -24,7 +24,7 @@ ___
#### Defined in
[llm/LLM.ts:19](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/llm/LLM.ts#L19)
[llm/LLM.ts:33](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L33)
___
@@ -34,4 +34,4 @@ ___
#### Defined in
[llm/LLM.ts:20](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/llm/LLM.ts#L20)
[llm/LLM.ts:34](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L34)
+4 -4
View File
@@ -14,7 +14,7 @@ custom_edit_url: null
#### Defined in
[callbacks/CallbackManager.ts:14](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/callbacks/CallbackManager.ts#L14)
[callbacks/CallbackManager.ts:13](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/callbacks/CallbackManager.ts#L13)
___
@@ -24,7 +24,7 @@ ___
#### Defined in
[callbacks/CallbackManager.ts:17](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/callbacks/CallbackManager.ts#L17)
[callbacks/CallbackManager.ts:16](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/callbacks/CallbackManager.ts#L16)
___
@@ -34,7 +34,7 @@ ___
#### Defined in
[callbacks/CallbackManager.ts:16](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/callbacks/CallbackManager.ts#L16)
[callbacks/CallbackManager.ts:15](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/callbacks/CallbackManager.ts#L15)
___
@@ -44,4 +44,4 @@ ___
#### Defined in
[callbacks/CallbackManager.ts:15](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/callbacks/CallbackManager.ts#L15)
[callbacks/CallbackManager.ts:14](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/callbacks/CallbackManager.ts#L14)
@@ -0,0 +1,37 @@
---
id: "ExactMatchFilter"
title: "Interface: ExactMatchFilter"
sidebar_label: "ExactMatchFilter"
sidebar_position: 0
custom_edit_url: null
---
## Properties
### filterType
**filterType**: ``"ExactMatch"``
#### Defined in
[storage/vectorStore/types.ts:24](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L24)
___
### key
• **key**: `string`
#### Defined in
[storage/vectorStore/types.ts:25](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L25)
___
### value
• **value**: `string` \| `number`
#### Defined in
[storage/vectorStore/types.ts:26](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L26)
@@ -33,7 +33,7 @@ browsers.
#### Defined in
[storage/FileSystem.ts:12](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/storage/FileSystem.ts#L12)
[storage/FileSystem.ts:12](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/FileSystem.ts#L12)
___
@@ -54,7 +54,7 @@ ___
#### Defined in
[storage/FileSystem.ts:13](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/storage/FileSystem.ts#L13)
[storage/FileSystem.ts:13](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/FileSystem.ts#L13)
___
@@ -75,7 +75,7 @@ ___
#### Defined in
[storage/FileSystem.ts:11](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/storage/FileSystem.ts#L11)
[storage/FileSystem.ts:11](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/FileSystem.ts#L11)
___
@@ -97,4 +97,4 @@ ___
#### Defined in
[storage/FileSystem.ts:10](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/storage/FileSystem.ts#L10)
[storage/FileSystem.ts:10](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/FileSystem.ts#L10)
+3 -2
View File
@@ -10,6 +10,7 @@ Unified language model interface
## Implemented by
- [`Anthropic`](../classes/Anthropic.md)
- [`LlamaDeuce`](../classes/LlamaDeuce.md)
- [`OpenAI`](../classes/OpenAI.md)
@@ -34,7 +35,7 @@ Get a chat response from the LLM
#### Defined in
[llm/LLM.ts:35](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/llm/LLM.ts#L35)
[llm/LLM.ts:49](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L49)
___
@@ -57,4 +58,4 @@ Get a prompt completion from the LLM
#### Defined in
[llm/LLM.ts:41](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/llm/LLM.ts#L41)
[llm/LLM.ts:55](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L55)
@@ -0,0 +1,17 @@
---
id: "MetadataFilters"
title: "Interface: MetadataFilters"
sidebar_label: "MetadataFilters"
sidebar_position: 0
custom_edit_url: null
---
## Properties
### filters
**filters**: [`ExactMatchFilter`](ExactMatchFilter.md)[]
#### Defined in
[storage/vectorStore/types.ts:30](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L30)
@@ -0,0 +1,37 @@
---
id: "MetadataInfo"
title: "Interface: MetadataInfo"
sidebar_label: "MetadataInfo"
sidebar_position: 0
custom_edit_url: null
---
## Properties
### description
**description**: `string`
#### Defined in
[storage/vectorStore/types.ts:42](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L42)
___
### name
**name**: `string`
#### Defined in
[storage/vectorStore/types.ts:40](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L40)
___
### type
**type**: `string`
#### Defined in
[storage/vectorStore/types.ts:41](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L41)
+9 -5
View File
@@ -6,7 +6,7 @@ sidebar_position: 0
custom_edit_url: null
---
A node parser generates TextNodes from Documents
A NodeParser generates TextNodes from Documents
## Implemented by
@@ -18,16 +18,20 @@ A node parser generates TextNodes from Documents
**getNodesFromDocuments**(`documents`): [`TextNode`](../classes/TextNode.md)[]
Generates an array of nodes from an array of documents.
#### Parameters
| Name | Type |
| :------ | :------ |
| `documents` | [`Document`](../classes/Document.md)[] |
| Name | Type | Description |
| :------ | :------ | :------ |
| `documents` | [`Document`](../classes/Document.md)[] | The documents to generate nodes from. |
#### Returns
[`TextNode`](../classes/TextNode.md)[]
An array of nodes.
#### Defined in
[NodeParser.ts:53](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/NodeParser.ts#L53)
[NodeParser.ts:73](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/NodeParser.ts#L73)
@@ -16,7 +16,7 @@ A node with an embedding
#### Defined in
[Node.ts:247](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L247)
[Node.ts:277](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L277)
___
@@ -26,4 +26,4 @@ ___
#### Defined in
[Node.ts:246](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L246)
[Node.ts:276](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L276)
@@ -16,7 +16,7 @@ A node with a similarity score
#### Defined in
[Node.ts:238](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L238)
[Node.ts:268](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L268)
___
@@ -26,4 +26,4 @@ ___
#### Defined in
[Node.ts:239](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L239)
[Node.ts:269](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L269)
@@ -26,7 +26,7 @@ A Tool that uses a QueryEngine.
#### Defined in
[Tool.ts:12](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Tool.ts#L12)
[Tool.ts:12](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Tool.ts#L12)
___
@@ -36,4 +36,4 @@ ___
#### Defined in
[Tool.ts:19](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Tool.ts#L19)
[Tool.ts:19](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Tool.ts#L19)
@@ -14,7 +14,7 @@ custom_edit_url: null
#### Defined in
[Node.ts:29](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L29)
[Node.ts:29](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L29)
___
@@ -24,7 +24,7 @@ ___
#### Defined in
[Node.ts:28](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L28)
[Node.ts:28](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L28)
___
@@ -34,7 +34,7 @@ ___
#### Defined in
[Node.ts:26](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L26)
[Node.ts:26](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L26)
___
@@ -44,4 +44,4 @@ ___
#### Defined in
[Node.ts:27](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L27)
[Node.ts:27](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L27)
@@ -24,7 +24,7 @@ BaseCallbackResponse.event
#### Defined in
[callbacks/CallbackManager.ts:21](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/callbacks/CallbackManager.ts#L21)
[callbacks/CallbackManager.ts:20](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/callbacks/CallbackManager.ts#L20)
___
@@ -34,7 +34,7 @@ ___
#### Defined in
[callbacks/CallbackManager.ts:47](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/callbacks/CallbackManager.ts#L47)
[callbacks/CallbackManager.ts:46](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/callbacks/CallbackManager.ts#L46)
___
@@ -44,4 +44,4 @@ ___
#### Defined in
[callbacks/CallbackManager.ts:46](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/callbacks/CallbackManager.ts#L46)
[callbacks/CallbackManager.ts:45](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/callbacks/CallbackManager.ts#L45)
@@ -16,7 +16,7 @@ The ServiceContext is a collection of components that are used in different part
#### Defined in
[ServiceContext.ts:15](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ServiceContext.ts#L15)
[ServiceContext.ts:15](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ServiceContext.ts#L15)
___
@@ -26,7 +26,7 @@ ___
#### Defined in
[ServiceContext.ts:13](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ServiceContext.ts#L13)
[ServiceContext.ts:13](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ServiceContext.ts#L13)
___
@@ -36,7 +36,7 @@ ___
#### Defined in
[ServiceContext.ts:11](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ServiceContext.ts#L11)
[ServiceContext.ts:11](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ServiceContext.ts#L11)
___
@@ -46,7 +46,7 @@ ___
#### Defined in
[ServiceContext.ts:14](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ServiceContext.ts#L14)
[ServiceContext.ts:14](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ServiceContext.ts#L14)
___
@@ -56,4 +56,4 @@ ___
#### Defined in
[ServiceContext.ts:12](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ServiceContext.ts#L12)
[ServiceContext.ts:12](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ServiceContext.ts#L12)
@@ -14,7 +14,7 @@ custom_edit_url: null
#### Defined in
[ServiceContext.ts:24](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ServiceContext.ts#L24)
[ServiceContext.ts:24](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ServiceContext.ts#L24)
___
@@ -24,7 +24,7 @@ ___
#### Defined in
[ServiceContext.ts:27](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ServiceContext.ts#L27)
[ServiceContext.ts:27](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ServiceContext.ts#L27)
___
@@ -34,7 +34,7 @@ ___
#### Defined in
[ServiceContext.ts:26](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ServiceContext.ts#L26)
[ServiceContext.ts:26](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ServiceContext.ts#L26)
___
@@ -44,17 +44,17 @@ ___
#### Defined in
[ServiceContext.ts:22](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ServiceContext.ts#L22)
[ServiceContext.ts:22](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ServiceContext.ts#L22)
___
### llm
`Optional` **llm**: [`OpenAI`](../classes/OpenAI.md)
`Optional` **llm**: [`LLM`](LLM.md)
#### Defined in
[ServiceContext.ts:20](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ServiceContext.ts#L20)
[ServiceContext.ts:20](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ServiceContext.ts#L20)
___
@@ -64,7 +64,7 @@ ___
#### Defined in
[ServiceContext.ts:23](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ServiceContext.ts#L23)
[ServiceContext.ts:23](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ServiceContext.ts#L23)
___
@@ -74,4 +74,4 @@ ___
#### Defined in
[ServiceContext.ts:21](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ServiceContext.ts#L21)
[ServiceContext.ts:21](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ServiceContext.ts#L21)
@@ -14,7 +14,7 @@ custom_edit_url: null
#### Defined in
[storage/StorageContext.ts:15](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/storage/StorageContext.ts#L15)
[storage/StorageContext.ts:15](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/StorageContext.ts#L15)
___
@@ -24,14 +24,14 @@ ___
#### Defined in
[storage/StorageContext.ts:16](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/storage/StorageContext.ts#L16)
[storage/StorageContext.ts:16](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/StorageContext.ts#L16)
___
### vectorStore
**vectorStore**: `VectorStore`
**vectorStore**: [`VectorStore`](VectorStore.md)
#### Defined in
[storage/StorageContext.ts:17](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/storage/StorageContext.ts#L17)
[storage/StorageContext.ts:17](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/StorageContext.ts#L17)
@@ -24,7 +24,7 @@ BaseCallbackResponse.event
#### Defined in
[callbacks/CallbackManager.ts:21](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/callbacks/CallbackManager.ts#L21)
[callbacks/CallbackManager.ts:20](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/callbacks/CallbackManager.ts#L20)
___
@@ -34,7 +34,7 @@ ___
#### Defined in
[callbacks/CallbackManager.ts:40](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/callbacks/CallbackManager.ts#L40)
[callbacks/CallbackManager.ts:39](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/callbacks/CallbackManager.ts#L39)
___
@@ -44,7 +44,7 @@ ___
#### Defined in
[callbacks/CallbackManager.ts:41](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/callbacks/CallbackManager.ts#L41)
[callbacks/CallbackManager.ts:40](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/callbacks/CallbackManager.ts#L40)
___
@@ -54,4 +54,4 @@ ___
#### Defined in
[callbacks/CallbackManager.ts:42](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/callbacks/CallbackManager.ts#L42)
[callbacks/CallbackManager.ts:41](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/callbacks/CallbackManager.ts#L41)
+6 -6
View File
@@ -10,11 +10,11 @@ custom_edit_url: null
### choices
**choices**: { `delta`: { `content?`: `string` ; `role?`: `ChatCompletionResponseMessageRoleEnum` } ; `finish_reason`: ``null`` \| `string` ; `index`: `number` }[]
**choices**: { `delta`: { `content?`: ``null`` \| `string` ; `role?`: ``"function"`` \| ``"user"`` \| ``"assistant"`` \| ``"system"`` } ; `finish_reason`: ``null`` \| `string` ; `index`: `number` }[]
#### Defined in
[callbacks/CallbackManager.ts:29](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/callbacks/CallbackManager.ts#L29)
[callbacks/CallbackManager.ts:28](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/callbacks/CallbackManager.ts#L28)
___
@@ -24,7 +24,7 @@ ___
#### Defined in
[callbacks/CallbackManager.ts:27](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/callbacks/CallbackManager.ts#L27)
[callbacks/CallbackManager.ts:26](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/callbacks/CallbackManager.ts#L26)
___
@@ -34,7 +34,7 @@ ___
#### Defined in
[callbacks/CallbackManager.ts:25](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/callbacks/CallbackManager.ts#L25)
[callbacks/CallbackManager.ts:24](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/callbacks/CallbackManager.ts#L24)
___
@@ -44,7 +44,7 @@ ___
#### Defined in
[callbacks/CallbackManager.ts:28](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/callbacks/CallbackManager.ts#L28)
[callbacks/CallbackManager.ts:27](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/callbacks/CallbackManager.ts#L27)
___
@@ -54,4 +54,4 @@ ___
#### Defined in
[callbacks/CallbackManager.ts:26](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/callbacks/CallbackManager.ts#L26)
[callbacks/CallbackManager.ts:25](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/callbacks/CallbackManager.ts#L25)
@@ -22,7 +22,7 @@ StructuredOutput is just a combo of the raw output and the parsed output.
#### Defined in
[OutputParser.ts:16](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/OutputParser.ts#L16)
[OutputParser.ts:16](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/OutputParser.ts#L16)
___
@@ -32,4 +32,4 @@ ___
#### Defined in
[OutputParser.ts:15](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/OutputParser.ts#L15)
[OutputParser.ts:15](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/OutputParser.ts#L15)
+2 -2
View File
@@ -14,7 +14,7 @@ custom_edit_url: null
#### Defined in
[QuestionGenerator.ts:15](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/QuestionGenerator.ts#L15)
[QuestionGenerator.ts:15](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QuestionGenerator.ts#L15)
___
@@ -24,4 +24,4 @@ ___
#### Defined in
[QuestionGenerator.ts:16](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/QuestionGenerator.ts#L16)
[QuestionGenerator.ts:16](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QuestionGenerator.ts#L16)
@@ -14,7 +14,7 @@ custom_edit_url: null
#### Defined in
[Tool.ts:4](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Tool.ts#L4)
[Tool.ts:4](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Tool.ts#L4)
___
@@ -24,4 +24,4 @@ ___
#### Defined in
[Tool.ts:5](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Tool.ts#L5)
[Tool.ts:5](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Tool.ts#L5)
@@ -24,7 +24,7 @@ custom_edit_url: null
#### Defined in
[indices/BaseIndex.ts:86](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L86)
[indices/BaseIndex.ts:109](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L109)
___
@@ -38,7 +38,7 @@ ___
#### Defined in
[indices/BaseIndex.ts:88](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L88)
[indices/BaseIndex.ts:111](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L111)
___
@@ -52,7 +52,7 @@ ___
#### Defined in
[indices/BaseIndex.ts:89](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L89)
[indices/BaseIndex.ts:112](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L112)
___
@@ -66,7 +66,7 @@ ___
#### Defined in
[indices/BaseIndex.ts:84](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L84)
[indices/BaseIndex.ts:107](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L107)
___
@@ -80,13 +80,13 @@ ___
#### Defined in
[indices/BaseIndex.ts:85](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L85)
[indices/BaseIndex.ts:108](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L108)
___
### vectorStore
**vectorStore**: `VectorStore`
**vectorStore**: [`VectorStore`](VectorStore.md)
#### Overrides
@@ -94,4 +94,4 @@ ___
#### Defined in
[indices/BaseIndex.ts:139](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L139)
[indices/BaseIndex.ts:162](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L162)
@@ -14,7 +14,7 @@ custom_edit_url: null
#### Defined in
[indices/BaseIndex.ts:133](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L133)
[indices/BaseIndex.ts:156](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L156)
___
@@ -24,7 +24,7 @@ ___
#### Defined in
[indices/BaseIndex.ts:132](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L132)
[indices/BaseIndex.ts:155](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L155)
___
@@ -34,7 +34,7 @@ ___
#### Defined in
[indices/BaseIndex.ts:131](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L131)
[indices/BaseIndex.ts:154](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L154)
___
@@ -44,7 +44,7 @@ ___
#### Defined in
[indices/BaseIndex.ts:134](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L134)
[indices/BaseIndex.ts:157](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L157)
___
@@ -54,4 +54,4 @@ ___
#### Defined in
[indices/BaseIndex.ts:135](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/indices/BaseIndex.ts#L135)
[indices/BaseIndex.ts:158](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L158)
@@ -0,0 +1,124 @@
---
id: "VectorStore"
title: "Interface: VectorStore"
sidebar_label: "VectorStore"
sidebar_position: 0
custom_edit_url: null
---
## Properties
### isEmbeddingQuery
`Optional` **isEmbeddingQuery**: `boolean`
#### Defined in
[storage/vectorStore/types.ts:63](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L63)
___
### storesText
**storesText**: `boolean`
#### Defined in
[storage/vectorStore/types.ts:62](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L62)
## Methods
### add
**add**(`embeddingResults`): `Promise`<`string`[]\>
#### Parameters
| Name | Type |
| :------ | :------ |
| `embeddingResults` | [`NodeWithEmbedding`](NodeWithEmbedding.md)[] |
#### Returns
`Promise`<`string`[]\>
#### Defined in
[storage/vectorStore/types.ts:65](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L65)
___
### client
**client**(): `any`
#### Returns
`any`
#### Defined in
[storage/vectorStore/types.ts:64](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L64)
___
### delete
**delete**(`refDocId`, `deleteKwargs?`): `Promise`<`void`\>
#### Parameters
| Name | Type |
| :------ | :------ |
| `refDocId` | `string` |
| `deleteKwargs?` | `any` |
#### Returns
`Promise`<`void`\>
#### Defined in
[storage/vectorStore/types.ts:66](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L66)
___
### persist
**persist**(`persistPath`, `fs?`): `Promise`<`void`\>
#### Parameters
| Name | Type |
| :------ | :------ |
| `persistPath` | `string` |
| `fs?` | [`GenericFileSystem`](GenericFileSystem.md) |
#### Returns
`Promise`<`void`\>
#### Defined in
[storage/vectorStore/types.ts:68](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L68)
___
### query
**query**(`query`, `kwargs?`): `Promise`<[`VectorStoreQueryResult`](VectorStoreQueryResult.md)\>
#### Parameters
| Name | Type |
| :------ | :------ |
| `query` | [`VectorStoreQuery`](VectorStoreQuery.md) |
| `kwargs?` | `any` |
#### Returns
`Promise`<[`VectorStoreQueryResult`](VectorStoreQueryResult.md)\>
#### Defined in
[storage/vectorStore/types.ts:67](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L67)
@@ -0,0 +1,27 @@
---
id: "VectorStoreInfo"
title: "Interface: VectorStoreInfo"
sidebar_label: "VectorStoreInfo"
sidebar_position: 0
custom_edit_url: null
---
## Properties
### contentInfo
**contentInfo**: `string`
#### Defined in
[storage/vectorStore/types.ts:47](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L47)
___
### metadataInfo
**metadataInfo**: [`MetadataInfo`](MetadataInfo.md)[]
#### Defined in
[storage/vectorStore/types.ts:46](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L46)
@@ -0,0 +1,87 @@
---
id: "VectorStoreQuery"
title: "Interface: VectorStoreQuery"
sidebar_label: "VectorStoreQuery"
sidebar_position: 0
custom_edit_url: null
---
## Properties
### alpha
`Optional` **alpha**: `number`
#### Defined in
[storage/vectorStore/types.ts:56](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L56)
___
### docIds
`Optional` **docIds**: `string`[]
#### Defined in
[storage/vectorStore/types.ts:53](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L53)
___
### filters
`Optional` **filters**: [`MetadataFilters`](MetadataFilters.md)
#### Defined in
[storage/vectorStore/types.ts:57](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L57)
___
### mmrThreshold
`Optional` **mmrThreshold**: `number`
#### Defined in
[storage/vectorStore/types.ts:58](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L58)
___
### mode
**mode**: [`VectorStoreQueryMode`](../enums/VectorStoreQueryMode.md)
#### Defined in
[storage/vectorStore/types.ts:55](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L55)
___
### queryEmbedding
`Optional` **queryEmbedding**: `number`[]
#### Defined in
[storage/vectorStore/types.ts:51](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L51)
___
### queryStr
`Optional` **queryStr**: `string`
#### Defined in
[storage/vectorStore/types.ts:54](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L54)
___
### similarityTopK
**similarityTopK**: `number`
#### Defined in
[storage/vectorStore/types.ts:52](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L52)
@@ -0,0 +1,37 @@
---
id: "VectorStoreQueryResult"
title: "Interface: VectorStoreQueryResult"
sidebar_label: "VectorStoreQueryResult"
sidebar_position: 0
custom_edit_url: null
---
## Properties
### ids
**ids**: `string`[]
#### Defined in
[storage/vectorStore/types.ts:8](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L8)
___
### nodes
`Optional` **nodes**: [`BaseNode`](../classes/BaseNode.md)[]
#### Defined in
[storage/vectorStore/types.ts:6](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L6)
___
### similarities
**similarities**: `number`[]
#### Defined in
[storage/vectorStore/types.ts:7](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L7)
@@ -0,0 +1,37 @@
---
id: "VectorStoreQuerySpec"
title: "Interface: VectorStoreQuerySpec"
sidebar_label: "VectorStoreQuerySpec"
sidebar_position: 0
custom_edit_url: null
---
## Properties
### filters
**filters**: [`ExactMatchFilter`](ExactMatchFilter.md)[]
#### Defined in
[storage/vectorStore/types.ts:35](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L35)
___
### query
**query**: `string`
#### Defined in
[storage/vectorStore/types.ts:34](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L34)
___
### topK
`Optional` **topK**: `number`
#### Defined in
[storage/vectorStore/types.ts:36](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L36)
@@ -24,7 +24,7 @@ custom_edit_url: null
#### Defined in
[storage/FileSystem.ts:17](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/storage/FileSystem.ts#L17)
[storage/FileSystem.ts:17](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/FileSystem.ts#L17)
___
@@ -44,4 +44,4 @@ ___
#### Defined in
[storage/FileSystem.ts:18](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/storage/FileSystem.ts#L18)
[storage/FileSystem.ts:18](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/FileSystem.ts#L18)
+134 -64
View File
@@ -8,14 +8,18 @@ custom_edit_url: null
## Enumerations
- [DeuceChatStrategy](enums/DeuceChatStrategy.md)
- [IndexStructType](enums/IndexStructType.md)
- [ListRetrieverMode](enums/ListRetrieverMode.md)
- [MetadataMode](enums/MetadataMode.md)
- [NodeRelationship](enums/NodeRelationship.md)
- [ObjectType](enums/ObjectType.md)
- [SimilarityType](enums/SimilarityType.md)
- [VectorStoreQueryMode](enums/VectorStoreQueryMode.md)
## Classes
- [Anthropic](classes/Anthropic.md)
- [BaseEmbedding](classes/BaseEmbedding.md)
- [BaseIndex](classes/BaseIndex.md)
- [BaseNode](classes/BaseNode.md)
@@ -67,8 +71,11 @@ custom_edit_url: null
- [ChatMessage](interfaces/ChatMessage.md)
- [ChatResponse](interfaces/ChatResponse.md)
- [Event](interfaces/Event.md)
- [ExactMatchFilter](interfaces/ExactMatchFilter.md)
- [GenericFileSystem](interfaces/GenericFileSystem.md)
- [LLM](interfaces/LLM.md)
- [MetadataFilters](interfaces/MetadataFilters.md)
- [MetadataInfo](interfaces/MetadataInfo.md)
- [NodeParser](interfaces/NodeParser.md)
- [NodeWithEmbedding](interfaces/NodeWithEmbedding.md)
- [NodeWithScore](interfaces/NodeWithScore.md)
@@ -85,6 +92,11 @@ custom_edit_url: null
- [ToolMetadata](interfaces/ToolMetadata.md)
- [VectorIndexConstructorProps](interfaces/VectorIndexConstructorProps.md)
- [VectorIndexOptions](interfaces/VectorIndexOptions.md)
- [VectorStore](interfaces/VectorStore.md)
- [VectorStoreInfo](interfaces/VectorStoreInfo.md)
- [VectorStoreQuery](interfaces/VectorStoreQuery.md)
- [VectorStoreQueryResult](interfaces/VectorStoreQueryResult.md)
- [VectorStoreQuerySpec](interfaces/VectorStoreQuerySpec.md)
- [WalkableFileSystem](interfaces/WalkableFileSystem.md)
## Type Aliases
@@ -95,7 +107,7 @@ custom_edit_url: null
#### Defined in
[storage/FileSystem.ts:49](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/storage/FileSystem.ts#L49)
[storage/FileSystem.ts:49](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/FileSystem.ts#L49)
___
@@ -105,7 +117,7 @@ ___
#### Defined in
[llm/LLM.ts:25](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/llm/LLM.ts#L25)
[llm/LLM.ts:39](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L39)
___
@@ -115,7 +127,7 @@ ___
#### Defined in
[callbacks/CallbackManager.ts:11](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/callbacks/CallbackManager.ts#L11)
[callbacks/CallbackManager.ts:10](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/callbacks/CallbackManager.ts#L10)
___
@@ -125,7 +137,17 @@ ___
#### Defined in
[callbacks/CallbackManager.ts:12](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/callbacks/CallbackManager.ts#L12)
[callbacks/CallbackManager.ts:11](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/callbacks/CallbackManager.ts#L11)
___
### MessageType
Ƭ **MessageType**: ``"user"`` \| ``"assistant"`` \| ``"system"`` \| ``"generic"`` \| ``"function"``
#### Defined in
[llm/LLM.ts:20](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L20)
___
@@ -135,7 +157,7 @@ ___
#### Defined in
[Node.ts:32](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Node.ts#L32)
[Node.ts:32](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L32)
___
@@ -154,7 +176,7 @@ ___
#### Defined in
[readers/SimpleDirectoryReader.ts:26](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/readers/SimpleDirectoryReader.ts#L26)
[readers/SimpleDirectoryReader.ts:26](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/readers/SimpleDirectoryReader.ts#L26)
___
@@ -182,7 +204,7 @@ NOTE 2: we default to empty string to make it easy to calculate prompt sizes
#### Defined in
[Prompt.ts:10](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Prompt.ts#L10)
[Prompt.ts:10](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Prompt.ts#L10)
## Variables
@@ -206,7 +228,7 @@ NOTE 2: we default to empty string to make it easy to calculate prompt sizes
#### Defined in
[llm/LLM.ts:152](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/llm/LLM.ts#L152)
[llm/LLM.ts:205](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L205)
___
@@ -220,7 +242,7 @@ We currently support GPT-3.5 and GPT-4 models
| Name | Type |
| :------ | :------ |
| `gpt-3.5-turbo` | { `contextWindow`: `number` = 4097 } |
| `gpt-3.5-turbo` | { `contextWindow`: `number` = 4096 } |
| `gpt-3.5-turbo.contextWindow` | `number` |
| `gpt-3.5-turbo-16k` | { `contextWindow`: `number` = 16384 } |
| `gpt-3.5-turbo-16k.contextWindow` | `number` |
@@ -231,7 +253,7 @@ We currently support GPT-3.5 and GPT-4 models
#### Defined in
[llm/LLM.ts:57](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/llm/LLM.ts#L57)
[llm/LLM.ts:71](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L71)
___
@@ -241,7 +263,7 @@ ___
#### Defined in
[constants.ts:5](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/constants.ts#L5)
[constants.ts:5](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/constants.ts#L5)
___
@@ -251,7 +273,7 @@ ___
#### Defined in
[constants.ts:6](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/constants.ts#L6)
[constants.ts:6](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/constants.ts#L6)
___
@@ -261,7 +283,7 @@ ___
#### Defined in
[constants.ts:4](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/constants.ts#L4)
[constants.ts:4](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/constants.ts#L4)
___
@@ -271,7 +293,7 @@ ___
#### Defined in
[storage/constants.ts:1](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/storage/constants.ts#L1)
[storage/constants.ts:1](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/constants.ts#L1)
___
@@ -281,17 +303,17 @@ ___
#### Defined in
[constants.ts:1](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/constants.ts#L1)
[constants.ts:1](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/constants.ts#L1)
___
### DEFAULT\_DOC\_STORE\_PERSIST\_FILENAME
`Const` **DEFAULT\_DOC\_STORE\_PERSIST\_FILENAME**: ``"docstore.json"``
`Const` **DEFAULT\_DOC\_STORE\_PERSIST\_FILENAME**: ``"doc_store.json"``
#### Defined in
[storage/constants.ts:4](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/storage/constants.ts#L4)
[storage/constants.ts:4](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/constants.ts#L4)
___
@@ -301,7 +323,7 @@ ___
#### Defined in
[constants.ts:10](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/constants.ts#L10)
[constants.ts:10](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/constants.ts#L10)
___
@@ -311,7 +333,7 @@ ___
#### Defined in
[storage/FileSystem.ts:62](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/storage/FileSystem.ts#L62)
[storage/FileSystem.ts:62](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/FileSystem.ts#L62)
___
@@ -321,7 +343,7 @@ ___
#### Defined in
[storage/constants.ts:6](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/storage/constants.ts#L6)
[storage/constants.ts:6](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/constants.ts#L6)
___
@@ -331,7 +353,7 @@ ___
#### Defined in
[storage/constants.ts:3](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/storage/constants.ts#L3)
[storage/constants.ts:3](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/constants.ts#L3)
___
@@ -341,7 +363,7 @@ ___
#### Defined in
[storage/constants.ts:7](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/storage/constants.ts#L7)
[storage/constants.ts:7](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/constants.ts#L7)
___
@@ -351,7 +373,7 @@ ___
#### Defined in
[constants.ts:2](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/constants.ts#L2)
[constants.ts:2](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/constants.ts#L2)
___
@@ -361,7 +383,7 @@ ___
#### Defined in
[constants.ts:11](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/constants.ts#L11)
[constants.ts:11](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/constants.ts#L11)
___
@@ -371,7 +393,7 @@ ___
#### Defined in
[storage/constants.ts:2](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/storage/constants.ts#L2)
[storage/constants.ts:2](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/constants.ts#L2)
___
@@ -381,7 +403,7 @@ ___
#### Defined in
[constants.ts:7](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/constants.ts#L7)
[constants.ts:7](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/constants.ts#L7)
___
@@ -391,7 +413,7 @@ ___
#### Defined in
[storage/constants.ts:5](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/storage/constants.ts#L5)
[storage/constants.ts:5](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/constants.ts#L5)
___
@@ -410,7 +432,7 @@ ___
#### Defined in
[llm/LLM.ts:44](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/llm/LLM.ts#L44)
[llm/LLM.ts:58](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L58)
___
@@ -422,14 +444,14 @@ ___
| Name | Type |
| :------ | :------ |
| `gpt-3.5-turbo` | { `contextWindow`: `number` = 4097 } |
| `gpt-3.5-turbo` | { `contextWindow`: `number` = 4096 } |
| `gpt-3.5-turbo.contextWindow` | `number` |
| `gpt-3.5-turbo-16k` | { `contextWindow`: `number` = 16384 } |
| `gpt-3.5-turbo-16k.contextWindow` | `number` |
#### Defined in
[llm/LLM.ts:49](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/llm/LLM.ts#L49)
[llm/LLM.ts:63](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L63)
___
@@ -439,7 +461,7 @@ ___
#### Defined in
[GlobalsHelper.ts:50](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/GlobalsHelper.ts#L50)
[GlobalsHelper.ts:50](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/GlobalsHelper.ts#L50)
## Functions
@@ -459,7 +481,7 @@ ___
#### Defined in
[Prompt.ts:198](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Prompt.ts#L198)
[Prompt.ts:198](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Prompt.ts#L198)
___
@@ -483,7 +505,7 @@ NOTE 2: we default to empty string to make it easy to calculate prompt sizes
#### Defined in
[Prompt.ts:10](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Prompt.ts#L10)
[Prompt.ts:10](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Prompt.ts#L10)
___
@@ -507,7 +529,7 @@ NOTE 2: we default to empty string to make it easy to calculate prompt sizes
#### Defined in
[Prompt.ts:10](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Prompt.ts#L10)
[Prompt.ts:10](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Prompt.ts#L10)
___
@@ -531,7 +553,7 @@ NOTE 2: we default to empty string to make it easy to calculate prompt sizes
#### Defined in
[Prompt.ts:10](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Prompt.ts#L10)
[Prompt.ts:10](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Prompt.ts#L10)
___
@@ -555,7 +577,7 @@ NOTE 2: we default to empty string to make it easy to calculate prompt sizes
#### Defined in
[Prompt.ts:10](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Prompt.ts#L10)
[Prompt.ts:10](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Prompt.ts#L10)
___
@@ -579,7 +601,7 @@ NOTE 2: we default to empty string to make it easy to calculate prompt sizes
#### Defined in
[Prompt.ts:10](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Prompt.ts#L10)
[Prompt.ts:10](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Prompt.ts#L10)
___
@@ -603,7 +625,7 @@ NOTE 2: we default to empty string to make it easy to calculate prompt sizes
#### Defined in
[Prompt.ts:10](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Prompt.ts#L10)
[Prompt.ts:10](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Prompt.ts#L10)
___
@@ -627,7 +649,7 @@ NOTE 2: we default to empty string to make it easy to calculate prompt sizes
#### Defined in
[Prompt.ts:10](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Prompt.ts#L10)
[Prompt.ts:10](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Prompt.ts#L10)
___
@@ -653,7 +675,7 @@ A promise that resolves to true if the file exists, false otherwise.
#### Defined in
[storage/FileSystem.ts:74](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/storage/FileSystem.ts#L74)
[storage/FileSystem.ts:74](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/FileSystem.ts#L74)
___
@@ -667,7 +689,7 @@ ___
#### Defined in
[storage/FileSystem.ts:51](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/storage/FileSystem.ts#L51)
[storage/FileSystem.ts:51](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/FileSystem.ts#L51)
___
@@ -675,22 +697,26 @@ ___
**getNodesFromDocument**(`document`, `textSplitter`, `includeMetadata?`, `includePrevNextRel?`): [`TextNode`](classes/TextNode.md)[]
Generates an array of nodes from a document.
#### Parameters
| Name | Type | Default value |
| :------ | :------ | :------ |
| `document` | [`Document`](classes/Document.md) | `undefined` |
| `textSplitter` | [`SentenceSplitter`](classes/SentenceSplitter.md) | `undefined` |
| `includeMetadata` | `boolean` | `true` |
| `includePrevNextRel` | `boolean` | `true` |
| Name | Type | Default value | Description |
| :------ | :------ | :------ | :------ |
| `document` | [`Document`](classes/Document.md) | `undefined` | The document to generate nodes from. |
| `textSplitter` | [`SentenceSplitter`](classes/SentenceSplitter.md) | `undefined` | The text splitter to use. |
| `includeMetadata` | `boolean` | `true` | Whether to include metadata in the nodes. |
| `includePrevNextRel` | `boolean` | `true` | Whether to include previous and next relationships in the nodes. |
#### Returns
[`TextNode`](classes/TextNode.md)[]
An array of nodes.
#### Defined in
[NodeParser.ts:15](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/NodeParser.ts#L15)
[NodeParser.ts:29](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/NodeParser.ts#L29)
___
@@ -711,7 +737,7 @@ ___
#### Defined in
[ResponseSynthesizer.ts:262](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ResponseSynthesizer.ts#L262)
[ResponseSynthesizer.ts:262](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L262)
___
@@ -719,20 +745,24 @@ ___
**getTextSplitsFromDocument**(`document`, `textSplitter`): `string`[]
Splits the text of a document into smaller parts.
#### Parameters
| Name | Type |
| :------ | :------ |
| `document` | [`Document`](classes/Document.md) |
| `textSplitter` | [`SentenceSplitter`](classes/SentenceSplitter.md) |
| Name | Type | Description |
| :------ | :------ | :------ |
| `document` | [`Document`](classes/Document.md) | The document to split. |
| `textSplitter` | [`SentenceSplitter`](classes/SentenceSplitter.md) | The text splitter to use. |
#### Returns
`string`[]
An array of text splits.
#### Defined in
[NodeParser.ts:5](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/NodeParser.ts#L5)
[NodeParser.ts:11](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/NodeParser.ts#L11)
___
@@ -758,7 +788,7 @@ Get the top K embeddings from a list of embeddings ordered by similarity to the
#### Defined in
[Embedding.ts:77](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Embedding.ts#L77)
[Embedding.ts:84](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L84)
___
@@ -774,7 +804,7 @@ ___
| `embeddings` | `number`[][] | `undefined` |
| `similarityTopK?` | `number` | `undefined` |
| `embeddingsIds?` | `any`[] | `undefined` |
| `queryMode` | `VectorStoreQueryMode` | `VectorStoreQueryMode.SVM` |
| `queryMode` | [`VectorStoreQueryMode`](enums/VectorStoreQueryMode.md) | `VectorStoreQueryMode.SVM` |
#### Returns
@@ -782,7 +812,7 @@ ___
#### Defined in
[Embedding.ts:119](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Embedding.ts#L119)
[Embedding.ts:126](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L126)
___
@@ -808,7 +838,47 @@ ___
#### Defined in
[Embedding.ts:131](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Embedding.ts#L131)
[Embedding.ts:138](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L138)
___
### jsonToIndexStruct
**jsonToIndexStruct**(`json`): [`IndexStruct`](classes/IndexStruct.md)
#### Parameters
| Name | Type |
| :------ | :------ |
| `json` | `any` |
#### Returns
[`IndexStruct`](classes/IndexStruct.md)
#### Defined in
[indices/BaseIndex.ts:70](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L70)
___
### jsonToNode
**jsonToNode**(`json`): [`TextNode`](classes/TextNode.md)
#### Parameters
| Name | Type |
| :------ | :------ |
| `json` | `any` |
#### Returns
[`TextNode`](classes/TextNode.md)
#### Defined in
[Node.ts:243](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L243)
___
@@ -828,7 +898,7 @@ ___
#### Defined in
[Prompt.ts:300](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Prompt.ts#L300)
[Prompt.ts:300](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Prompt.ts#L300)
___
@@ -848,7 +918,7 @@ ___
#### Defined in
[ServiceContext.ts:30](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ServiceContext.ts#L30)
[ServiceContext.ts:30](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ServiceContext.ts#L30)
___
@@ -877,7 +947,7 @@ ___
#### Defined in
[ServiceContext.ts:48](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/ServiceContext.ts#L48)
[ServiceContext.ts:48](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ServiceContext.ts#L48)
___
@@ -903,7 +973,7 @@ similartiy score with higher numbers meaning the two embeddings are more similar
#### Defined in
[Embedding.ts:22](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/Embedding.ts#L22)
[Embedding.ts:29](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L29)
___
@@ -923,7 +993,7 @@ ___
#### Defined in
[storage/StorageContext.ts:28](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/storage/StorageContext.ts#L28)
[storage/StorageContext.ts:28](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/StorageContext.ts#L28)
___
@@ -946,4 +1016,4 @@ Recursively traverses a directory and yields all the paths to the files in it.
#### Defined in
[storage/FileSystem.ts:91](https://github.com/run-llama/LlamaIndexTS/blob/68bdaaa/packages/core/src/storage/FileSystem.ts#L91)
[storage/FileSystem.ts:91](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/FileSystem.ts#L91)
+1 -1
View File
@@ -4,7 +4,7 @@ sidebar_position: 2
# Starter Tutorial
Once you have installed LlamaIndex.TS using NPM and set up your OpenAI key, you're ready to start your first app:
Once you have [installed LlamaIndex.TS using NPM](installation.md) and set up your OpenAI key, you're ready to start your first app:
In a new folder:
+2 -1
View File
@@ -86,7 +86,7 @@ const config = {
items: [
{
label: "API",
to: "/docs/api",
to: "/api",
},
],
},
@@ -138,6 +138,7 @@ const config = {
{
entryPoints: ["../../packages/core/src/index.ts"],
tsconfig: "../../packages/core/tsconfig.json",
gitRevision: "main",
sidebar: {
position: 6,
},
-12839
View File
File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More