BaseIndex
定义于:.build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:51
索引是我们存储节点和嵌入向量的数据结构,以便它们能够被检索用于我们的查询。
T
新建基础索引<
T>(init):BaseIndex<T>
定义于:.build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:57
BaseIndex<T>
storageContext
Section titled “storageContext”storageContext:
StorageContext
Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:52
docStore
Section titled “docStore”docStore:
BaseDocumentStore
Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:53
optionalindexStore:BaseIndexStore
Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:54
indexStruct
Section titled “indexStruct”indexStruct:
T
Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:55
asRetriever()
Section titled “asRetriever()”
abstractasRetriever(options?):BaseRetriever
定义于:.build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:69
从索引创建一个新的检索器。
any
BaseRetriever
asQueryEngine()
Section titled “asQueryEngine()”
abstractasQueryEngine(options?):BaseQueryEngine
定义于:.build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:76
从索引创建新的查询引擎。如果未提供检索器和响应合成器,它也会创建它们。
您可以提供自定义的检索器和响应合成器
BaseRetriever
BaseSynthesizer
BaseQueryEngine
asChatEngine()
Section titled “asChatEngine()”
abstractasChatEngine(options?):BaseChatEngine
定义于:.build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:85
从索引创建一个新的聊天引擎。
Omit<ContextChatEngineOptions, "retriever">
BaseChatEngine
asQueryTool()
Section titled “asQueryTool()”asQueryTool(
params):QueryEngineTool
Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:94
通过调用 asQueryEngine 返回一个查询工具。 可以传递 options 或 retriever 其中之一,但不能同时传递两者。 如果提供了 options,它们将被传递用于生成检索器。
insert()
Section titled “insert()”insert(
document):Promise<void>
Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:110
将文档插入索引中。
Document
Promise<void>
insertNodes()
Section titled “insertNodes()”
abstractinsertNodes(nodes):Promise<void>
定义于:.build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:116
BaseNode<Metadata>[]
Promise<void>
deleteRefDoc()
Section titled “deleteRefDoc()”
abstractdeleteRefDoc(refDocId,deleteFromDocStore?):Promise<void>
定义于:.build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:117
refDocId
Section titled “refDocId”string
从文档存储中删除?
Section titled “deleteFromDocStore?”boolean
Promise<void>
retriever()
Section titled “retriever()”retriever(
options?):BaseRetriever
Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:127
asRetriever 的别名
any
BaseRetriever
queryEngine()
Section titled “queryEngine()”queryEngine(
options?):BaseQueryEngine
Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:135
asQueryEngine 的别名
您可以提供自定义的检索器和响应合成器
BaseRetriever
BaseSynthesizer
BaseQueryEngine
queryTool()
Section titled “queryTool()”queryTool(
params):QueryEngineTool
Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:147
asQueryTool 的别名 可以传入 options 或 retriever 中的任意一个,但不能同时传入。 如果提供了 options,它们将被传递给生成检索器。