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
): BaseIndex
<T
>
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
init | BaseIndexInit <T > |
Returns
BaseIndex
<T
>
Defined in
packages/core/src/indices/BaseIndex.ts:67
Properties
docStore
• docStore: BaseDocumentStore
Defined in
packages/core/src/indices/BaseIndex.ts:62
indexStore
• Optional
indexStore: BaseIndexStore
Defined in
packages/core/src/indices/BaseIndex.ts:64
indexStruct
• indexStruct: T
Defined in
packages/core/src/indices/BaseIndex.ts:65
serviceContext
• Optional
serviceContext: ServiceContext
Defined in
packages/core/src/indices/BaseIndex.ts:60
storageContext
• storageContext: StorageContext
Defined in
packages/core/src/indices/BaseIndex.ts:61
vectorStore
• Optional
vectorStore: VectorStore
Defined in
packages/core/src/indices/BaseIndex.ts:63
Methods
asQueryEngine
▸ 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? | BaseSynthesizer | - |
options.retriever? | BaseRetriever <unknown > | - |
Returns
Defined in
packages/core/src/indices/BaseIndex.ts:87
asRetriever
▸ asRetriever(options?
): BaseRetriever
<unknown
>
Create a new retriever from the index.
Parameters
Name | Type |
---|---|
options? | any |
Returns
BaseRetriever
<unknown
>