mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-08 02:56:39 +08:00
Compare commits
3 Commits
6069db4d57
...
850789ccb4
Author | SHA1 | Date | |
---|---|---|---|
|
850789ccb4 | ||
|
557a2cce35 | ||
|
3939ff47ef |
@ -614,13 +614,13 @@ export const useChatStore = createPersistStore(
|
||||
: shortTermMemoryStartIndex;
|
||||
// and if user has cleared history messages, we should exclude the memory too.
|
||||
const contextStartIndex = Math.max(clearContextIndex, memoryStartIndex);
|
||||
const maxTokenThreshold = modelConfig.max_tokens;
|
||||
// const maxTokenThreshold = modelConfig.max_tokens;
|
||||
|
||||
// get recent messages as much as possible
|
||||
const reversedRecentMessages = [];
|
||||
for (
|
||||
let i = totalMessageCount - 1, tokenCount = 0;
|
||||
i >= contextStartIndex && tokenCount < maxTokenThreshold;
|
||||
i >= contextStartIndex ;//&& tokenCount < maxTokenThreshold;
|
||||
i -= 1
|
||||
) {
|
||||
const msg = messages[i];
|
||||
|
@ -9,7 +9,7 @@
|
||||
},
|
||||
"package": {
|
||||
"productName": "NextChat",
|
||||
"version": "2.15.8"
|
||||
"version": "2.16.1"
|
||||
},
|
||||
"tauri": {
|
||||
"allowlist": {
|
||||
|
Loading…
Reference in New Issue
Block a user