Interface ContentRetrieverConfig
- All Superinterfaces:
Prototype.Api
- All Known Implementing Classes:
ContentRetrieverConfig.BuilderBase.ContentRetrieverConfigImpl
Configuration for LangChain4j
ContentRetriever components.
Instances of this configuration are created from the config and define how a content retriever is selected and initialized (for example, embedding-store backed retrievers).
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classFluent API builder forContentRetrieverConfig.static classContentRetrieverConfig.BuilderBase<BUILDER extends ContentRetrieverConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ContentRetrieverConfig> Fluent API builder base forContentRetrieverConfig. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Create a new fluent API builder to customize configuration.builder(ContentRetrieverConfig instance) Create a new fluent API builder from an existing instance.static ContentRetrieverConfigDeprecated.static ContentRetrieverConfigCreate a new instance from configuration.Display name for this content retriever configuration.Explicit embedding model to use in the content retriever.Embedding store to use in the content retriever.booleanenabled()If set tofalse, component will be disabled even if configured.Maximum number of results to return from the retriever.minScore()Minimum score threshold for retrieved results.type()Type of content retriever to create.
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
create
Create a new instance from configuration.- Parameters:
config- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
Deprecated.Create a new instance from configuration.- Parameters:
config- used to configure the new instance- Returns:
- a new instance configured from configuration
-
enabled
boolean enabled()If set tofalse, component will be disabled even if configured.- Returns:
- whether the component should be enabled
-
type
ContentRetrieverType type()Type of content retriever to create.- Returns:
- the content retriever type
-
embeddingStore
String embeddingStore()Embedding store to use in the content retriever.The value identifies a named service that provides embedding store implementation used to retrieve relevant content.
- Returns:
- the embedding store service name
-
embeddingModel
Explicit embedding model to use in the content retriever.If empty, the default embedding model is used (as resolved by the service registry). If set, the value identifies a named service that provides embedding model bean.
- Returns:
- embedding model reference if configured
-
displayName
Display name for this content retriever configuration.- Returns:
- the display name if configured
-
maxResults
Maximum number of results to return from the retriever.If empty, the retriever implementation default is used.
- Returns:
- maximum results if configured
-
minScore
Minimum score threshold for retrieved results.If empty, the retriever implementation default is used.
- Returns:
- minimum score if configured
-
create(io.helidon.config.Config)