lobehub / lobe-chat

🤯 Lobe Chat - an open-source, modern-design AI chat framework. Supports Multi AI Providers( OpenAI / Claude 3 / Gemini / Ollama / Azure / DeepSeek), Knowledge Base (file upload / knowledge management / RAG ), Multi-Modals (Vision/TTS) and plugin system. One-click FREE deployment of your private ChatGPT/ Claude application.
https://chat-preview.lobehub.com
Other
40.24k stars 9.14k forks source link

[Request] Support external database, for self-hosted version #1573

Closed jasongitmail closed 2 months ago

jasongitmail commented 5 months ago

🥰 Feature Description

Using IndexDB browser storage has a couple limitations:

  1. User's data could get deleted by clearing the browser's site data.
  2. Chat history, agents, settings, etc are not available across devices–e.g. laptop and mobile.

The option to connect a hosted, serverless-compatible database would solve this, e.g.:

VercelSQL (based on NeonDB) & NeonDB (based on Postgres) both support vector embeddings, which would allow for RAG too.

🧐 Proposed Solution

This would require user authentication.

This way if the browser's site data is cleared, no chat history or agents are lost and it can be shared across devices; only the API keys would need to be re-entered.

📝 Additional Information

No response

lobehubbot commented 5 months ago

👀 @jasongitmail

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. Please make sure you have given us as much context as possible.\ 非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

andrewluetgers commented 5 months ago

this would be nice

julianbrennum commented 4 months ago

Yes, this would be nice. But I don't think it need to be serverless. MongoDB, Postgres etc would be fine. It would also be nice if the "login" interface was the first thing the user was getting if they are not logged in.

jasongitmail commented 4 months ago

But I don't think it need to be serverless. MongoDB, Postgres etc would be fine.

@julianbrennum The repo suggests Vercel or Docker for hosting currently. While you're correct for those who choose to use Docker for deployment on a regular server, others who use Vercel need a DB that provides an HTTP interface, since serverless hosts can't reliably maintain long-lived connections to a DB. But there are providers of Mongo and Postgres (and others) that meet that requirement (e.g. Neon for Postgres)

AdamsGH commented 3 months ago

Yes, this would be nice. But I don't think it need to be serverless. MongoDB, Postgres etc would be fine. It would also be nice if the "login" interface was the first thing the user was getting if they are not logged in.

Fully agree with you, really miss login button and spent some time to find it

lobehubbot commented 2 months ago

✅ @jasongitmail

This issue is closed, If you have any questions, you can comment and reply.\ 此问题已经关闭。如果您有任何问题,可以留言并回复。

arvinxx commented 2 months ago

Database Server DB Guide:https://lobehub.com/docs/self-hosting/advanced/server-database

lobehubbot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Database Server DB Guide:https://lobehub.com/docs/self-hosting/advanced/server-database

lobehubbot commented 2 months ago

:tada: This issue has been resolved in version 1.0.8 :tada:

The release is available on:

Your semantic-release bot :package::rocket: