Class: KeywordTableLLMRetriever
Hierarchy
-
BaseKeywordTableRetriever
↳
KeywordTableLLMRetriever
Constructors
constructor
• new KeywordTableLLMRetriever(«destructured»
): KeywordTableLLMRetriever
Parameters
Name | Type | Default value |
---|---|---|
«destructured» | Object | undefined |
› index | KeywordTableIndex | undefined |
› keywordExtractTemplate? | (__namedParameters : { context : undefined | string = ""; maxKeywords : undefined | number = 10 }) => string | undefined |
› maxKeywordsPerQuery | number | 10 |
› numChunksPerQuery | number | 10 |
› queryKeywordExtractTemplate? | (__namedParameters : { maxKeywords : undefined | number = 10; question : undefined | string = "" }) => string | undefined |
Returns
Inherited from
BaseKeywordTableRetriever.constructor
Defined in
packages/core/src/indices/keyword/index.ts:61
Properties
docstore
• Protected
docstore: BaseDocumentStore
Inherited from
BaseKeywordTableRetriever.docstore
Defined in
packages/core/src/indices/keyword/index.ts:53
index
• Protected
index: KeywordTableIndex
Inherited from
BaseKeywordTableRetriever.index
Defined in
packages/core/src/indices/keyword/index.ts:51
indexStruct
• Protected
indexStruct: KeywordTable
Inherited from
BaseKeywordTableRetriever.indexStruct
Defined in
packages/core/src/indices/keyword/index.ts:52
keywordExtractTemplate
• Protected
keywordExtractTemplate: (__namedParameters
: { context
: undefined
| string
= ""; maxKeywords
: undefined
| number
= 10 }) => string
Type declaration
▸ («destructured»
): string
Parameters
Name | Type | Default value |
---|---|---|
«destructured» | Object | undefined |
› context | undefined | string | "" |
› maxKeywords | undefined | number | 10 |
Returns
string
Inherited from
BaseKeywordTableRetriever.keywordExtractTemplate
Defined in
packages/core/src/indices/keyword/index.ts:58
llm
• Protected
llm: LLM
<Record
<string
, unknown
>>
Inherited from
BaseKeywordTableRetriever.llm
Defined in
packages/core/src/indices/keyword/index.ts:54
maxKeywordsPerQuery
• Protected
maxKeywordsPerQuery: number
Inherited from
BaseKeywordTableRetriever.maxKeywordsPerQuery
Defined in
packages/core/src/indices/keyword/index.ts:56
numChunksPerQuery
• Protected
numChunksPerQuery: number
Inherited from
BaseKeywordTableRetriever.numChunksPerQuery
Defined in
packages/core/src/indices/keyword/index.ts:57
queryKeywordExtractTemplate
• Protected
queryKeywordExtractTemplate: (__namedParameters
: { maxKeywords
: undefined
| number
= 10; question
: undefined
| string
= "" }) => string
Type declaration
▸ («destructured»
): string
Parameters
Name | Type | Default value |
---|---|---|
«destructured» | Object | undefined |
› maxKeywords | undefined | number | 10 |
› question | undefined | string | "" |
Returns
string
Inherited from
BaseKeywordTableRetriever.queryKeywordExtractTemplate
Defined in
packages/core/src/indices/keyword/index.ts:59
Methods
getKeywords
▸ getKeywords(query
): Promise
<string
[]>
Parameters
Name | Type |
---|---|
query | string |
Returns
Promise
<string
[]>
Overrides
BaseKeywordTableRetriever.getKeywords
Defined in
packages/core/src/indices/keyword/index.ts:116