Package com.embabel.chat
Interface ConversationFactoryProvider
-
- All Implemented Interfaces:
public interface ConversationFactoryProviderProvider for ConversationFactory instances by type.
Implementations resolve factories based on ConversationStoreType, typically backed by Spring beans registered via autoconfiguration.
To use conversation factories:
Inject ConversationFactoryProvider directly via Spring DI
Pass the appropriate ConversationFactory when creating a chatbot
The storage type should be configured once at chatbot creation time, not per-call by developers.
-
-
Method Summary
Modifier and Type Method Description abstract ConversationFactorygetFactory(ConversationStoreType type)Get a conversation factory for the given store type. abstract ConversationFactorygetFactoryOrNull(ConversationStoreType type)Get a conversation factory for the given store type, or null if not available. abstract Set<ConversationStoreType>availableTypes()Get all registered factory types. -
-
Method Detail
-
getFactory
abstract ConversationFactory getFactory(ConversationStoreType type)
Get a conversation factory for the given store type.
- Parameters:
type- the conversation store type- Returns:
the factory for that type
-
getFactoryOrNull
abstract ConversationFactory getFactoryOrNull(ConversationStoreType type)
Get a conversation factory for the given store type, or null if not available.
- Parameters:
type- the conversation store type- Returns:
the factory for that type, or null
-
availableTypes
abstract Set<ConversationStoreType> availableTypes()
Get all registered factory types.
-
-
-
-