ChatGPTNextWeb / ChatGPT-Next-Web

A cross-platform ChatGPT/Gemini UI (Web / PWA / Linux / Win / MacOS). 一键拥有你自己的跨平台 ChatGPT/Gemini 应用。
https://app.nextchat.dev/
MIT License
75.03k stars 58.99k forks source link

[Feature Request] 增加修改标题概括模型和历史摘要模型的参数 #5417

Open KZdavid opened 6 days ago

KZdavid commented 6 days ago

🥰 需求描述

针对于概括和历史摘要所以使用的模型,现在的逻辑在app/store/chat.ts的getSummarizeModel函数里

该逻辑目前对于使用gpt、chatgpt开头的模型默认使用gpt-4o-mini,对于gemini使用gemini-pro,而对于其他的模型,则直接使用用户当前正在使用的模型。

但是对于一些价格较高的自定义模型,或者对于对并发有限制的模型而言,这种概括模型和历史摘要模型并不能使用当前正在使用的模型,以及对于chatgpt或者gemini的模型,也可能希望使用更廉价的其他模型来进行概括和摘要的工作。希望能够增加修改这些内容的高级参数设置和允许在server端添加的默认参数

🧐 解决方案

修改app/config/server.ts,增加概括模型、历史摘要模型的相关的参数 修改app/store/chat.ts的getSummarizeModel函数,增加用户自定义的概括模型的使用逻辑 配套修改app/components/settings.tsxapp/constant.ts等相关前端代码

📝 补充信息

No response

Issues-translate-bot commented 6 days ago

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


Title: [Feature Request]

🥰 Description of requirements

For the model used for summary and historical summarization, the current logic is in [app/store/chat.ts](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/blob/169323e238371d933a73671ad3f5ec4c2e5644f3/app/store/chat .ts#L109) in the getSummarizeModel function

This logic currently uses gpt-4o-mini by default for models starting with gpt and chatgpt, gemini-pro for gemini, and for other models, directly uses the model currently used by the user.

However, for some higher-priced custom models, or for models with restrictions on concurrency, this summary model and historical summary model cannot use the model currently in use, and for chatgpt or gemini models, you may also want to Use other cheaper models to do the work of generalization and summarization. It is hoped that advanced parameter settings can be added to modify these contents and default parameters allowed to be added on the server side.

🧐 Solution

Modify app/config/server.ts and add related information about summary model and historical summary model parameter Modify the getSummarizeModel function of app/store/chat.ts to add user-defined Summarize the logic of using the model Supporting modifications app/components/settings.tsx, [app/constant.ts](https ://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/blob/169323e238371d933a73671ad3f5ec4c2e5644f3/app/constant.ts) and other related front-end codes

📝 Supplementary information

No response

skymkmk commented 6 days ago

可以顺带加上强制重新总结标题与强制总结摘要?如果愿意添加这些功能,我可以提 pr

Issues-translate-bot commented 6 days ago

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


Can you add a forced resummary title and a forced summary summary? If you are willing to add these features, I can submit a PR

Leizhenpeng commented 5 days ago

有好几个issue 提到过了这个,可以接受PR 哈哈 @skymkmk

Issues-translate-bot commented 5 days ago

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


Several issues have mentioned this, PR is accepted haha ​​@skymkmk

skymkmk commented 5 days ago

@Leizhenpeng 请问你们是如何做本地化的?

Issues-translate-bot commented 5 days ago

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


@Leizhenpeng How do you do localization?