Closed BiFangKNT closed 1 week ago
👀 @BiFangKNT
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。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
📦 Deployment environment
Docker
lobehub/lobe-chat-database:1.15.26
Other Linux
Chrome
After refreshing the web page after the conversation, or simply switching the conversation, the conversation content will disappear.
dialogue: Switch the conversation:
No errors are reported for each container
docker-compose is as follows:
services:
postgresql:
image: pgvector/pgvector:pg16
container_name: lobe-postgres
ports:
- '5454:5432'
volumes:
- './data:/var/lib/postgresql/data'
environment:
- 'POSTGRES_DB=lobe'
- 'POSTGRES_PASSWORD=(placeholder)'
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 5s
timeout: 5s
retries: 5
restart: always
minio:
image: minio/minio
container_name: lobe-minio
ports:
- '19000:9000'
- '19001:9001'
volumes:
- './s3_data:/data'
environment:
- 'MINIO_ROOT_USER=(placeholder)'
- 'MINIO_ROOT_PASSWORD=(placeholder)'
- 'MINIO_DOMAIN=minio. (placeholder)'
- 'MINIO_API_CORS_ALLOW_ORIGIN=https://lobechat. (placeholder)' # Your LobeChat's domain name.
restart: always
command: >
server /data --address ":9000" --console-address ":9001"
lobe:
image: lobehub/lobe-chat-database
container_name: lobe-database
ports:
- '3210:3210'
volumes:
- '/volume1/docker/lobechat/resolv.conf:/etc/resolv.conf'
depends_on:
-postgresql
- minio
#-logto
env_file:
- .env
restart: always
volumes:
data:
driver:local
s3_data:
driver: local
.env is as follows:
# Required, LobeChat domain name, used for tRPC calls
# Please ensure that this domain name is in the CORS whitelist of your NextAuth authentication service provider and S3 service provider
APP_URL=https://lobechat.(placeholder)/
# Postgres related, that is, DB necessary environment variables
# Required, the key used to encrypt sensitive information can be generated using openssl rand -base64 32
KEY_VAULTS_SECRET= (placeholder)
#Required, Postgres database connection string, used to connect to the database
# Format: postgresql://username:password@host:port/dbname, if your pg instance is a Docker container and is located in the same docker-compose file, you can also use the container name as host
DATABASE_URL=postgresql://postgres: (placeholder)@192.168.5.8:5454/lobe
# NEXT_AUTH related, that is, the environment variable necessary for the authentication service
# You can use auth0, Azure AD, GitHub, Authentik, Zitadel, Logto, etc. If you have other access requirements, please submit a PR.
# For currently supported authentication service providers, please refer to: https://lobehub.com/zh/docs/self-hosting/advanced/auth#next-auth
# If you have ACCESS_CODE, be sure to clear it. We use NEXT_AUTH as the only authentication source.
# Required, the key used for NextAuth can be generated using openssl rand -base64 32
NEXT_AUTH_SECRET= (placeholder)
# Required, specify the authentication service provider, take Logto as an example here
NEXT_AUTH_SSO_PROVIDERS=cloudflare-zero-trust
# Required, NextAuth URL, used for NextAuth callback
NEXTAUTH_URL=https://lobechat.(placeholder)/api/auth
# NextAuth authentication service provider part, taking Logto as an example
# For other environment variables required by authentication service providers, please refer to: https://lobehub.com/zh/docs/self-hosting/environment-variables/auth
CLOUDFLARE_ZERO_TRUST_CLIENT_ID= (placeholder)
CLOUDFLARE_ZERO_TRUST_CLIENT_SECRET= (placeholder)
CLOUDFLARE_ZERO_TRUST_ISSUER=https://(placeholder).cloudflareaccess.com/cdn-cgi/access/sso/oidc/(placeholder)
# Proxy related, if you need it (for example, if you use GitHub as the authentication service provider)
# HTTP_PROXY=http://localhost:7890
# HTTPS_PROXY=http://localhost:7890
# S3 related, that is, environment variables necessary for storing unstructured data (files, pictures, etc.)
# Here we take MinIO as an example
# Required, the Access Key ID of S3 is invalid for MinIO until it is manually created in the MinIO UI
S3_ACCESS_KEY_ID= (placeholder)
# Required, the Secret Access Key of S3 is invalid for MinIO until it is manually created in the MinIO UI.
S3_SECRET_ACCESS_KEY= (placeholder)
# Required, S3 Endpoint, used for server/client to connect to S3 API
S3_ENDPOINT=https://minio. (placeholder)
# Required, S3 Bucket is invalid until manually created in MinIO UI
S3_BUCKET=lobe
# Required, Public Domain of S3, used for clients to access unstructured data through public connections
S3_PUBLIC_DOMAIN=https://minio. (placeholder)
# Optional, S3’s Enable Path Style
# For mainstream S3 Cloud service providers, generally fill in 0; for self-deployed MinIO, please fill in 1
# Please refer to: https://lobehub.com/zh/docs/self-hosting/advanced/s3#s-3-enable-path-style
S3_ENABLE_PATH_STYLE=1
# Other basic environment variables, depending on needs. Be careful not to have ACCESS_CODE
# Please refer to: https://lobehub.com/zh/docs/self-hosting/environment-variables/basic
# Please note that for the server version, its API must support the embedded (i.e. OpenAI text-embedding-3-small) model, otherwise the uploaded file cannot be processed, but you do not need to specify this model in OPENAI_MODEL_LIST
OPENAI_API_KEY= (placeholder)
OPENAI_PROXY_URL=https://api.chatanywhere.tech/v1
DEEPSEEK_API_KEY= (placeholder)
ZHIPU_API_KEY= (placeholder)
# OPENAI_MODEL_LIST=...
as mentioned above
Keep conversation normally
No response
I found some similar issues and discussions that might be relevant to your problem:
To ensure that conversations are retained after refreshing the webpage or switching chats in LobeChat, you can rely on the fact that all chat records are stored in your local browser. This means that redeploying LobeChat using Docker will not result in the loss of your chat records [4][5].
Additionally, LobeChat's integration with PostgreSQL and MinIO ensures the persistence and retrieval of chat data. PostgreSQL handles structured data like chat messages and user information, while MinIO manages unstructured data like file uploads and images. Both services are configured to store data in local volumes, ensuring persistence across container restarts [6][7][8].
Make sure your Docker and environment configurations are correctly set up to support these features. If the issue persists, you might want to check for any errors in the browser console or Docker logs that could provide more insights.
To continue talking to Dosu, mention @dosu.
✅ @BiFangKNT
This issue is closed, If you have any questions, you can comment and reply.\ 此问题已经关闭。如果您有任何问题,可以留言并回复。
是我犯糊涂了,原来消息列表在右边,左边的是类似于面具的列表,切换左边的助手会新建对话,造成了一种对话消息不会保存的错觉🤣🤣
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
I was confused. It turns out that the message list is on the right, and the left is a list similar to a mask. Switching the assistant on the left will create a new conversation, which creates the illusion that the conversation messages will not be saved🤣🤣
📦 部署环境
Docker
📌 软件版本
lobehub/lobe-chat-database:1.15.26
💻 系统环境
Other Linux
🌐 浏览器
Chrome
🐛 问题描述
对话完刷新网页,或者单纯是切换一下对话,对话内容都会消失
对话: 切换一下对话:
各容器没有报错
docker-compose如下:
.env如下:
📷 复现步骤
如上所述
🚦 期望结果
正常保留对话
📝 补充信息
No response