Class GoogleGenAiBatchChatModel.Builder
java.lang.Object
dev.langchain4j.model.google.genai.GoogleGenAiBatchChatModel.Builder
- Enclosing class:
GoogleGenAiBatchChatModel
-
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) generateContentConfigCustomizer(Consumer<com.google.genai.types.GenerateContentConfig.Builder> generateContentConfigCustomizer) Registers a customizer applied to theGenerateContentConfig.Builderafter this integration has populated it (generation parameters, tools, system instruction, etc.), so it can set any underlying Google Gen AI SDK option that is not exposed here, or override a value set above.googleCredentials(com.google.auth.oauth2.GoogleCredentials credentials) googleMaps(Boolean googleMaps) googleSearch(Boolean googleSearch) includeThoughts(Boolean includeThoughts) Controls whether the model is asked to include thought summaries in the response.maxRetries(Integer maxRetries) returnThinking(Boolean returnThinking) Controls whether to return thinking/reasoning text (if available) insideAiMessage.thinking().safetySettings(List<com.google.genai.types.SafetySetting> safetySettings) sendThinking(Boolean sendThinking) Controls whether to send thinking/reasoning text to the LLM in follow-up requests.thinkingBudget(Integer thinkingBudget) The thinking budget to use.thinkingLevel(String thinkingLevel) The thinking level to use.urlContext(Boolean urlContext) vertexSearchDatastore(String vertexSearchDatastore)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
client
-
googleCredentials
public GoogleGenAiBatchChatModel.Builder googleCredentials(com.google.auth.oauth2.GoogleCredentials credentials) -
apiKey
-
projectId
-
location
-
modelName
-
maxRetries
-
timeout
-
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). -
includeThoughts
Controls whether the model is asked to include thought summaries in the response.Not set by default. This does not control how much the model thinks; see
thinkingBudget(Integer)andthinkingLevel(String)for that.- See Also:
-
returnThinking
Controls whether to return thinking/reasoning text (if available) insideAiMessage.thinking(). Please note that this does not enable thinking/reasoning for the LLM; it only controls whether to parse thethoughtparts of the API response and return them inside theAiMessage.Disabled by default. If enabled, the thinking text will be stored within the
AiMessageand may be persisted.- See Also:
-
sendThinking
Controls whether to send thinking/reasoning text to the LLM in follow-up requests.Disabled by default. If enabled, the contents of
AiMessage.thinking()will be sent in the API request.Thought signatures required for function calling are handled independently of this setting.
- See Also:
-
seed
-
googleSearch
-
googleMaps
-
urlContext
-
safetySettings
public GoogleGenAiBatchChatModel.Builder safetySettings(List<com.google.genai.types.SafetySetting> safetySettings) -
allowedFunctionNames
-
defaultRequestParameters
public GoogleGenAiBatchChatModel.Builder defaultRequestParameters(ChatRequestParameters defaultRequestParameters) -
vertexSearchDatastore
-
labels
-
apiEndpoint
-
customHeaders
-
cachedContent
-
generateContentConfigCustomizer
public GoogleGenAiBatchChatModel.Builder generateContentConfigCustomizer(Consumer<com.google.genai.types.GenerateContentConfig.Builder> generateContentConfigCustomizer) Registers a customizer applied to theGenerateContentConfig.Builderafter this integration has populated it (generation parameters, tools, system instruction, etc.), so it can set any underlying Google Gen AI SDK option that is not exposed here, or override a value set above.- Parameters:
generateContentConfigCustomizer- a consumer that mutates theGenerateContentConfig.Builder- See Also:
-
build
-