Package dev.langchain4j.model.googleai
Class GoogleAiGeminiStreamingChatModel
java.lang.Object
dev.langchain4j.model.googleai.GoogleAiGeminiStreamingChatModel
- All Implemented Interfaces:
StreamingChatModel
-
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
ConstructorsConstructorDescriptionGoogleAiGeminiStreamingChatModel
(GoogleAiGeminiStreamingChatModel.GoogleAiGeminiStreamingChatModelBuilder builder) GoogleAiGeminiStreamingChatModel
(String apiKey, String modelName, Double temperature, Integer topK, Double topP, Integer seed, Integer maxOutputTokens, Duration timeout, ResponseFormat responseFormat, List<String> stopSequences, GeminiFunctionCallingConfig toolConfig, Boolean allowCodeExecution, Boolean includeCodeExecutionOutput, Boolean logRequestsAndResponses, List<GeminiSafetySetting> safetySettings, List<ChatModelListener> listeners, Integer maxRetries) 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) void
doChat
(ChatRequest request, StreamingChatResponseHandler handler) provider()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface dev.langchain4j.model.chat.StreamingChatModel
chat, chat, chat, supportedCapabilities
-
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
-
GoogleAiGeminiStreamingChatModel
public GoogleAiGeminiStreamingChatModel(GoogleAiGeminiStreamingChatModel.GoogleAiGeminiStreamingChatModelBuilder builder) -
GoogleAiGeminiStreamingChatModel
@Deprecated(forRemoval=true, since="1.1.0-beta7") public GoogleAiGeminiStreamingChatModel(String apiKey, String modelName, Double temperature, Integer topK, Double topP, Integer seed, Integer maxOutputTokens, Duration timeout, ResponseFormat responseFormat, List<String> stopSequences, GeminiFunctionCallingConfig toolConfig, Boolean allowCodeExecution, Boolean includeCodeExecutionOutput, Boolean logRequestsAndResponses, List<GeminiSafetySetting> safetySettings, List<ChatModelListener> listeners, Integer maxRetries) Deprecated, for removal: This API element is subject to removal in a future version.please useGoogleAiGeminiStreamingChatModel(GoogleAiGeminiStreamingChatModelBuilder)
instead
-
-
Method Details
-
builder
-
defaultRequestParameters
- Specified by:
defaultRequestParameters
in interfaceStreamingChatModel
-
doChat
- Specified by:
doChat
in interfaceStreamingChatModel
-
listeners
- Specified by:
listeners
in interfaceStreamingChatModel
-
provider
- Specified by:
provider
in interfaceStreamingChatModel
-
createGenerateContentRequest
protected dev.langchain4j.model.googleai.GeminiGenerateContentRequest createGenerateContentRequest(ChatRequest chatRequest) -
computeMimeType
-
GoogleAiGeminiStreamingChatModel(GoogleAiGeminiStreamingChatModelBuilder)
instead