SemanticRetrieverComponents class

Components used to initialize the SemanticRetriever.

Signature:

export declare class SemanticRetrieverComponents 

Methods

Method Modifiers Description
addProvider(provider) Adds an embedding provider to the SemanticRetriever.
providers() Returns the registered embedding providers for the SemanticRetriever.
setVectorStore(vectorStore) Sets the vector store for the SemanticRetriever.
vectorStore() Returns the vector store for the SemanticRetriever.
setTextChunker(textChunker) Sets the text chunker for the SemanticRetriever.
textChunker() Returns the text chunker for the SemanticRetriever.

SemanticRetrieverComponents.addProvider()

Adds an embedding provider to the SemanticRetriever.

Signature:

addProvider(provider: EmbeddingProvider): this;

Parameters

Parameter Type Description
provider EmbeddingProvider The embedding provider to add.

Returns:

this

SemanticRetrieverComponents.providers()

Returns the registered embedding providers for the SemanticRetriever.

Signature:

providers(): readonly EmbeddingProvider[];

Returns:

readonly EmbeddingProvider[]

SemanticRetrieverComponents.setVectorStore()

Sets the vector store for the SemanticRetriever.

Signature:

setVectorStore(vectorStore: VectorStore): this;

Parameters

Parameter Type Description
vectorStore VectorStore The vector store to set.

Returns:

this

SemanticRetrieverComponents.vectorStore()

Returns the vector store for the SemanticRetriever.

Signature:

vectorStore(): VectorStore | undefined;

Returns:

VectorStore | undefined

SemanticRetrieverComponents.setTextChunker()

Sets the text chunker for the SemanticRetriever.

Signature:

setTextChunker(textChunker: TextChunker): this;

Parameters

Parameter Type Description
textChunker TextChunker The text chunker to set.

Returns:

this

SemanticRetrieverComponents.textChunker()

Returns the text chunker for the SemanticRetriever.

Signature:

textChunker(): TextChunker | undefined;

Returns:

TextChunker | undefined