Class GenericOaiClientConfig.Builder
java.lang.Object
de.xima.fc.prompt.ms.impl.service.generic_oai.client.GenericOaiClientConfig.Builder
- Enclosing class:
GenericOaiClientConfig
Builder for a
GenericOaiClientConfig.- Since:
- 8.5.0
-
Method Summary
Modifier and TypeMethodDescriptionSets the API key for authenticating with the Generic OAI API.Sets the URL to the Generic OAI API.build()Builds the API configuration.connectTimeout(Duration connectTimeout) Sets the connect timeout for connections to the prompt service.fileStorage(GenericOaiFileStorage fileStorage) Sets the file storage to use for managing files sent to the prompt service and returned by it.readTimeout(Duration readTimeout) Sets the read timeout for connections to the prompt service.sslContextSupplier(Supplier<SSLContext> sslContextSupplier) Sets the SSL context supplier for the connection to the Generic OAI API.
-
Method Details
-
apiKey
Sets the API key for authenticating with the Generic OAI API.- Parameters:
apiKey- The API key.- Returns:
- The builder.
-
apiUrl
Sets the URL to the Generic OAI API.- Parameters:
apiUrl- The API URL.- Returns:
- The builder.
-
build
Builds the API configuration. Subsequent modifications to the builder will not affect the built instance.- Returns:
- The built API configuration.
-
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
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.
-