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.69k stars 9.27k forks source link

[Bug] Auto Generate Assistant Information issues #3639

Open heltonteixeira opened 2 weeks ago

heltonteixeira commented 2 weeks ago

📦 Environment

Vercel

📌 Version

1.14.3

💻 Operating System

Windows

🌐 Browser

Chrome

🐛 Bug Description

The Auto Generate isn't using the correct language to do the requests, making the response be in the incorrect language. Sometimes it didn't show any response at all, and a infinite loading animation appears on the field.

https://github.com/user-attachments/assets/e21612b4-3e7c-4d03-bb86-14195d803b76

Auto Icon displaying the prompt response in the place of the icon

https://github.com/user-attachments/assets/82ba12b9-091c-41af-81ca-915eef973b57

Auto Icon didn't received the response. This happens with others fields as well

https://github.com/user-attachments/assets/eaf6442b-8455-463b-96f9-bbd0033ba41c

Auto Generate response in Chinese instead of English

📷 Recurrence Steps

  1. Open an assistant session settings
  2. Click on Auto Generate button
  3. Check the generated Assistant fields

🚦 Expected Behavior

The Auto Generate should use the selected language in the settings.

📝 Additional Information

The issue is seems to be random, models like gpt4o and claude3.5-sonnet tend to better handle the request in chinese and answering it in the correct language, but model like gemini-1.5turbo, llama3.1 70b, gemma2 9b and others, sometimes ignore the language that should be used. Another issue related with the Auto Generate is that sometimes a response is placed inside the icons field, or it add invisble break symbols in the title and description.

This is the completion request of one of the Auto Generate requests

{
  "model": "llama-3.1-70b-versatile",
  "stream": true,
  "frequency_penalty": 0,
  "presence_penalty": 0,
  "temperature": 0.6,
  "top_p": 1,
  "messages": [
    {
      "content": "你是一名擅长会话标签总结的助理,你需要将用户的输入的内容提炼出分类标签,使用`,`分隔,不超过 5 个标签,并翻译为目标语言。 格式要求如下:\n输入: {文本作为JSON引用字符串} [locale]\n输出: {标签}",
      "role": "system"
    },
    {
      "content": "输入: {你是一名文案大师,帮我为一些设计 / 艺术作品起名,名字需要有文学内涵,注重精炼和赋子意境,表达作品的情景氛国,使名称既简洁又富有诗意。} [zh-CN]",
      "role": "user"
    },
    {
      "content": "起名,写作,创意",
      "role": "assistant"
    },
    {
      "content": "输入: {You are a professional translator proficient in Simplified Chinese, and have participated in the translation work of the Chinese versions of The New York Times and The Economist. Therefore, you have a deep understanding of translating news and current affairs articles. I hope you can help me translate the following English news paragraphs into Chinese, with a style similar to the Chinese versions of the aforementioned magazines.} [zh-CN]",
      "role": "user"
    },
    {
      "content": "翻译,写作,文案",
      "role": "assistant"
    },
    {
      "content": "输入: {你是一名创业计划撰写专家,可以提供包括创意名称、简短的标语、目标用户画像、用户痛点、主要价值主张、销售/营销渠道、收入流、成本结构等计划生成。} [en-US]",
      "role": "user"
    },
    {
      "content": "entrepreneurship,planning,consulting",
      "role": "assistant"
    },
    {
      "content": "输入: {...,...,You are a fact-based AI assistant. Respond only with verified, accurate information from reliable sources. Avoid speculation, opinions, or unsubstantiated claims. If you lack verified information on a topic, state \"I don't have verified information on that.\" Keep answers concise and to the point. Prioritize brevity without sacrificing accuracy. Always cite sources when possible.} [en-US]",
      "role": "user"
    }
  ]
}
lobehubbot commented 2 weeks ago

👀 @heltonteixeira

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

ShinChven commented 3 days ago

I have the same issue here. Switching to gemini pro models fixed it.

heltonteixeira commented 2 days ago

I have the same issue here. Switching to gemini pro models fixed it.

I have this issue on any model, it's inconsistent, some times work, sometimes don't.