Przejdź do głównej zawartości

Class: KeywordTableSimpleRetriever

Extends

  • BaseKeywordTableRetriever

Constructors

new KeywordTableSimpleRetriever()

new KeywordTableSimpleRetriever(__namedParameters): KeywordTableSimpleRetriever

Parameters

__namedParameters

__namedParameters.index: KeywordTableIndex

__namedParameters.keywordExtractTemplate?

__namedParameters.maxKeywordsPerQuery: number= 10

__namedParameters.numChunksPerQuery: number= 10

__namedParameters.queryKeywordExtractTemplate?

Returns

KeywordTableSimpleRetriever

Inherited from

BaseKeywordTableRetriever.constructor

Source

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

Properties

docstore

protected docstore: BaseDocumentStore

Inherited from

BaseKeywordTableRetriever.docstore

Source

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


index

protected index: KeywordTableIndex

Inherited from

BaseKeywordTableRetriever.index

Source

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


indexStruct

protected indexStruct: KeywordTable

Inherited from

BaseKeywordTableRetriever.indexStruct

Source

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


keywordExtractTemplate()

protected keywordExtractTemplate: (__namedParameters) => string

Parameters

__namedParameters

__namedParameters.context: undefined | string= ""

__namedParameters.maxKeywords: undefined | number= 10

Returns

string

Inherited from

BaseKeywordTableRetriever.keywordExtractTemplate

Source

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


llm

protected llm: LLM<object, object>

Inherited from

BaseKeywordTableRetriever.llm

Source

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


maxKeywordsPerQuery

protected maxKeywordsPerQuery: number

Inherited from

BaseKeywordTableRetriever.maxKeywordsPerQuery

Source

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


numChunksPerQuery

protected numChunksPerQuery: number

Inherited from

BaseKeywordTableRetriever.numChunksPerQuery

Source

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


queryKeywordExtractTemplate()

protected queryKeywordExtractTemplate: (__namedParameters) => string

Parameters

__namedParameters

__namedParameters.maxKeywords: undefined | number= 10

__namedParameters.question: undefined | string= ""

Returns

string

Inherited from

BaseKeywordTableRetriever.queryKeywordExtractTemplate

Source

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

Methods

getKeywords()

getKeywords(query): Promise<string[]>

Parameters

query: string

Returns

Promise<string[]>

Overrides

BaseKeywordTableRetriever.getKeywords

Source

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


retrieve()

retrieve(__namedParameters): Promise <NodeWithScore <Metadata>[]>

Parameters

__namedParameters: RetrieveParams

Returns

Promise <NodeWithScore <Metadata>[]>

Inherited from

BaseKeywordTableRetriever.retrieve

Source

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