メインコンテンツまでスキップ

Class: KeywordTableRAKERetriever

Hierarchy

  • BaseKeywordTableRetriever

    KeywordTableRAKERetriever

Constructors

constructor

new KeywordTableRAKERetriever(«destructured»): KeywordTableRAKERetriever

Parameters

NameTypeDefault value
«destructured»Objectundefined
› indexKeywordTableIndexundefined
› keywordExtractTemplate?(__namedParameters: { context: undefined | string = ""; maxKeywords: undefined | number = 10 }) => stringundefined
› maxKeywordsPerQuerynumber10
› numChunksPerQuerynumber10
› queryKeywordExtractTemplate?(__namedParameters: { maxKeywords: undefined | number = 10; question: undefined | string = "" }) => stringundefined

Returns

KeywordTableRAKERetriever

Inherited from

BaseKeywordTableRetriever.constructor

Defined in

packages/core/src/indices/keyword/index.ts:54

Properties

docstore

Protected docstore: BaseDocumentStore

Inherited from

BaseKeywordTableRetriever.docstore

Defined in

packages/core/src/indices/keyword/index.ts:46


index

Protected index: KeywordTableIndex

Inherited from

BaseKeywordTableRetriever.index

Defined in

packages/core/src/indices/keyword/index.ts:44


indexStruct

Protected indexStruct: KeywordTable

Inherited from

BaseKeywordTableRetriever.indexStruct

Defined in

packages/core/src/indices/keyword/index.ts:45


keywordExtractTemplate

Protected keywordExtractTemplate: (__namedParameters: { context: undefined | string = ""; maxKeywords: undefined | number = 10 }) => string

Type declaration

▸ («destructured»): string

Parameters
NameTypeDefault value
«destructured»Objectundefined
› contextundefined | string""
› maxKeywordsundefined | number10
Returns

string

Inherited from

BaseKeywordTableRetriever.keywordExtractTemplate

Defined in

packages/core/src/indices/keyword/index.ts:51


maxKeywordsPerQuery

Protected maxKeywordsPerQuery: number

Inherited from

BaseKeywordTableRetriever.maxKeywordsPerQuery

Defined in

packages/core/src/indices/keyword/index.ts:49


numChunksPerQuery

Protected numChunksPerQuery: number

Inherited from

BaseKeywordTableRetriever.numChunksPerQuery

Defined in

packages/core/src/indices/keyword/index.ts:50


queryKeywordExtractTemplate

Protected queryKeywordExtractTemplate: (__namedParameters: { maxKeywords: undefined | number = 10; question: undefined | string = "" }) => string

Type declaration

▸ («destructured»): string

Parameters
NameTypeDefault value
«destructured»Objectundefined
› maxKeywordsundefined | number10
› questionundefined | string""
Returns

string

Inherited from

BaseKeywordTableRetriever.queryKeywordExtractTemplate

Defined in

packages/core/src/indices/keyword/index.ts:52


serviceContext

Protected serviceContext: ServiceContext

Inherited from

BaseKeywordTableRetriever.serviceContext

Defined in

packages/core/src/indices/keyword/index.ts:47

Methods

getKeywords

getKeywords(query): Promise<string[]>

Parameters

NameType
querystring

Returns

Promise<string[]>

Overrides

BaseKeywordTableRetriever.getKeywords

Defined in

packages/core/src/indices/keyword/index.ts:134


getServiceContext

getServiceContext(): ServiceContext

Returns

ServiceContext

Inherited from

BaseKeywordTableRetriever.getServiceContext

Defined in

packages/core/src/indices/keyword/index.ts:104


retrieve

retrieve(«destructured»): Promise<NodeWithScore<Metadata>[]>

Parameters

NameType
«destructured»RetrieveParams

Returns

Promise<NodeWithScore<Metadata>[]>

Inherited from

BaseKeywordTableRetriever.retrieve

Defined in

packages/core/src/indices/keyword/index.ts:82