Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 某些情况下随便聊聊历史消息限制自动启用且置为8 #6870

Open
Sun-drenched opened this issue Mar 10, 2025 · 5 comments
Labels
🐛 Bug Something isn't working | 缺陷

Comments

@Sun-drenched
Copy link

Sun-drenched commented Mar 10, 2025

📦 部署环境

Docker

📦 部署模式

服务端模式(lobe-chat-database 镜像)

📌 软件版本

最新

💻 系统环境

Windows

🌐 浏览器

Chrome

🐛 问题描述

如题,触发场景包括但不限于容器重启/新容器创建后;有时一段时间未使用后,再次通过/chat进入界面时也会发现随便聊聊历史消息限制自动启用且置为8

📷 复现步骤

No response

🚦 期望结果

至少容器重启/新容器启动(更新)后随便聊聊等助手的历史消息限制不自动启用且置为8(遵循既有设置)

📝 补充信息

No response

@Sun-drenched Sun-drenched added the 🐛 Bug Something isn't working | 缺陷 label Mar 10, 2025
@github-project-automation github-project-automation bot moved this to Roadmap - Chat 1.x in Lobe Chat Routine Mar 10, 2025
Copy link

dosubot bot commented Mar 10, 2025

The issue you're experiencing, where the chat history limit automatically enables and sets to 8 after a container restart or new container creation, might be related to the default configuration settings or scripts that override user settings during initialization.

  1. Chat History Limit Configuration: The chat history limit is managed by the historyCount function in the chatConfig.ts file, which retrieves the historyCount from the chatConfig or defaults to DEFAULT_AGENT_CHAT_CONFIG.historyCount if not specified [1].

  2. Environment Variables and Scripts: The setup.sh script can modify configuration files and environment variables during container initialization, potentially overriding user settings [2]. Ensure that your environment variables are correctly set and that the script does not reset them.

  3. Persistence Across Restarts: Check if your Docker setup includes volume mapping to persist settings across restarts. This is crucial for maintaining configurations like chat history limits [3].

Review these areas to ensure your settings are retained as expected. If the issue persists, you might need to adjust the initialization scripts or environment configurations to prevent automatic changes.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@Sun-drenched Sun-drenched changed the title [Bug] 容器重启/新容器创建后随便聊聊历史消息限制自动启用且置为8 [Bug] 某些情况下随便聊聊历史消息限制自动启用且置为8 Mar 10, 2025
@bbbugg
Copy link
Contributor

bbbugg commented Mar 10, 2025

在环境变量里改了吗,chatConfig.historyCount

@lv4lv
Copy link

lv4lv commented Mar 11, 2025

+1
这个是最近几个版本出现的bug,不限于随便聊聊,而是任何助手
具体是:
变更助手模型、开关联网搜索等操作后,此助手的历史消息限制自动启用且置为2、8、自动总结历史消息、关闭思考强度设置

@ymefg
Copy link
Contributor

ymefg commented Mar 12, 2025

+1
几个月前我曾经遇到过这种情况,但当时应该是修好了,很久没遇到过了。
但是最近经常莫名其妙历史消息就被限制成8了,我是用 Vercel 部署的。

@canisminor1990
Copy link
Member

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


+1
I encountered this situation a few months ago, but it should have been fixed at that time, and I haven't encountered it for a long time.
However, recently, historical news has been limited to 8 for no reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷
Projects
Status: Roadmap - Chat 1.x
Development

No branches or pull requests

6 participants
@Sun-drenched @canisminor1990 @ymefg @lv4lv @bbbugg and others