Class GoogleAiGeminiChatModel
java.lang.Object
dev.langchain4j.model.googleai.GoogleAiGeminiChatModel
- All Implemented Interfaces:
ChatModel
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanprotected final ChatRequestParametersprotected final Booleanprotected final GeminiFunctionCallingConfigprotected final dev.langchain4j.model.googleai.GeminiServiceprotected final booleanprotected final List<ChatModelListener> protected final Integerprotected final Booleanprotected final Booleanprotected final List<GeminiSafetySetting> protected final Integerprotected final booleanprotected final GeminiThinkingConfig -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionbuilder()protected static dev.langchain4j.model.googleai.GeminiServicebuildGeminiService(dev.langchain4j.model.googleai.BaseGeminiChatModel.GoogleAiGeminiChatModelBaseBuilder<?> builder) protected static StringcomputeMimeType(ResponseFormat responseFormat) protected AiMessagecreateAiMessage(dev.langchain4j.model.googleai.GeminiGenerateContentResponse.GeminiCandidate candidate) protected dev.langchain4j.model.googleai.GeminiGenerateContentRequestcreateGenerateContentRequest(ChatRequest chatRequest) protected TokenUsagecreateTokenUsage(dev.langchain4j.model.googleai.GeminiGenerateContentResponse.GeminiUsageMetadata tokenCounts) doChat(ChatRequest chatRequest) protected ChatResponseprocessResponse(dev.langchain4j.model.googleai.GeminiGenerateContentResponse geminiResponse) provider()
-
Field Details
-
geminiService
protected final dev.langchain4j.model.googleai.GeminiService geminiService -
functionCallingConfig
-
allowCodeExecution
protected final boolean allowCodeExecution -
includeCodeExecutionOutput
protected final boolean includeCodeExecutionOutput -
safetySettings
-
listeners
-
thinkingConfig
-
returnThinking
-
sendThinking
protected final boolean sendThinking -
seed
-
logprobs
-
responseLogprobs
-
enableEnhancedCivicAnswers
-
defaultRequestParameters
-
-
Constructor Details
-
GoogleAiGeminiChatModel
-
-
Method Details
-
builder
-
defaultRequestParameters
- Specified by:
defaultRequestParametersin interfaceChatModel
-
doChat
-
supportedCapabilities
- Specified by:
supportedCapabilitiesin interfaceChatModel
-
listeners
-
provider
-
buildGeminiService
protected static dev.langchain4j.model.googleai.GeminiService buildGeminiService(dev.langchain4j.model.googleai.BaseGeminiChatModel.GoogleAiGeminiChatModelBaseBuilder<?> builder) -
createGenerateContentRequest
protected dev.langchain4j.model.googleai.GeminiGenerateContentRequest createGenerateContentRequest(ChatRequest chatRequest) -
computeMimeType
-
processResponse
protected ChatResponse processResponse(dev.langchain4j.model.googleai.GeminiGenerateContentResponse geminiResponse) -
createAiMessage
protected AiMessage createAiMessage(dev.langchain4j.model.googleai.GeminiGenerateContentResponse.GeminiCandidate candidate) -
createTokenUsage
protected TokenUsage createTokenUsage(dev.langchain4j.model.googleai.GeminiGenerateContentResponse.GeminiUsageMetadata tokenCounts)
-