Package net.paulem.aihorde4j.client
Class HordeClient.Builder
java.lang.Object
net.paulem.aihorde4j.client.HordeClient.Builder
- Enclosing class:
HordeClient
Builder for HordeClient.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the API key for authentication.Sets the base URL for the API.build()Builds the HordeClient instance.clientAgent(String clientAgent) Sets the client agent header.enableLogging(boolean enable) Enables HTTP logging for debugging.generationTimeoutSeconds(long timeoutSeconds) Sets the timeout for generation requests.pollIntervalMs(long pollIntervalMs) Sets the polling interval for checking generation status.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
baseUrl
Sets the base URL for the API.- Parameters:
baseUrl- The base URL- Returns:
- This builder
-
apiKey
Sets the API key for authentication.- Parameters:
apiKey- The API key- Returns:
- This builder
-
clientAgent
Sets the client agent header.- Parameters:
clientAgent- The client agent string (format: App:Version:Contact)- Returns:
- This builder
-
pollIntervalMs
Sets the polling interval for checking generation status.- Parameters:
pollIntervalMs- The polling interval in milliseconds- Returns:
- This builder
-
generationTimeoutSeconds
Sets the timeout for generation requests.- Parameters:
timeoutSeconds- The timeout in seconds- Returns:
- This builder
-
enableLogging
Enables HTTP logging for debugging.- Parameters:
enable- Whether to enable logging- Returns:
- This builder
-
build
Builds the HordeClient instance.- Returns:
- A new HordeClient
-