Class JdbcChatMemoryStoreConfiguration
java.lang.Object
io.micronaut.langchain4j.jdbc.memory.JdbcChatMemoryStoreConfiguration
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable
@EachProperty(value="langchain4j.chat-memory-store.jdbc",
primary="default")
public final class JdbcChatMemoryStoreConfiguration
extends Object
implements io.micronaut.core.util.Toggleable
Configures a JDBC
SQLChatMemoryStore for a data source. The name of the configuration is the name of the
data source.- Since:
- 2.4.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe SQL dialects. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondev.langchain4j.community.store.memory.chat.sql.SQLChatMemoryStore.SQLChatMemoryStoreBuilder@Nullable JdbcChatMemoryStoreConfiguration.DialectbooleanvoidsetDialect(@Nullable JdbcChatMemoryStoreConfiguration.Dialect dialect) voidsetEnabled(boolean enabled)
-
Field Details
-
PREFIX
-
-
Constructor Details
-
JdbcChatMemoryStoreConfiguration
- Parameters:
dataSource- The data source with the same name as the configuration
-
-
Method Details
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceio.micronaut.core.util.Toggleable
-
setEnabled
public void setEnabled(boolean enabled) - Parameters:
enabled- Whether the JDBC chat memory store is enabled. Defaults totrue.
-
getDialect
- Returns:
- The SQL dialect, or
nullto detect it from the database
-
setDialect
- Parameters:
dialect- The SQL dialect. Detected from the database by default.
-
getDataSource
- Returns:
- The data source
-
getBuilder
public dev.langchain4j.community.store.memory.chat.sql.SQLChatMemoryStore.SQLChatMemoryStoreBuilder getBuilder()- Returns:
- The builder of the store, configured with the
table-name,auto-create-table,memory-id-column-nameandcontent-column-nameproperties
-