Compare commits

...

3 Commits

Author SHA1 Message Date
Q.A.zh
850789ccb4
Merge 3939ff47ef into 557a2cce35 2025-07-29 15:41:06 +08:00
river
557a2cce35 chore: update version
Some checks failed
Run Tests / test (push) Has been cancelled
2025-07-29 14:39:45 +08:00
Q.A.zh
3939ff47ef fix: remove the condition that uses max_token to reduce the context 2024-08-14 02:33:39 +00:00
2 changed files with 3 additions and 3 deletions

View File

@ -614,13 +614,13 @@ export const useChatStore = createPersistStore(
: shortTermMemoryStartIndex; : shortTermMemoryStartIndex;
// and if user has cleared history messages, we should exclude the memory too. // and if user has cleared history messages, we should exclude the memory too.
const contextStartIndex = Math.max(clearContextIndex, memoryStartIndex); const contextStartIndex = Math.max(clearContextIndex, memoryStartIndex);
const maxTokenThreshold = modelConfig.max_tokens; // const maxTokenThreshold = modelConfig.max_tokens;
// get recent messages as much as possible // get recent messages as much as possible
const reversedRecentMessages = []; const reversedRecentMessages = [];
for ( for (
let i = totalMessageCount - 1, tokenCount = 0; let i = totalMessageCount - 1, tokenCount = 0;
i >= contextStartIndex && tokenCount < maxTokenThreshold; i >= contextStartIndex ;//&& tokenCount < maxTokenThreshold;
i -= 1 i -= 1
) { ) {
const msg = messages[i]; const msg = messages[i];

View File

@ -9,7 +9,7 @@
}, },
"package": { "package": {
"productName": "NextChat", "productName": "NextChat",
"version": "2.15.8" "version": "2.16.1"
}, },
"tauri": { "tauri": {
"allowlist": { "allowlist": {