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

在回车输入按钮处,添加一个“继续”按钮 #1379

Open JBJSW opened 7 months ago

JBJSW commented 7 months ago

🥰 需求描述

Regarding GPT-4, even for the 0125 version, OpenAI's official website has imposed restrictions on its output. According to the website, the maximum input for a single response is 4096 tokens, as shown in the image below: image


However, there are many instances, such as in translation projects, where it's necessary to produce outputs exceeding 4096 tokens. This requires frequently entering "continue" in the input box to prompt the model to keep responding, which is quite cumbersome and far from elegant.

🧐 解决方案

Like LibreHub, implement a "Continue" button. When a reply gets cut off, clicking the button or simply using a shortcut key can accomplish the aforementioned task.

📝 补充信息

No response

lobehubbot commented 7 months ago

👀 @JBJSW

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

arvinxx commented 7 months ago

That's a good idea

mingyue0094 commented 6 months ago

继续按钮在对话页面,这有些多余吧。因为,继续或者不继续,切换的并不频繁。 一般的日常对话,不需要继续。 长输出,才需要。使用lobe-chat的有一部分人一般都不会用继续。 所以,继续按钮,放到 发送页面,感觉不太好。

特意做按钮的话。我认为。 继续按钮,放到 设置 页面。外观上好看些,因为,我是不常用 。。

或者,发送按钮,不做任何修改,在点击发送按钮时,判断输入框是否有内容。没内容,那么就发送”继续“ 到接口。

lobehubbot commented 6 months ago

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


The continue button is on the conversation page, which is a bit redundant. Because the switch between continuing or not continuing is not frequent. Normal daily conversation, no need to continue. Only needed for long output. Some people who use lobe-chat generally don't use it. So, it doesn't feel good to put the continue button on the send page.

If you make a button specially. I think. Continue button to the Settings page. It looks better in appearance, because I don't use it often. .

Or, Send button, without making any modifications, when clicking the Send button, determine whether the input box has content. If there is no content, then send "continue" to the interface.

mingyue0094 commented 6 months ago

可以结合,上面的2个做法。

  1. 先在设置页面 -- 通用 -- 增加一个 可选项 ”输入空则继续“ .
  2. 当开启这个选项。 那么在发送消息页面,如果输入框是空,直接点击发送按钮,则发送 ’继续‘ 到接口

这样好像挺不错的。 因为如果做 自动发送继续 相关的,感觉是否要继续的 规则要经常的维护更新,很容易失效。 上面这样做,不需要去维护判断是否要发送继续的规则

lobehubbot commented 6 months ago

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


You can combine the above two methods.

  1. First go to the settings page - General - and add an option "Enter empty to continue".
  2. When turning on this option. Then on the message sending page, if the input box is empty, click the send button directly and send 'continue' to the interface.

This seems pretty good. Because if you do something related to automatic sending and continuation, the rules for whether you want to continue need to be maintained and updated frequently, which can easily become invalid. By doing the above, there is no need to maintain the rules for determining whether to send a continuation.

arvinxx commented 6 months ago

可以收在发送按钮边上的下拉菜单里的。

lobehubbot commented 6 months ago

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


It can be collected in the drop-down menu next to the send button.

jcdiv47 commented 6 months ago

When a reply gets cut off, clicking the button or simply using a shortcut key can accomplish the aforementioned task.

In order to determine if the response is getting cut off, I think we can compare the output's total tokens number(available in OpenAI compatible API response and many others) to the max_tokens for the corresponding model. Maybe only show the continue button if that is the case. I am not the expert though so I was not sure if it applies here.

arvinxx commented 6 months ago

In order to determine if the response is getting cut off, I think we can compare the output's total tokens number(available in OpenAI compatible API response and many others) to the max_tokens for the corresponding model.

But we have lots of ai provders now. It may not be compatible with other providers.

xbtachlb commented 5 months ago

Totally agree