All Superinterfaces:
Prototype.Api
All Known Implementing Classes:
OpenAiModerationModelConfig.BuilderBase.OpenAiModerationModelConfigImpl

public interface OpenAiModerationModelConfig extends Prototype.Api
Configuration for the OpenAI moderation model, OpenAiModerationModel. Provides methods for setting up and managing properties related to OpenAI API requests.
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 OpenAiModerationModelConfig 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 OpenAiModerationModelConfig create()
      Create a new instance with default values.
      Returns:
      a new instance
    • maxRetries

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

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

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

      Optional<String> apiKey()
      The API key used to authenticate requests to the OpenAI API.
      Returns:
      an Optional containing the API key
    • 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
    • proxy

      Optional<Proxy> proxy()
      Proxy to use.
      Returns:
      an Optional containing HTTP proxy to use
    • organizationId

      Optional<String> organizationId()
      The ID of the organization for API requests.
      Returns:
      organization ID
    • modelName

      Optional<String> modelName()
      The model name to use (e.g., "gpt-3.5-turbo").
      Returns:
      the model name