Package com.bytedesk.ai.alibaba.memory
Class MysqlChatMemoryRepository
java.lang.Object
com.bytedesk.ai.alibaba.memory.JdbcChatMemoryRepository
com.bytedesk.ai.alibaba.memory.MysqlChatMemoryRepository
- All Implemented Interfaces:
org.springframework.ai.chat.memory.ChatMemoryRepository
MySQL implementation of chat memory repository
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class com.bytedesk.ai.alibaba.memory.JdbcChatMemoryRepository
TABLE_NAME -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateMysqlChatMemoryRepository(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringcreateTableSql(String tableName) protected StringGet the SQL statement used to add recordsprotected StringGet the SQL statement used for querying recordsprotected StringhasTableSql(String tableName) Methods inherited from class com.bytedesk.ai.alibaba.memory.JdbcChatMemoryRepository
deleteByConversationId, findByConversationId, findConversationIds, saveAll
-
Field Details
-
MYSQL_QUERY_ADD
- See Also:
-
MYSQL_QUERY_GET
- See Also:
-
-
Constructor Details
-
MysqlChatMemoryRepository
private MysqlChatMemoryRepository(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
-
-
Method Details
-
mysqlBuilder
-
hasTableSql
- Specified by:
hasTableSqlin classJdbcChatMemoryRepository
-
createTableSql
- Specified by:
createTableSqlin classJdbcChatMemoryRepository
-
getAddSql
Description copied from class:JdbcChatMemoryRepositoryGet the SQL statement used to add records- Overrides:
getAddSqlin classJdbcChatMemoryRepository- Returns:
- SQL
-
getGetSql
Description copied from class:JdbcChatMemoryRepositoryGet the SQL statement used for querying records- Overrides:
getGetSqlin classJdbcChatMemoryRepository- Returns:
- SQL
-