mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-29 09:00:18 +09:00
Merge branch 'ChatGPTNextWeb:main' into main
This commit is contained in:
commit
c74c0ac8e8
@ -654,6 +654,7 @@ export const useChatStore = createPersistStore(
|
|||||||
messages: topicMessages,
|
messages: topicMessages,
|
||||||
config: {
|
config: {
|
||||||
model: getSummarizeModel(session.mask.modelConfig.model),
|
model: getSummarizeModel(session.mask.modelConfig.model),
|
||||||
|
stream: false,
|
||||||
},
|
},
|
||||||
onFinish(message) {
|
onFinish(message) {
|
||||||
get().updateCurrentSession(
|
get().updateCurrentSession(
|
||||||
@ -698,6 +699,10 @@ export const useChatStore = createPersistStore(
|
|||||||
historyMsgLength > modelConfig.compressMessageLengthThreshold &&
|
historyMsgLength > modelConfig.compressMessageLengthThreshold &&
|
||||||
modelConfig.sendMemory
|
modelConfig.sendMemory
|
||||||
) {
|
) {
|
||||||
|
/** Destruct max_tokens while summarizing
|
||||||
|
* this param is just shit
|
||||||
|
**/
|
||||||
|
const { max_tokens, ...modelcfg } = modelConfig;
|
||||||
api.llm.chat({
|
api.llm.chat({
|
||||||
messages: toBeSummarizedMsgs.concat(
|
messages: toBeSummarizedMsgs.concat(
|
||||||
createMessage({
|
createMessage({
|
||||||
@ -707,7 +712,7 @@ export const useChatStore = createPersistStore(
|
|||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
config: {
|
config: {
|
||||||
...modelConfig,
|
...modelcfg,
|
||||||
stream: true,
|
stream: true,
|
||||||
model: getSummarizeModel(session.mask.modelConfig.model),
|
model: getSummarizeModel(session.mask.modelConfig.model),
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user