mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-07 18:46:38 +08:00
Compare commits
5 Commits
587845f82a
...
b39cb64440
Author | SHA1 | Date | |
---|---|---|---|
|
b39cb64440 | ||
|
d958441d7f | ||
|
1600b96454 | ||
|
47047a60b2 | ||
|
3939ff47ef |
@ -555,6 +555,7 @@ const googleModels = [
|
||||
"gemini-2.0-pro-exp",
|
||||
"gemini-2.0-pro-exp-02-05",
|
||||
"gemini-2.5-pro-preview-06-05",
|
||||
"gemini-2.5-pro"
|
||||
];
|
||||
|
||||
const anthropicModels = [
|
||||
|
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user