Skip to content

BaseIndex

Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:51

Indexes are the data structure that we store our nodes and embeddings in so they can be retrieved for our queries.

T

new BaseIndex<T>(init): BaseIndex<T>

Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:57

BaseIndexInit<T>

BaseIndex<T>

storageContext: StorageContext

Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:52


docStore: BaseDocumentStore

Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:53


optional indexStore: BaseIndexStore

Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:54


indexStruct: T

Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:55

abstract asRetriever(options?): BaseRetriever

Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:69

Create a new retriever from the index.

any

BaseRetriever


abstract asQueryEngine(options?): BaseQueryEngine

Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:76

Create a new query engine from the index. It will also create a retriever and response synthezier if they are not provided.

you can supply your own custom Retriever and ResponseSynthesizer

BaseRetriever

BaseSynthesizer

BaseQueryEngine


abstract asChatEngine(options?): BaseChatEngine

Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:85

Create a new chat engine from the index.

Omit<ContextChatEngineOptions, "retriever">

BaseChatEngine


asQueryTool(params): QueryEngineTool

Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:94

Returns a query tool by calling asQueryEngine. Either options or retriever can be passed, but not both. If options are provided, they are passed to generate a retriever.

QueryToolParams

QueryEngineTool


insert(document): Promise<void>

Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:110

Insert a document into the index.

Document

Promise<void>


abstract insertNodes(nodes): Promise<void>

Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:116

BaseNode<Metadata>[]

Promise<void>


abstract deleteRefDoc(refDocId, deleteFromDocStore?): Promise<void>

Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:117

string

boolean

Promise<void>


retriever(options?): BaseRetriever

Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:127

Alias for asRetriever

any

BaseRetriever


queryEngine(options?): BaseQueryEngine

Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:135

Alias for asQueryEngine

you can supply your own custom Retriever and ResponseSynthesizer

BaseRetriever

BaseSynthesizer

BaseQueryEngine


queryTool(params): QueryEngineTool

Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:147

Alias for asQueryTool Either options or retriever can be passed, but not both. If options are provided, they are passed to generate a retriever.

QueryToolParams

QueryEngineTool