All Superinterfaces:
Prototype.Api
All Known Implementing Classes:
OllamaEmbeddingModelConfig.BuilderBase.OllamaEmbeddingModelConfigImpl

public interface OllamaEmbeddingModelConfig extends Prototype.Api
Configuration class for the Ollama embedding model, OllamaEmbeddingModel.
See Also:
  • Field Details

  • 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 OllamaEmbeddingModelConfig 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

      static OllamaEmbeddingModelConfig create()
      Create a new instance with default values.
      Returns:
      a new instance
    • enabled

      boolean enabled()
      If set to false (default), Ollama model will not be available even if configured.
      Returns:
      whether Ollama model is enabled, defaults to false
    • baseUrl

      Optional<String> baseUrl()
      The base URL for the Ollama API.
      Returns:
      the base URL
    • logRequests

      Optional<Boolean> logRequests()
      Whether to log API requests.
      Returns:
      an Optional containing true if requests should be logged, false otherwise
    • logResponses

      Optional<Boolean> logResponses()
      Whether to log API responses.
      Returns:
      an Optional containing true if responses should be logged, false otherwise
    • customHeaders

      Map<String,String> customHeaders()
      A map containing custom headers.
      Returns:
      custom headers map
    • timeout

      Optional<Duration> timeout()
      The timeout setting for API requests.
      Returns:
      the timeout setting in Duration.parse(java.lang.CharSequence) format
    • maxRetries

      Optional<Integer> maxRetries()
      The maximum number of retries for failed API requests.
      Returns:
      an Optional containing the maximum number of retries
    • modelName

      Optional<String> modelName()
      The name of the Ollama model to use. This parameter determines which pre-trained model will process the input prompt and produce the output.

      Examples of valid model names:

      • "llama-2": Utilizes the LLaMA 2 model.
      • "alpaca": Uses a fine-tuned LLaMA model for conversational tasks.
      • "custom-model": A user-defined model trained for specific use cases.
      Returns:
      an Optional containing the model name