lobe-chat icon indicating copy to clipboard operation
lobe-chat copied to clipboard

[Question] 对话很慢,非常慢,比我本地部署的chatglm还慢

Open taurusduan opened this issue 2 years ago • 12 comments

🧐 问题描述 | Proposed Solution

不知道为什么对话速度非常慢,同一个代理和key,在其他平台速度差不多,但是在lobechat上一个提问差不多要一分钟左右,不知道大家有没有遇到这个问题。

📝 补充信息 | Additional Information

image

taurusduan avatar Dec 23 '23 05:12 taurusduan

👀 @taurusduan

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

lobehubbot avatar Dec 23 '23 05:12 lobehubbot

我看了下请求,是走lobe中转的请求, 不知道为啥这样设计。其他程序比如next web都是客户本地直接请求api的。这个应该是慢的主要原因

suwubee avatar Dec 23 '23 10:12 suwubee

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


I looked at the request and it was a request for lobe transfer. I don’t know why it was designed this way. Other programs such as Next Web directly request the API locally from the customer. This should be the main reason for the slowness

lobehubbot avatar Dec 23 '23 10:12 lobehubbot

我看了下请求,是走lobe中转的请求, 不知道为啥这样设计。其他程序比如next web都是客户本地直接请求api的。这个应该是慢的主要原因

https://github.com/lobehub/lobe-chat/discussions/728

arvinxx avatar Dec 23 '23 10:12 arvinxx

我看了下请求,是走lobe中转的请求, 不知道为啥这样设计。其他程序比如next web都是客户本地直接请求api的。这个应该是慢的主要原因

#728

意思是说不管我用没用中转,都会走一遍他们的中转。而且如果我是国内中转,说不定比不用中转还慢。。。

taurusduan avatar Dec 23 '23 12:12 taurusduan

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


I looked at the request and it was a request for lobe transfer. I don’t know why it is designed like this. Other programs such as Next Web directly request the API locally from the customer. This should be the main reason for the slowness

#728

This means that regardless of whether I use transfer or not, I will go through their transfer. And if I am transferring domestically, it might be slower than not having to transfer at all. . .

lobehubbot avatar Dec 23 '23 12:12 lobehubbot

我看了下请求,是走lobe中转的请求, 不知道为啥这样设计。其他程序比如next web都是客户本地直接请求api的。这个应该是慢的主要原因

#728

意思是说不管我用没用中转,都会走一遍他们的中转。而且如果我是国内中转,说不定比不用中转还慢。。。

如果你自己搭建的程序,走的是自己的服务器。这个我也是才知道,其实对大多数用户来说没必要。反而增加了数据风险。等啥时候改回本地请求了我再用了。。。

suwubee avatar Dec 23 '23 12:12 suwubee

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


I looked at the request and it was a request for lobe transfer. I don’t know why it was designed this way. Other programs such as Next Web directly request the API locally from the customer. This should be the main reason for the slowness

#728

This means that regardless of whether I use transfer or not, I will go through their transfer. And if I am transferring domestically, it might be slower than not having to transfer at all. . .

If you build the program yourself, you will use your own transfer. I just learned about this, but it is actually not necessary for most users. On the contrary, it increases data risks. I will use it again when I change it back to local request. . .

lobehubbot avatar Dec 23 '23 12:12 lobehubbot

如果你自己搭建的程序,走的是自己的服务器。这个我也是才知道,其实对大多数用户来说没必要。反而增加了数据风险。

@suwubee 对于大部分用户来说,使用 LobeChat 都是在部署的时候配置的 api-key。这个时候请求走服务端是合理的,因为 api-key 就在服务端。如果要求把 api-key 从服务端发送到客户端,然后再从客户端发送请求,这反而是不合理的行为。

只有纯前端使用(即 api key 是用户在前端填写的),这种时候才适合只在前端发送请求,这样也能兼容纯本地 LLM 使用的场景。计划会在 #737 中支持。

arvinxx avatar Dec 24 '23 10:12 arvinxx

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


If you build the program yourself, use your own server. I just learned about this, but it is actually not necessary for most users. On the contrary, it increases data risks.

For most users, the api-key is configured during deployment when using LobeChat. It is reasonable to request the server at this time, because the api-key is on the server. If it is required to send the api-key from the server to the client, and then send a request from the client, this is unreasonable behavior.

Only for pure front-end use (that is, the api key is filled in by the user on the front-end), it is suitable to only send requests on the front-end, which is also compatible with scenarios where pure local LLM is used. Planned support in #737.

lobehubbot avatar Dec 24 '23 10:12 lobehubbot

close 错了

arvinxx avatar Jan 05 '24 06:01 arvinxx

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


close is wrong

lobehubbot avatar Jan 05 '24 06:01 lobehubbot

从原始描述来看,可能是流式返回的问题,试试:https://github.com/lobehub/lobe-chat/discussions/531

arvinxx avatar Mar 26 '24 08:03 arvinxx

✅ @taurusduan

This issue is closed, If you have any questions, you can comment and reply.
此问题已经关闭。如果您有任何问题,可以留言并回复。

lobehubbot avatar Mar 26 '24 08:03 lobehubbot