Class GenericOaiClientConfig
- java.lang.Object
-
- de.xima.fc.prompt.ms.impl.service.generic_oai.client.GenericOaiClientConfig
-
public final class GenericOaiClientConfig extends Object
Represents the configuration needed by the client to interact with Generic OAI services.- Since:
- 8.5.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGenericOaiClientConfig.BuilderBuilder for aGenericOaiClientConfig.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringapiKey()Gets the API key for authenticating with the Generic OAI API.StringapiUrl()Gets the URL to the Generic OAI API.static GenericOaiClientConfig.Builderbuilder()Creates a new builder forGenericOaiClientConfig.DurationconnectTimeout()Gets the connection timeout duration for connections to the Generic OAI API.booleandisableRequestStreaming()Whether to disable streaming the request.GenericOaiFileStoragefileStorage()Gets the file storage to use for managing files sent to the prompt service and returned by it.booleanomitDefaultResponseFormat()Whether to omit the response_format parameter in requests when it is the default.DurationreadTimeout()Gets the read timeout duration for connections to the Generic OAI API.Supplier<SSLContext>sslContextSupplier()Gets the SSL context supplier for the connection to the Generic OAI API.
-
-
-
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 eithertext,json_object, orjson_schema. The default istext. When this option is enabled, no response_format parameter is included in the request if the response_format.type istext. 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.
-
builder
public static GenericOaiClientConfig.Builder builder()
Creates a new builder forGenericOaiClientConfig.- Returns:
- A new builder.
-
-