Class GoogleAiGeminiStreamingChatModel
java.lang.Object
dev.langchain4j.model.googleai.GoogleAiGeminiStreamingChatModel
- All Implemented Interfaces:
dev.langchain4j.model.chat.StreamingChatModel
public class GoogleAiGeminiStreamingChatModel
extends Object
implements dev.langchain4j.model.chat.StreamingChatModel
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanprotected final booleanprotected final booleanprotected final booleanprotected final Stringprotected final GeminiCacheManagerprotected final GeminiCachingConfigprotected final dev.langchain4j.model.chat.request.ChatRequestParametersprotected final Booleanprotected final GeminiFunctionCallingConfigprotected final GeminiServiceprotected final dev.langchain4j.model.googleai.GeminiGenerationConfig.GeminiImageConfigprotected final booleanprotected final List<dev.langchain4j.model.chat.listener.ChatModelListener> protected final Integerprotected final GeminiMediaResolutionLevelprotected final booleanprotected final Booleanprotected final booleanprotected final Booleanprotected final List<GeminiSafetySetting> protected final Integerprotected final booleanprotected final booleanprotected final GeminiThinkingConfig -
Constructor Summary
ConstructorsConstructorDescriptionGoogleAiGeminiStreamingChatModel(GoogleAiGeminiStreamingChatModel.GoogleAiGeminiStreamingChatModelBuilder builder) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()protected static GeminiServicebuildGeminiService(dev.langchain4j.model.googleai.BaseGeminiChatModel.GoogleAiGeminiChatModelBaseBuilder<?> builder) protected static StringcomputeMimeType(dev.langchain4j.model.chat.request.ResponseFormat responseFormat) protected dev.langchain4j.data.message.AiMessagecreateAiMessage(dev.langchain4j.model.googleai.GeminiGenerateContentResponse.GeminiCandidate candidate) protected dev.langchain4j.model.googleai.GeminiGenerateContentRequestcreateGenerateContentRequest(dev.langchain4j.model.chat.request.ChatRequest chatRequest) protected dev.langchain4j.model.output.TokenUsagecreateTokenUsage(dev.langchain4j.model.googleai.GeminiUsageMetadata tokenCounts) dev.langchain4j.model.chat.request.ChatRequestParametersvoiddoChat(dev.langchain4j.model.chat.request.ChatRequest request, dev.langchain4j.model.chat.response.StreamingChatResponseHandler handler) List<dev.langchain4j.model.chat.listener.ChatModelListener> protected dev.langchain4j.model.chat.response.ChatResponseprocessResponse(dev.langchain4j.model.googleai.GeminiGenerateContentResponse geminiResponse) dev.langchain4j.model.ModelProviderprovider()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.langchain4j.model.chat.StreamingChatModel
chat, chat, chat, chat, supportedCapabilities
-
Field Details
-
geminiService
-
cacheManager
-
functionCallingConfig
-
allowCodeExecution
protected final boolean allowCodeExecution -
allowGoogleSearch
protected final boolean allowGoogleSearch -
allowGoogleMaps
protected final boolean allowGoogleMaps -
retrieveGoogleMapsWidgetToken
protected final boolean retrieveGoogleMapsWidgetToken -
allowUrlContext
protected final boolean allowUrlContext -
includeCodeExecutionOutput
protected final boolean includeCodeExecutionOutput -
safetySettings
-
listeners
-
thinkingConfig
-
returnThinking
-
sendThinking
protected final boolean sendThinking -
sendOriginalContentParts
protected final boolean sendOriginalContentParts -
seed
-
logprobs
-
responseLogprobs
-
enableEnhancedCivicAnswers
-
mediaResolution
-
mediaResolutionPerPartEnabled
protected final boolean mediaResolutionPerPartEnabled -
cachingConfig
-
imageConfig
protected final dev.langchain4j.model.googleai.GeminiGenerationConfig.GeminiImageConfig imageConfig -
cachedContentName
-
defaultRequestParameters
protected final dev.langchain4j.model.chat.request.ChatRequestParameters defaultRequestParameters
-
-
Constructor Details
-
GoogleAiGeminiStreamingChatModel
public GoogleAiGeminiStreamingChatModel(GoogleAiGeminiStreamingChatModel.GoogleAiGeminiStreamingChatModelBuilder builder)
-
-
Method Details
-
builder
-
defaultRequestParameters
public dev.langchain4j.model.chat.request.ChatRequestParameters defaultRequestParameters()- Specified by:
defaultRequestParametersin interfacedev.langchain4j.model.chat.StreamingChatModel
-
doChat
public void doChat(dev.langchain4j.model.chat.request.ChatRequest request, dev.langchain4j.model.chat.response.StreamingChatResponseHandler handler) - Specified by:
doChatin interfacedev.langchain4j.model.chat.StreamingChatModel
-
listeners
- Specified by:
listenersin interfacedev.langchain4j.model.chat.StreamingChatModel
-
provider
public dev.langchain4j.model.ModelProvider provider()- Specified by:
providerin interfacedev.langchain4j.model.chat.StreamingChatModel
-
buildGeminiService
protected static GeminiService buildGeminiService(dev.langchain4j.model.googleai.BaseGeminiChatModel.GoogleAiGeminiChatModelBaseBuilder<?> builder) -
createGenerateContentRequest
protected dev.langchain4j.model.googleai.GeminiGenerateContentRequest createGenerateContentRequest(dev.langchain4j.model.chat.request.ChatRequest chatRequest) -
computeMimeType
protected static String computeMimeType(dev.langchain4j.model.chat.request.ResponseFormat responseFormat) -
processResponse
protected dev.langchain4j.model.chat.response.ChatResponse processResponse(dev.langchain4j.model.googleai.GeminiGenerateContentResponse geminiResponse) -
createAiMessage
protected dev.langchain4j.data.message.AiMessage createAiMessage(dev.langchain4j.model.googleai.GeminiGenerateContentResponse.GeminiCandidate candidate) -
createTokenUsage
protected dev.langchain4j.model.output.TokenUsage createTokenUsage(dev.langchain4j.model.googleai.GeminiUsageMetadata tokenCounts)
-