Class ModelService
java.lang.Object
fr.paris.lutece.plugins.wiki.modules.ai.service.model.ModelService
Service for managing LangChain4j models. Provides CDI producers for embedding, chat, and streaming chat models.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondev.langchain4j.model.chat.ChatModelRetrieves the chat modeldev.langchain4j.model.embedding.EmbeddingModelRetrieves the embedding modeldev.langchain4j.model.chat.StreamingChatModelRetrieves the streaming chat model
-
Constructor Details
-
ModelService
public ModelService()
-
-
Method Details
-
getEmbeddingModel
@Produces @Named("wiki-ai.embeddingModel") @ApplicationScoped public dev.langchain4j.model.embedding.EmbeddingModel getEmbeddingModel()Retrieves the embedding model- Returns:
- The embedding model
-
getChatModel
@Produces @Named("wiki-ai.chatModel") @ApplicationScoped public dev.langchain4j.model.chat.ChatModel getChatModel()Retrieves the chat model- Returns:
- The chat model
-
getStreamingChatModel
@Produces @Named("wiki-ai.streamingChatModel") @ApplicationScoped public dev.langchain4j.model.chat.StreamingChatModel getStreamingChatModel()Retrieves the streaming chat model- Returns:
- The streaming chat model
-