Class GoogleGenAiChatModel.Builder
java.lang.Object
dev.langchain4j.model.google.genai.GoogleGenAiChatModel.Builder
- Enclosing class:
GoogleGenAiChatModel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallowedFunctionNames(List<String> allowedFunctionNames) apiEndpoint(String apiEndpoint) build()cachedContent(String cachedContent) client(com.google.genai.Client client) customHeaders(Map<String, String> customHeaders) defaultRequestParameters(ChatRequestParameters defaultRequestParameters) enableGoogleMaps(boolean googleMaps) enableGoogleSearch(boolean googleSearch) enableUrlContext(boolean urlContext) frequencyPenalty(Double frequencyPenalty) googleCredentials(com.google.auth.oauth2.GoogleCredentials credentials) listeners(List<ChatModelListener> listeners) logRequests(Boolean logRequests) logRequestsAndResponses(Boolean logRequestsAndResponses) logResponses(Boolean logResponses) maxOutputTokens(Integer maxOutputTokens) maxRetries(Integer maxRetries) presencePenalty(Double presencePenalty) responseFormat(ResponseFormat responseFormat) safetySettings(List<com.google.genai.types.SafetySetting> safetySettings) stopSequences(List<String> stopSequences) temperature(Double temperature) thinkingBudget(Integer thinkingBudget) The thinking budget to use.thinkingLevel(String thinkingLevel) The thinking level to use.vertexSearchDatastore(String vertexSearchDatastore)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
client
-
googleCredentials
public GoogleGenAiChatModel.Builder googleCredentials(com.google.auth.oauth2.GoogleCredentials credentials) -
apiKey
-
projectId
-
location
-
modelName
-
timeout
-
temperature
-
topP
-
topK
-
frequencyPenalty
-
presencePenalty
-
maxOutputTokens
-
thinkingBudget
The thinking budget to use. This is a legacy parameter. For Gemini 3.x models, usethinkingLevel(String)instead. -
thinkingLevel
The thinking level to use. This is the recommended parameter for Gemini 3.x models. Allowed values are"MINIMAL","LOW","MEDIUM","HIGH". Note that this cannot be used together withthinkingBudget(Integer). -
seed
-
stopSequences
-
maxRetries
-
safetySettings
public GoogleGenAiChatModel.Builder safetySettings(List<com.google.genai.types.SafetySetting> safetySettings) -
responseFormat
-
enableGoogleSearch
-
enableGoogleMaps
-
enableUrlContext
-
allowedFunctionNames
-
listeners
-
defaultRequestParameters
public GoogleGenAiChatModel.Builder defaultRequestParameters(ChatRequestParameters defaultRequestParameters) -
vertexSearchDatastore
-
labels
-
apiEndpoint
-
customHeaders
-
cachedContent
-
logRequests
-
logResponses
-
logRequestsAndResponses
-
build
-