Class GenericOaiClientConfig


  • public final class GenericOaiClientConfig
    extends Object
    Represents the configuration needed by the client to interact with Generic OAI services.
    Since:
    8.5.0
    • Method Detail

      • apiKey

        public String apiKey()
        Gets the API key for authenticating with the Generic OAI API.
        Returns:
        The API key.
      • apiUrl

        public String apiUrl()
        Gets the URL to the Generic OAI API.
        Returns:
        The API URL.
      • connectTimeout

        public Duration connectTimeout()
        Gets the connection timeout duration for connections to the Generic OAI API.
        Returns:
        The connection timeout duration.
      • disableRequestStreaming

        public boolean disableRequestStreaming()
        Whether to disable streaming the request. If enabled, the entire content is loaded into memory first, which allows the Content-Length header to be set. Should be set to false unless the prompt service cannot handled streamed requests without a Content-Length header.
        Returns:
        Whether request streaming is disabled.
        Since:
        8.5.3
      • fileStorage

        public GenericOaiFileStorage fileStorage()
        Gets the file storage to use for managing files sent to the prompt service and returned by it.
        Returns:
        The file storage.
      • omitDefaultResponseFormat

        public boolean omitDefaultResponseFormat()
        Whether to omit the response_format parameter in requests when it is the default. The response_format.type is either text, json_object, or json_schema. The default is text . When this option is enabled, no response_format parameter is included in the request if the response_format.type is text. Should be left disabled unless the prompt service has issues with the default response format.
        Returns:
        Whether to omit the response_format parameter in requests when it is the default.
        Since:
        8.5.3
      • readTimeout

        public Duration readTimeout()
        Gets the read timeout duration for connections to the Generic OAI API.
        Returns:
        The read timeout duration.
      • sslContextSupplier

        public Supplier<SSLContext> sslContextSupplier()
        Gets the SSL context supplier for the connection to the Generic OAI API.
        Returns:
        The SSL context supplier.