Class GenericOaiClientConfig.Builder

java.lang.Object
de.xima.fc.prompt.ms.impl.service.generic_oai.client.GenericOaiClientConfig.Builder
Enclosing class:
GenericOaiClientConfig

public static final class GenericOaiClientConfig.Builder extends Object
Builder for a GenericOaiClientConfig.
Since:
8.5.0
  • Method Details

    • apiKey

      @CanIgnoreReturnValue public GenericOaiClientConfig.Builder apiKey(String apiKey)
      Sets the API key for authenticating with the Generic OAI API.
      Parameters:
      apiKey - The API key.
      Returns:
      The builder.
    • apiUrl

      @CanIgnoreReturnValue public GenericOaiClientConfig.Builder apiUrl(String apiUrl)
      Sets the URL to the Generic OAI API.
      Parameters:
      apiUrl - The API URL.
      Returns:
      The builder.
    • build

      @CanIgnoreReturnValue public GenericOaiClientConfig build()
      Builds the API configuration. Subsequent modifications to the builder will not affect the built instance.
      Returns:
      The built API configuration.
    • connectTimeout

      @CanIgnoreReturnValue public GenericOaiClientConfig.Builder connectTimeout(Duration connectTimeout)
      Sets the connect timeout for connections to the prompt service. Defaults to an implementation-specific value if not set.
      Parameters:
      connectTimeout - The connection timeout duration.
      Returns:
      The builder.
    • fileStorage

      @CanIgnoreReturnValue public GenericOaiClientConfig.Builder fileStorage(GenericOaiFileStorage fileStorage)
      Sets the file storage to use for managing files sent to the prompt service and returned by it.
      Parameters:
      fileStorage - The file storage.
      Returns:
      The builder.
    • readTimeout

      @CanIgnoreReturnValue public GenericOaiClientConfig.Builder readTimeout(Duration readTimeout)
      Sets the read timeout for connections to the prompt service. Defaults to an implementation-specific value if not set.
      Parameters:
      readTimeout - The read timeout duration.
      Returns:
      The builder.
    • sslContextSupplier

      @CanIgnoreReturnValue public GenericOaiClientConfig.Builder sslContextSupplier(Supplier<SSLContext> sslContextSupplier)
      Sets the SSL context supplier for the connection to the Generic OAI API.
      Parameters:
      sslContextSupplier - The SSL context supplier.
      Returns:
      The builder.