All Superinterfaces:
Prototype.Api
All Known Implementing Classes:
InProcessEmbeddingModelConfig.BuilderBase.InProcessEmbeddingModelConfigImpl

public interface InProcessEmbeddingModelConfig extends Prototype.Api
Configuration blueprint for LangChain4j in-process models.
See Also:
  • 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

      static InProcessEmbeddingModelConfig create(Config config)
      Create a new instance from configuration.
      Parameters:
      config - used to configure the new instance
      Returns:
      a new instance configured from configuration
    • create

      Create a new instance from configuration.
      Parameters:
      config - used to configure the new instance
      Returns:
      a new instance configured from configuration
    • enabled

      boolean enabled()
      Whether the embedding model is enabled. If set to false, the model will not be available even if configured.
      Returns:
      whether the embedding model is enabled, defaults to true
    • executor

      Executor configuration used by the embedding model.
      Returns:
      optional executor configuration
    • type

      Which in-process ONNX model variant should be used.
      Returns:
      in-process ONNX model provided type
    • pathToModel

      Optional<Path> pathToModel()
      The path to the modelPath file (e.g., "/path/to/model.onnx").
      Returns:
      an Optional containing the configured model path, or an empty Optional if not set
    • pathToTokenizer

      Optional<Path> pathToTokenizer()
      The path to the tokenizer file (e.g., "/path/to/tokenizer.json").
      Returns:
      an Optional containing the configured tokenizer path, or an empty Optional if not set
    • poolingMode

      Optional<dev.langchain4j.model.embedding.onnx.PoolingMode> poolingMode()
      The pooling model to use. Can be found in the ".../1_Pooling/config.json" file on HuggingFace. Here is an example. "pooling_mode_mean_tokens": true means that PoolingMode.MEAN should be used.
      Returns:
      an Optional containing the configured PoolingMode, or an empty Optional if no pooling mode is explicitly configured