Class GeminiFiles.Builder
java.lang.Object
dev.langchain4j.model.googleai.GeminiFiles.Builder
- Enclosing class:
GeminiFiles
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the API key for authentication.Sets the base URL for the API.build()Builds a new GeminiFiles instance.httpClient(HttpClient httpClient) Sets the HTTP client to use for requests.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
apiKey
Sets the API key for authentication.- Parameters:
apiKey- the API key (required)- Returns:
- this builder
-
httpClient
Sets the HTTP client to use for requests.- Parameters:
httpClient- the HTTP client (optional, defaults to a new HttpClient)- Returns:
- this builder
-
baseUrl
Sets the base URL for the API.- Parameters:
baseUrl- the base URL (optional, defaults to BASE_URL)- Returns:
- this builder
-
build
Builds a new GeminiFiles instance.- Returns:
- a new GeminiFiles instance
- Throws:
IllegalArgumentException- if apiKey is blank
-