Class GoogleAIGeminiProvider
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.ai.provider.impl.AbstractAIProvider
org.ametys.plugins.ai.provider.impl.GoogleAIGeminiProvider
- All Implemented Interfaces:
AIProvider,DeferredServiceable,LogEnabled,PluginAware,Disposable,Initializable,Component,Configurable
Implementation of the Google Gemini Provider
-
Nested Class Summary
Nested classes/interfaces inherited from class org.ametys.plugins.ai.provider.impl.AbstractAIProvider
AbstractAIProvider.EmbeddingModelInfo -
Field Summary
Fields inherited from class org.ametys.plugins.ai.provider.impl.AbstractAIProvider
_aiHelper, _embeddingModel, _embeddingModelInfos, _httpClient, _id, _imageModel, _imageModelContextWindow, _imageModelNames, _label, _pluginName, _textModel, _textModelContextWindow, _textModelNames, CONFIG_API_KEY, CONFIG_EMBEDDING_MODEL, CONFIG_IMAGE_MODEL, CONFIG_IMAGE_TIMEOUT, CONFIG_SERVER_URL, CONFIG_TEXT_MODEL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected dev.langchain4j.model.chat.ChatModelcreateChatModel(String modelName) Creates the text model implementationprotected dev.langchain4j.model.embedding.EmbeddingModelcreateEmbeddingModel(String modelName) Creates the embedding model implementationMethods inherited from class org.ametys.plugins.ai.provider.impl.AbstractAIProvider
_download, _getTokenCountEstimator, askChatbot, computeEmbedding, configure, createImageModel, deferredService, dispose, getAPIKey, getEmbeddingDimension, getEmbeddingKey, getId, getKnownEmbeddingModels, getKnownImageModels, getKnownTextModels, getLabel, getServerURL, initialize, isEmbeddingNormalizationRequired, isEmbeddingSupported, isImageGenerationSupported, normalize, setPluginInfo, textToImage, textToSummaryMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Constructor Details
-
GoogleAIGeminiProvider
public GoogleAIGeminiProvider()
-
-
Method Details
-
createChatModel
Description copied from class:AbstractAIProviderCreates the text model implementation- Specified by:
createChatModelin classAbstractAIProvider- Parameters:
modelName- The model name- Returns:
- The chat model
-
createEmbeddingModel
Description copied from class:AbstractAIProviderCreates the embedding model implementation- Specified by:
createEmbeddingModelin classAbstractAIProvider- Parameters:
modelName- The model name- Returns:
- The embedding model
-