Package akka.javasdk.agent
Interface ModelProvider.Custom
- All Superinterfaces:
ModelProvider
- Enclosing interface:
ModelProvider
Custom models can be added by implementing this interface and, and the underlying
implementations of
dev.langchain4j.model.chat.ChatModel and (optionally)
dev.langchain4j.model.chat.StreamingChatModel.
Refer to the Langchain4j documentation or reference implementations for how to implement the
ChatModel and StreamingChatModel.
-
Nested Class Summary
Nested classes/interfaces inherited from interface akka.javasdk.agent.ModelProvider
ModelProvider.Anthropic, ModelProvider.Custom, ModelProvider.FromConfig, ModelProvider.GoogleAIGemini, ModelProvider.HuggingFace, ModelProvider.LocalAI, ModelProvider.Ollama, ModelProvider.OpenAi -
Method Summary
Modifier and TypeMethodDescriptionIf you don't need streaming you can throw an exception from this method.
-
Method Details
-
createChatModel
Object createChatModel()- Returns:
- an instance of
dev.langchain4j.model.chat.ChatModel
-
createStreamingChatModel
Object createStreamingChatModel()If you don't need streaming you can throw an exception from this method.- Returns:
- an instance of
dev.langchain4j.model.chat.StreamingChatModel
-