Nextcloud has some neural network integrations so implementing something like that might be possible. The Memories app can already use the Recognize app for the smart tags for Photos.
Combining it with "The Search Page" app makes it a quite comfortable experience as is.
How easy are these integrations to setup? I use straight up Nextcloud sync and while it works most of the time sometimes it's a little finnicky (when I don't have cell service or something like that)
I belive the existing integrations typically use Openai compatible api's and just need a seperate docker image or bare metal deployment for the local instances.
Other than that it's just installing a Nextcloud app and pluging in a URL and API key
Combining it with "The Search Page" app makes it a quite comfortable experience as is.