Deeptrain-Community / chatnio

🚀 Next Generation AI One-Stop Internationalization Solution. 🚀 下一代 AI 一站式 B/C 端解决方案,支持 OpenAI,Midjourney,Claude,讯飞星火,Stable Diffusion,DALL·E,ChatGLM,通义千问,腾讯混元,360 智脑,百川 AI,火山方舟,新必应,Gemini,Moonshot 等模型,支持对话分享,自定义预设,云端同步,模型市场,支持弹性计费和订阅计划模式,支持图片解析,支持联网搜索,支持模型缓存,丰富美观的后台管理与仪表盘数据统计。
https://chatnio.com
Apache License 2.0
2.71k stars 446 forks source link

关于同一个会话中更换模型回答之后刷新页面又变为最初的模型 #205

Closed dqzboy closed 4 weeks ago

dqzboy commented 1 month ago

在同一个会话里面,比如我第一次对话使用的是gpt3.5,中间切换为gpt4继续对话,但是我重新刷新页面或者重新打开网站,这个会话的模型都会切换为第一次进行对话时使用的模型,而不是上一次进行对话时使用的模型。不知道是项目最初的逻辑设计就是这样的还是属于BUG

Issues-translate-bot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically.


Title: Regarding the answer to changing the model in the same session, after refreshing the page, it changes to the original model.

In the same session, for example, I use gpt3.5 for the first conversation, and switch to gpt4 to continue the conversation. However, if I refresh the page or reopen the website, the session model will be switched to the one used for the first conversation. model instead of the model used when the conversation was last held. I don’t know if the original logical design of the project is like this or if it is a BUG

AnnaStreeter commented 4 weeks ago

看代码逻辑,每个对话会存储一个 model 字段,首次提问创建一条conversation, 视为主模型,后续切换模型则切换为附模型。 后续请求时将返回主模型并切换至主模型。

Issues-translate-bot commented 4 weeks ago

Bot detected the issue body's language is not English, translate it automatically.


Looking at the code logic, each conversation will store a model field. The first question creates a conversation, which is regarded as the main model. Subsequent switching models will switch to the attached model. Subsequent requests will return and switch to the main model.

dqzboy commented 4 weeks ago

看代码逻辑,每个对话会存储一个 model 字段,首次提问创建一条conversation, 视为主模型,后续切换模型则切换为附模型。 后续请求时将返回主模型并切换至主模型。

好的明白了,但是这导致个问题,就是刷新页面或者重新打开页面点击此会话时,加载很耗时

Issues-translate-bot commented 4 weeks ago

Bot detected the issue body's language is not English, translate it automatically.


Looking at the code logic, each conversation will store a model field. The first question creates a conversation and is regarded as the main model. Subsequent switching of models will switch to the attached model. Subsequent requests will return and switch to the main model.

Okay, I understand, but this leads to a problem, that is, when refreshing the page or reopening the page and clicking on this session, it takes a long time to load.

AnnaStreeter commented 3 weeks ago

看代码逻辑,每个对话会存储一个 model 字段,首次提问创建一条conversation, 视为主模型,后续切换模型则切换为附模型。 后续请求时将返回主模型并切换至主模型。

好的明白了,但是这导致个问题,就是刷新页面或者重新打开页面点击此会话时,加载很耗时

和这个有啥关系,这是SQL查询导致的吧,而且也没有多耗时(除非 MySQL 离后端远,配置低,内容多带宽低,或者服务器线路差等因素,正常来说<=5s)

Issues-translate-bot commented 3 weeks ago

Bot detected the issue body's language is not English, translate it automatically.


Looking at the code logic, each conversation will store a model field. The first question creates a conversation, which is regarded as the main model. Subsequent switching models will switch to the attached model. Subsequent requests will return and switch to the main model.

Okay, I understand, but this leads to a problem, that is, when refreshing the page or reopening the page and clicking on this session, it takes a long time to load.

What does this have to do with it? It’s caused by SQL queries, and it doesn’t take much time.

AnnaStreeter commented 3 weeks ago

我是用内网 Nas+K8s搭的,目测延时几乎没影响,在200ms以内

image

Issues-translate-bot commented 3 weeks ago

Bot detected the issue body's language is not English, translate it automatically.


I used intranet Nas + K8s, and the visual delay has almost no effect, within 200ms.