Class GoogleGenAiStreamingChatModel.Builder
java.lang.Object
dev.langchain4j.model.google.genai.GoogleGenAiStreamingChatModel.Builder
- Enclosing class:
GoogleGenAiStreamingChatModel
-
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) executor(ExecutorService executor) Executor used to drive the blockingResponseStreamiteration off the calling thread.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) 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 GoogleGenAiStreamingChatModel.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
-
safetySettings
public GoogleGenAiStreamingChatModel.Builder safetySettings(List<com.google.genai.types.SafetySetting> safetySettings) -
responseFormat
-
enableGoogleSearch
-
enableGoogleMaps
-
enableUrlContext
-
allowedFunctionNames
public GoogleGenAiStreamingChatModel.Builder allowedFunctionNames(List<String> allowedFunctionNames) -
listeners
-
executor
Executor used to drive the blockingResponseStreamiteration off the calling thread. If not set, a shared default executor fromDefaultExecutorProvideris used.Strongly recommended: supply an executor managed by your application (Spring/Quarkus task executor, virtual-thread executor, bounded pool, etc.). The default executor is unbounded and not tied to any application lifecycle, so it offers no back-pressure or graceful shutdown.
-
defaultRequestParameters
public GoogleGenAiStreamingChatModel.Builder defaultRequestParameters(ChatRequestParameters defaultRequestParameters) -
cachedContent
-
vertexSearchDatastore
-
labels
-
apiEndpoint
-
customHeaders
-
logRequests
-
logResponses
-
logRequestsAndResponses
public GoogleGenAiStreamingChatModel.Builder logRequestsAndResponses(Boolean logRequestsAndResponses) -
build
-