Package dev.langchain4j.model.googleai
Class GoogleAiGeminiChatModel
java.lang.Object
dev.langchain4j.model.googleai.GoogleAiGeminiChatModel
- All Implemented Interfaces:
dev.langchain4j.model.chat.ChatLanguageModel,dev.langchain4j.model.chat.TokenCountEstimator
public class GoogleAiGeminiChatModel
extends Object
implements dev.langchain4j.model.chat.ChatLanguageModel, dev.langchain4j.model.chat.TokenCountEstimator
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Constructor Summary
ConstructorsConstructorDescriptionGoogleAiGeminiChatModel(String apiKey, String modelName, Integer maxRetries, Double temperature, Integer topK, Double topP, Integer maxOutputTokens, Integer candidateCount, Duration timeout, dev.langchain4j.model.chat.request.ResponseFormat responseFormat, List<String> stopSequences, GeminiFunctionCallingConfig toolConfig, Boolean allowCodeExecution, Boolean includeCodeExecutionOutput, Boolean logRequestsAndResponses, List<GeminiSafetySetting> safetySettings, List<dev.langchain4j.model.chat.listener.ChatModelListener> listeners) -
Method Summary
Modifier and TypeMethodDescriptiondev.langchain4j.model.chat.response.ChatResponsechat(dev.langchain4j.model.chat.request.ChatRequest chatRequest) intestimateTokenCount(List<dev.langchain4j.data.message.ChatMessage> messages) dev.langchain4j.model.output.Response<dev.langchain4j.data.message.AiMessage> dev.langchain4j.model.output.Response<dev.langchain4j.data.message.AiMessage> generate(List<dev.langchain4j.data.message.ChatMessage> messages, dev.langchain4j.agent.tool.ToolSpecification toolSpecification) dev.langchain4j.model.output.Response<dev.langchain4j.data.message.AiMessage> generate(List<dev.langchain4j.data.message.ChatMessage> messages, List<dev.langchain4j.agent.tool.ToolSpecification> toolSpecifications) Set<dev.langchain4j.model.chat.Capability> Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.langchain4j.model.chat.ChatLanguageModel
generate, generateMethods inherited from interface dev.langchain4j.model.chat.TokenCountEstimator
estimateTokenCount, estimateTokenCount, estimateTokenCount, estimateTokenCount
-
Constructor Details
-
GoogleAiGeminiChatModel
public GoogleAiGeminiChatModel(String apiKey, String modelName, Integer maxRetries, Double temperature, Integer topK, Double topP, Integer maxOutputTokens, Integer candidateCount, Duration timeout, dev.langchain4j.model.chat.request.ResponseFormat responseFormat, List<String> stopSequences, GeminiFunctionCallingConfig toolConfig, Boolean allowCodeExecution, Boolean includeCodeExecutionOutput, Boolean logRequestsAndResponses, List<GeminiSafetySetting> safetySettings, List<dev.langchain4j.model.chat.listener.ChatModelListener> listeners)
-
-
Method Details
-
generate
public dev.langchain4j.model.output.Response<dev.langchain4j.data.message.AiMessage> generate(List<dev.langchain4j.data.message.ChatMessage> messages) - Specified by:
generatein interfacedev.langchain4j.model.chat.ChatLanguageModel
-
generate
public dev.langchain4j.model.output.Response<dev.langchain4j.data.message.AiMessage> generate(List<dev.langchain4j.data.message.ChatMessage> messages, dev.langchain4j.agent.tool.ToolSpecification toolSpecification) - Specified by:
generatein interfacedev.langchain4j.model.chat.ChatLanguageModel
-
generate
public dev.langchain4j.model.output.Response<dev.langchain4j.data.message.AiMessage> generate(List<dev.langchain4j.data.message.ChatMessage> messages, List<dev.langchain4j.agent.tool.ToolSpecification> toolSpecifications) - Specified by:
generatein interfacedev.langchain4j.model.chat.ChatLanguageModel
-
chat
public dev.langchain4j.model.chat.response.ChatResponse chat(dev.langchain4j.model.chat.request.ChatRequest chatRequest) - Specified by:
chatin interfacedev.langchain4j.model.chat.ChatLanguageModel
-
estimateTokenCount
- Specified by:
estimateTokenCountin interfacedev.langchain4j.model.chat.TokenCountEstimator
-
supportedCapabilities
- Specified by:
supportedCapabilitiesin interfacedev.langchain4j.model.chat.ChatLanguageModel
-