Compare commits

...

4 Commits

Author SHA1 Message Date
Q.A.zh
880a089e20
Merge 3939ff47ef into fb3af2a08f 2025-06-19 16:10:55 +08:00
RiverRay
fb3af2a08f
Merge pull request #6515 from dupl/main
Some checks failed
Run Tests / test (push) Has been cancelled
Removed deprecated Gemini models
2025-06-14 13:35:32 +08:00
dupl
eb193ac0ff
Removed deprecated Gemini models 2025-06-12 15:34:03 +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 2 additions and 7 deletions

View File

@ -523,20 +523,15 @@ const openaiModels = [
];
const googleModels = [
"gemini-1.0-pro", // Deprecated on 2/15/2025
"gemini-1.5-pro-latest",
"gemini-1.5-pro",
"gemini-1.5-pro-002",
"gemini-1.5-pro-exp-0827",
"gemini-1.5-flash-latest",
"gemini-1.5-flash-8b-latest",
"gemini-1.5-flash",
"gemini-1.5-flash-8b",
"gemini-1.5-flash-002",
"gemini-1.5-flash-exp-0827",
"learnlm-1.5-pro-experimental",
"gemini-exp-1114",
"gemini-exp-1121",
"gemini-exp-1206",
"gemini-2.0-flash",
"gemini-2.0-flash-exp",

View File

@ -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];