Class: BaseIndex<T>
Indexes are the data structure that we store our nodes and embeddings in so they can be retrieved for our queries.
Type parameters
Name |
---|
T |
Hierarchy
BaseIndex
Constructors
constructor
• new BaseIndex<T
>(init
)
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
init | BaseIndexInit <T > |
Defined in
indices/BaseIndex.ts:122
Properties
docStore
• docStore: BaseDocumentStore
Defined in
indices/BaseIndex.ts:117
indexStore
• Optional
indexStore: BaseIndexStore
Defined in
indices/BaseIndex.ts:119
indexStruct
• indexStruct: T
Defined in
indices/BaseIndex.ts:120
serviceContext
• serviceContext: ServiceContext
Defined in
indices/BaseIndex.ts:115
storageContext
• storageContext: StorageContext
Defined in
indices/BaseIndex.ts:116
vectorStore
• Optional
vectorStore: VectorStore
Defined in
indices/BaseIndex.ts:118
Methods
asQueryEngine
▸ Abstract
asQueryEngine(options?
): BaseQueryEngine
Create a new query engine from the index. It will also create a retriever and response synthezier if they are not provided.
Parameters
Name | Type | Description |
---|---|---|
options? | Object | you can supply your own custom Retriever and ResponseSynthesizer |
options.responseSynthesizer? | ResponseSynthesizer | - |
options.retriever? | BaseRetriever | - |
Returns
Defined in
indices/BaseIndex.ts:142
asRetriever
▸ Abstract
asRetriever(options?
): BaseRetriever
Create a new retriever from the index.
Parameters
Name | Type |
---|---|
options? | any |
Returns
Defined in
indices/BaseIndex.ts:135