Skip to content

Conversation

@deejay1
Copy link
Contributor

@deejay1 deejay1 commented Apr 9, 2025

This is the initial implementation of a stock MongoDB chat memory which doesn't require MongoDB Atlas

Closes #2688

@deejay1 deejay1 force-pushed the mongo-db-chat-memory branch from 2d88035 to 76752cf Compare April 10, 2025 12:47
@deejay1 deejay1 marked this pull request as ready for review April 10, 2025 12:48
@deejay1 deejay1 requested a review from xchopin April 11, 2025 08:42
@deejay1 deejay1 force-pushed the mongo-db-chat-memory branch from 8321e4d to 14375f0 Compare April 14, 2025 09:49
@deejay1 deejay1 requested review from eddumelendez and xchopin April 14, 2025 09:50
@deejay1 deejay1 force-pushed the mongo-db-chat-memory branch 2 times, most recently from 290cacf to 78ad992 Compare April 16, 2025 07:44
@Amine-Kadi
Copy link

I feel like it could be better to have only Mongo instead of MongoDb in all classes names.
For example : MongoDbChatMemoryProperties.java could be named MongoChatMemoryPropoerties.java.

It would follow the same logic as all classes in org.springframework.data.mongodb (MongoTemplate and not MongoDbTemplate)

@deejay1 deejay1 force-pushed the mongo-db-chat-memory branch 2 times, most recently from 249380d to e483254 Compare April 17, 2025 14:25
@deejay1
Copy link
Contributor Author

deejay1 commented Apr 17, 2025

I feel like it could be better to have only Mongo instead of MongoDb in all classes names. For example : MongoDbChatMemoryProperties.java could be named MongoChatMemoryPropoerties.java.

It would follow the same logic as all classes in org.springframework.data.mongodb (MongoTemplate and not MongoDbTemplate)

Good idea to keep it in sync. Implemented

@deejay1 deejay1 force-pushed the mongo-db-chat-memory branch from e483254 to 44d84c2 Compare April 17, 2025 14:26
@deejay1
Copy link
Contributor Author

deejay1 commented Apr 21, 2025

This will probably be reimplemented tomorrow atop of #2803

@ThomasVitale
Copy link
Contributor

@deejay1 thanks so much for your contribution! 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. For example, the JdbcChatMemory has now been superseded by JdbcChatMemoryRepository. It would be great if we could use the new approach directly for MongoDB. What do you think?

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

@deejay1
Copy link
Contributor Author

deejay1 commented Apr 26, 2025

@ThomasVitale sure, I'll rewrite it of course!

@deejay1 deejay1 force-pushed the mongo-db-chat-memory branch 2 times, most recently from f3d3324 to 73ea405 Compare April 28, 2025 11:00
@deejay1
Copy link
Contributor Author

deejay1 commented Apr 28, 2025

@ThomasVitale ok, rewritten into a ChatMemoryRepository implementation

@deejay1 deejay1 requested a review from Amine-Kadi April 28, 2025 11:01
@deejay1 deejay1 force-pushed the mongo-db-chat-memory branch 2 times, most recently from 68c5cfc to 71e7584 Compare May 5, 2025 08:34
@deejay1
Copy link
Contributor Author

deejay1 commented May 5, 2025

@ThomasVitale any chances to get it in before 1.0.0?

@deejay1 deejay1 force-pushed the mongo-db-chat-memory branch 2 times, most recently from a5081dd to 451790f Compare May 12, 2025 09:42
@deejay1 deejay1 force-pushed the mongo-db-chat-memory branch from e50f396 to 434a168 Compare May 22, 2025 10:49
@deejay1
Copy link
Contributor Author

deejay1 commented May 26, 2025

@xchopin @eddumelendez Could you take a look again?

@deejay1 deejay1 force-pushed the mongo-db-chat-memory branch 2 times, most recently from 38a333c to 2be862b Compare June 3, 2025 09:02
@deejay1 deejay1 force-pushed the mongo-db-chat-memory branch from 2be862b to 9be5f4d Compare June 11, 2025 08:24
@juzerali
Copy link

@xchopin any update on getting this merged? I am kinda blocked on this.

@deejay1 deejay1 force-pushed the mongo-db-chat-memory branch from 9be5f4d to 3651245 Compare June 30, 2025 10:37
@markpollack markpollack added the enhancement New feature or request label Jul 11, 2025
@Amine-Kadi
Copy link

Would be nice to have this feature in 1.1.0

@deejay1 deejay1 force-pushed the mongo-db-chat-memory branch from 84eb268 to 6714c30 Compare August 26, 2025 18:31
@deejay1
Copy link
Contributor Author

deejay1 commented Sep 4, 2025

@markpollack Can I bump this a little? ;)

@deejay1 deejay1 force-pushed the mongo-db-chat-memory branch 7 times, most recently from ebde7fa to d662788 Compare September 23, 2025 15:24
@ilayaperumalg ilayaperumalg added this to the 1.1.0.M3 milestone Sep 24, 2025
@deejay1 deejay1 force-pushed the mongo-db-chat-memory branch 2 times, most recently from 9275fb9 to dd5f08b Compare October 9, 2025 18:18
@deejay1
Copy link
Contributor Author

deejay1 commented Oct 10, 2025

@ilayaperumalg any chances this also gets merged? we're using it successfully in prod for a while now (since April to be exact ;)

@deejay1 deejay1 force-pushed the mongo-db-chat-memory branch from dd5f08b to 55f7519 Compare October 13, 2025 17:47
@deejay1 deejay1 force-pushed the mongo-db-chat-memory branch from 55f7519 to 74a39de Compare October 13, 2025 17:49
@markpollack markpollack modified the milestones: 1.1.0.M3, 1.1.0.M4 Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request mongo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create MongoDB chat memory

9 participants