Class GoogleGenAiClientConfiguration
java.lang.Object
io.micronaut.langchain4j.googlegenai.GoogleGenAiClientConfiguration
@ConfigurationProperties("langchain4j.google-gen-ai")
public final class GoogleGenAiClientConfiguration
extends Object
Configures the Google Gen AI
Client shared by the Google Gen AI models: the Gemini API
with an API key, or Vertex AI with a project, a location and the application's GoogleCredentials.- Since:
- 2.4.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable String@Nullable String@Nullable String@Nullable String@Nullable Integer@Nullable Integer@Nullable String@Nullable DurationbooleanvoidvoidsetApiVersion(@Nullable String apiVersion) voidsetBaseUrl(@Nullable String baseUrl) voidsetLocation(@Nullable String location) voidsetMaxConnections(@Nullable Integer maxConnections) voidsetMaxConnectionsPerHost(@Nullable Integer maxConnectionsPerHost) voidsetProjectId(@Nullable String projectId) voidsetTimeout(@Nullable Duration timeout) voidsetVertexAi(boolean vertexAi)
-
Field Details
-
PREFIX
-
-
Constructor Details
-
GoogleGenAiClientConfiguration
public GoogleGenAiClientConfiguration()
-
-
Method Details
-
getApiKey
- Returns:
- The API key of the Gemini API
-
setApiKey
- Parameters:
apiKey- The API key of the Gemini API
-
isVertexAi
public boolean isVertexAi()- Returns:
- Whether Vertex AI is used instead of the Gemini API
-
setVertexAi
public void setVertexAi(boolean vertexAi) - Parameters:
vertexAi- Whether Vertex AI is used instead of the Gemini API. Defaults tofalse.
-
getProjectId
- Returns:
- The Google Cloud project of Vertex AI
-
setProjectId
- Parameters:
projectId- The Google Cloud project of Vertex AI
-
getLocation
- Returns:
- The location of Vertex AI
-
setLocation
- Parameters:
location- The location of Vertex AI, for exampleus-central1orglobal
-
getBaseUrl
- Returns:
- The base URL of the API
-
setBaseUrl
- Parameters:
baseUrl- The base URL of the API, for example a proxy. Defaults to the URL of the Gemini API or Vertex AI.
-
getApiVersion
- Returns:
- The version of the API
-
setApiVersion
- Parameters:
apiVersion- The version of the API, for examplev1. Defaults to the SDK's version.
-
getTimeout
- Returns:
- The timeout of the requests
-
setTimeout
- Parameters:
timeout- The timeout of the requests
-
getMaxConnections
- Returns:
- The maximum number of connections of the HTTP client
-
setMaxConnections
- Parameters:
maxConnections- The maximum number of concurrent connections of the HTTP client
-
getMaxConnectionsPerHost
- Returns:
- The maximum number of connections of the HTTP client per host
-
setMaxConnectionsPerHost
- Parameters:
maxConnectionsPerHost- The maximum number of concurrent connections of the HTTP client per host
-