Skip to content

Improve JDBC Chat Memory #2662

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

eddumelendez
Copy link
Contributor

  • Apply database initialization checks
  • Switch initializeSchema to DatabaseInitializationMode

Signed-off-by: Eddú Meléndez [email protected]

* Apply database initialization checks
* Switch initializeSchema to `DatabaseInitializationMode`

Signed-off-by: Eddú Meléndez <[email protected]>
@linarkou
Copy link
Contributor

I would like to have almost all propeties fromspring.sql.init here: username/password (because different users have different permission), maybe platform, and schema-location (in case when users have different from postgresql/maria-db platforms).

Also it would be nice to have ability to set table/schema names, and add ability to grant mermissions on that table to default user (when another username/password specified).

I already have a sketch and can help if you need.

@ThomasVitale
Copy link
Contributor

@eddumelendez thanks so much for this improvement! We have just delivered some changes to the ChatMemory API which include the introduction of a ChatMemoryRepository API to separate the two different concerns: memory management strategy and storage mechanism. The JdbcChatMemory has now been superseded by JdbcChatMemoryRepository.

Upgrade Notes: https://docs.spring.io/spring-ai/reference/upgrade-notes.html#_chat_memory
New Chat Memory Docs: https://docs.spring.io/spring-ai/reference/api/chat-memory.html
PR with the change: #2890

@linarkou
Copy link
Contributor

linarkou commented May 6, 2025

#3010 implemented same feature

@ThomasVitale
Copy link
Contributor

And somewhat related: #3006

@quaff
Copy link
Contributor

quaff commented May 7, 2025

#3010 implemented same feature

I closed it as duplicate.

We should support to customize platform or schema like BatchProperties.Jdbc, IntegrationProperties.Jdbc, JdbcSessionProperties and QuartzProperties.Jdbc did, WDYT? @eddumelendez

@quaff
Copy link
Contributor

quaff commented May 7, 2025

FYI, spring-projects/spring-boot#45379 is related.

@markpollack
Copy link
Member

I've created this PR that should address the various feature requests and code submissions that have been floating around.

#3055

closing this to focus on reviewing that PR

@markpollack markpollack closed this May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants