Skip to content
Discussion options

You must be logged in to vote

Thanks for bearing with me here! This template has now been updated to AI SDK 5 and now uses a much more robust and scalable persistence pattern. I have done my best to optimise performance where possible. Please do let me know feedback and how we can make this better.

For a TLDR of the new pattern, please see the README.


So what changed?

Previously, we were storing chats and messages. This was simple, but parts were stored as a jsonb() column. This obviously presented data integrity and migration issues.

Prefix-based part storage

To resolve this, we've moved to a prefix-based approach for storing message parts directly in the database schema. Instead of using a flexible but problematic …

Replies: 14 comments 59 replies

Comment options

You must be logged in to vote
6 replies
@hewliyang
Comment options

@zbeyens
Comment options

@beamercola
Comment options

@zhm
Comment options

@zhm
Comment options

Comment options

You must be logged in to vote
1 reply
@dir
Comment options

Comment options

You must be logged in to vote
1 reply
@mattpocock
Comment options

Comment options

You must be logged in to vote
3 replies
@mattpocock
Comment options

@ElectricCodeGuy
Comment options

@gauravvgat
Comment options

Comment options

You must be logged in to vote
1 reply
@miketromba
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@zachrip
Comment options

@hoanginc144
Comment options

@MatheusDubin
Comment options

@michaelv-greenlite
Comment options

@michaelv-greenlite
Comment options

Comment options

You must be logged in to vote
5 replies
@miketromba
Comment options

@dskoda1
Comment options

@gauravvgat
Comment options

@mattpocock
Comment options

@miketromba
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
9 replies
@dskoda1
Comment options

@dskoda1
Comment options

@dskoda1
Comment options

@apferrarone
Comment options

@dskoda1
Comment options

Comment options

You must be logged in to vote
2 replies
@robertlong
Comment options

@lazakrisz
Comment options

Comment options

You must be logged in to vote
8 replies
@TheSlavant
Comment options

@TheSlavant
Comment options

@nicoalbanese
Comment options

@TheSlavant
Comment options

@lgrammel
Comment options

Comment options

You must be logged in to vote
9 replies
@qantrepreneur
Comment options

@nicoalbanese
Comment options

@qantrepreneur
Comment options

@jmreidy
Comment options

@nicoalbanese
Comment options

Comment options

You must be logged in to vote
9 replies
@ardblok
Comment options

@niels-bosman
Comment options

@robertlong
Comment options

@bestickley
Comment options

@grmkris
Comment options

Answer selected by nicoalbanese
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet