跳转到内容

VectorStoreIndex

定义于:.build/typescript/packages/llamaindex/src/indices/vectorStore/index.ts:75

VectorStoreIndex,一种仅根据节点向量嵌入进行存储的索引。

storageContext: StorageContext

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

BaseIndex.storageContext


docStore: BaseDocumentStore

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

BaseIndex.docStore


indexStruct: IndexDict

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

BaseIndex.indexStruct


索引存储: BaseIndexStore

定义于:.build/typescript/packages/llamaindex/src/indices/vectorStore/index.ts:76

BaseIndex.indexStore


optional 嵌入模型: BaseEmbedding

定义于:.build/typescript/packages/llamaindex/src/indices/vectorStore/index.ts:77


向量存储: VectorStoreByType

定义于:.build/typescript/packages/llamaindex/src/indices/vectorStore/index.ts:78

asQueryTool(params): QueryEngineTool

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

通过调用 asQueryEngine 返回一个查询工具。 可以传递 options 或 retriever 其中之一,但不能同时传递两者。 如果提供了 options,它们将被传递用于生成检索器。

QueryToolParams

QueryEngineTool

BaseIndex.asQueryTool


insert(document): Promise<void>

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

将文档插入索引中。

Document

Promise<void>

BaseIndex.insert


retriever(options?): BaseRetriever

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

asRetriever 的别名

any

BaseRetriever

BaseIndex.retriever


queryEngine(options?): BaseQueryEngine

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

asQueryEngine 的别名

您可以提供自定义的检索器和响应合成器

BaseRetriever

BaseSynthesizer

BaseQueryEngine

BaseIndex.queryEngine


queryTool(params): QueryEngineTool

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

asQueryTool 的别名 可以传入 options 或 retriever 中的任意一个,但不能同时传入。 如果提供了 options,它们将被传递给生成检索器。

QueryToolParams

QueryEngineTool

BaseIndex.queryTool


static init(options): Promise<VectorStoreIndex>

定义于:.build/typescript/packages/llamaindex/src/indices/vectorStore/index.ts:92

异步初始化函数创建一个新的向量存储索引。

VectorIndexOptions

Promise<VectorStoreIndex>


getNodeEmbeddingResults(nodes, options?): Promise<BaseNode<Metadata>[]>

定义于:.build/typescript/packages/llamaindex/src/indices/vectorStore/index.ts:173

计算给定节点的嵌入向量。

BaseNode<Metadata>[]

一个BaseNode对象数组,表示需要计算嵌入向量的节点。

一个包含额外参数的可选对象。

boolean

一个布尔值,指示是否将进度记录到控制台(对调试很有用)。

(progress, total) => void

Promise<BaseNode<Metadata>[]>


buildIndexFromNodes(nodes, options?): Promise<void>

定义于:.build/typescript/packages/llamaindex/src/indices/vectorStore/index.ts:202

获取节点的嵌入向量并将其放入索引中。

BaseNode<Metadata>[]

boolean

(progress, total) => void

Promise<void>


static fromDocuments(documents, args): Promise<VectorStoreIndex>

定义于:.build/typescript/packages/llamaindex/src/indices/vectorStore/index.ts:220

高级API:分割文档、获取嵌入向量并构建索引。

Document<Metadata>[]

VectorIndexOptions & object = {}

Promise<VectorStoreIndex>


static fromVectorStores(vectorStores): Promise<VectorStoreIndex>

定义于:.build/typescript/packages/llamaindex/src/indices/vectorStore/index.ts:265

VectorStoreByType

Promise<VectorStoreIndex>


static fromVectorStore(vectorStore): Promise<VectorStoreIndex>

定义于:.build/typescript/packages/llamaindex/src/indices/vectorStore/index.ts:284

BaseVectorStore

Promise<VectorStoreIndex>


asRetriever(options?): VectorIndexRetriever

定义于:.build/typescript/packages/llamaindex/src/indices/vectorStore/index.ts:288

从索引创建一个新的检索器。

Omit<object & object, "index"> | Omit<object & object, "index">

VectorIndexRetriever

BaseIndex.asRetriever


asQueryEngine(options?): RetrieverQueryEngine

定义于:.build/typescript/packages/llamaindex/src/indices/vectorStore/index.ts:298

创建一个检索查询引擎。 仅当未提供现有检索器时,才使用similarityTopK参数。

BaseRetriever

BaseSynthesizer

MetadataFilters

unknown

BaseNodePostprocessor[]

number

RetrieverQueryEngine

BaseIndex.asQueryEngine


asChatEngine(options): ContextChatEngine

定义于:.build/typescript/packages/llamaindex/src/indices/vectorStore/index.ts:331

将索引转换为聊天引擎。

VectorIndexChatEngineOptions = {}

创建聊天引擎的选项

ContextChatEngine

一个使用索引检索器为每个查询获取上下文的ContextChatEngine

BaseIndex.asChatEngine


protected insertNodesToStore(newIds, nodes, vectorStore): Promise<void>

定义于:.build/typescript/packages/llamaindex/src/indices/vectorStore/index.ts:351

string[]

BaseNode<Metadata>[]

BaseVectorStore

Promise<void>


insertNodes(nodes, options?): Promise<void>

定义于:.build/typescript/packages/llamaindex/src/indices/vectorStore/index.ts:375

BaseNode<Metadata>[]

boolean

(progress, total) => void

Promise<void>

BaseIndex.insertNodes


deleteRefDoc(refDocId, deleteFromDocStore): Promise<void>

定义于:.build/typescript/packages/llamaindex/src/indices/vectorStore/index.ts:396

string

boolean = true

Promise<void>

BaseIndex.deleteRefDoc


protected deleteRefDocFromStore(vectorStore, refDocId): Promise<void>

定义于:.build/typescript/packages/llamaindex/src/indices/vectorStore/index.ts:408

BaseVectorStore

string

Promise<void>