Package dev.langchain4j.model.googleai
Class GoogleAiGeminiChatModel
java.lang.Object
dev.langchain4j.model.googleai.GoogleAiGeminiChatModel
- All Implemented Interfaces:
ChatModel
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final boolean
protected final String
protected final ChatRequestParameters
protected final GeminiFunctionCallingConfig
protected final dev.langchain4j.model.googleai.GeminiService
protected final boolean
protected final List
<ChatModelListener> protected final Integer
protected final List
<GeminiSafetySetting> protected final Integer
protected final GeminiThinkingConfig
-
Constructor Summary
ConstructorsConstructorDescriptionGoogleAiGeminiChatModel
(String apiKey, String modelName, Integer maxRetries, Double temperature, Integer topK, Integer seed, Double topP, Integer maxOutputTokens, Duration timeout, ResponseFormat responseFormat, List<String> stopSequences, GeminiFunctionCallingConfig toolConfig, Boolean allowCodeExecution, Boolean includeCodeExecutionOutput, Boolean logRequestsAndResponses, List<GeminiSafetySetting> safetySettings, List<ChatModelListener> listeners) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
protected static String
computeMimeType
(ResponseFormat responseFormat) protected dev.langchain4j.model.googleai.GeminiGenerateContentRequest
createGenerateContentRequest
(ChatRequest chatRequest) doChat
(ChatRequest chatRequest) provider()
-
Field Details
-
geminiService
protected final dev.langchain4j.model.googleai.GeminiService geminiService -
apiKey
-
functionCallingConfig
-
allowCodeExecution
protected final boolean allowCodeExecution -
includeCodeExecutionOutput
protected final boolean includeCodeExecutionOutput -
safetySettings
-
listeners
-
maxRetries
-
thinkingConfig
-
seed
-
defaultRequestParameters
-
-
Constructor Details
-
GoogleAiGeminiChatModel
-
GoogleAiGeminiChatModel
@Deprecated(forRemoval=true, since="1.1.0-beta7") public GoogleAiGeminiChatModel(String apiKey, String modelName, Integer maxRetries, Double temperature, Integer topK, Integer seed, Double topP, Integer maxOutputTokens, Duration timeout, ResponseFormat responseFormat, List<String> stopSequences, GeminiFunctionCallingConfig toolConfig, Boolean allowCodeExecution, Boolean includeCodeExecutionOutput, Boolean logRequestsAndResponses, List<GeminiSafetySetting> safetySettings, List<ChatModelListener> listeners) Deprecated, for removal: This API element is subject to removal in a future version.please useGoogleAiGeminiChatModel(GoogleAiGeminiChatModelBuilder)
instead
-
-
Method Details
-
builder
-
defaultRequestParameters
- Specified by:
defaultRequestParameters
in interfaceChatModel
-
doChat
-
supportedCapabilities
- Specified by:
supportedCapabilities
in interfaceChatModel
-
listeners
-
provider
-
createGenerateContentRequest
protected dev.langchain4j.model.googleai.GeminiGenerateContentRequest createGenerateContentRequest(ChatRequest chatRequest) -
computeMimeType
-
GoogleAiGeminiChatModel(GoogleAiGeminiChatModelBuilder)
instead