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
41.22k stars 9.37k forks source link

[Bug] 随便聊聊自带系统提示词 #4035

Open lirtual opened 3 days ago

lirtual commented 3 days ago

📦 部署环境

Vercel

📌 软件版本

v1.19.7

💻 系统环境

Windows

🌐 浏览器

Edge

🐛 问题描述

image image

搭建的版本是,vercel db server版本,偶然发现随便聊聊请求会带上系统提示词,提示词取是固定选用了我自定义的一个助手的系统提示词,不是每次随机变更一个助手的提示词,具体规律不清楚

📷 复现步骤

每次打开随便聊聊聊天就自带系统提示词

🚦 期望结果

随便聊聊无系统提示词

📝 补充信息

lobehubbot commented 3 days ago

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


📦 Deployment environment

Vercel

📌 Software version

v1.19.7

💻 System environment

Windows

🌐 Browser

Edge

🐛 Problem description

image image

The version I built is the vercel db server version. I accidentally discovered that a casual chat request will bring a system prompt word. The prompt word is the system prompt word of an assistant I customized. It is not a random change of an assistant's prompt every time. words, the specific rules are unclear

📷 Steps to reproduce

Every time you open Casual Chat, a system prompt will appear.

🚦 Expected results

Chat casually without system prompt words

📝 Supplementary information

lobehubbot commented 3 days ago

👀 @lirtual

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。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

dosubot[bot] commented 3 days ago

@lirtual 你好!我是 Dosu,我是一个能够帮助你解决 bug、回答问题并成为贡献者的机器人。在等待人类维护者的过程中,我会尽力帮助你解决问题。

I found a similar unsolved discussion that might be relevant to your issue: [Request] 更改“新建助手”“随便聊聊”逻辑 [1].

Regarding your issue with the system prompt in '随便聊聊' (Random Chat) being fixed rather than randomized, here are some insights:

  1. System Prompt Definition: The system prompt for '随便聊聊' is defined in the locales/zh-CN/chat.json file:

    
    {
      "inbox": {
        "desc": "开启大脑集群,激发思维火花。你的智能助理,在这里与你交流一切",
        "title": "随便聊聊"
      }
    }
    ``` <sup>[[2]](https://github.com/lobehub/lobe-chat/blob/main/locales/zh-CN/chat.json)</sup>.
  2. Configuration and Behavior: The behavior of system prompts can be influenced by various configuration files. For example, the locales/zh-CN/chat.json and locales/zh-CN/setting.json files contain default messages and settings that control the behavior of system prompts [2][3].

  3. Environment Variables: In the Vercel deployment, certain environment variables can influence the behavior of system prompts. Ensure that the ACCESS_CODE is unset or cleared and that NEXT_PUBLIC_SERVICE_MODE is set to server [4][5].

  4. Randomization Mechanism: There is no specific mechanism mentioned in the repository for randomizing the system prompt for '随便聊聊' each time a new session is started. This might require a custom implementation if randomization is desired.

To address your issue, you might want to check the configuration files and environment variables in your Vercel deployment. If the problem persists, consider implementing a custom solution to randomize the system prompt if that is a requirement for your use case.

To continue talking to Dosu, mention @dosu.

arvinxx commented 3 days ago

你改了默认助手的提示词吧?

lobehubbot commented 3 days ago

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


Have you changed the default assistant prompt word?

lirtual commented 3 days ago

你改了默认助手的提示词吧?

是的,我改了默认助手的提示词,但是随便聊聊提示词不是默认助手的提示词。

lobehubbot commented 3 days ago

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


Have you changed the default assistant prompt word?

Yes, I changed the default assistant prompt word, but the casual chat prompt word is not the default assistant prompt word.

lirtual commented 3 days ago

你改了默认助手的提示词吧?

另外我其实也试过将默认助手的提示词删掉,也还是一样有这个问题

lobehubbot commented 3 days ago

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


Have you changed the default assistant prompt word?

In addition, I actually tried to delete the prompt words of the default assistant, but I still have the same problem.

gzxyls commented 3 days ago

我和你有一样的问题

lobehubbot commented 3 days ago

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


I have the same problem as you

shog86 commented 21 hours ago

说起来我也遇到过这个问题

lobehubbot commented 21 hours ago

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


Speaking of which, I've also encountered this problem.