Compare commits

...

4 Commits

Author SHA1 Message Date
Q.A.zh
e157587908
Merge 3939ff47ef into 705dffc664 2025-06-11 22:17:44 +08:00
RiverRay
705dffc664
Merge pull request #6514 from KevinShiCN/patch-1
Some checks failed
Run Tests / test (push) Has been cancelled
Add gemini-2.5-pro-preview-06-05 into constant.ts
2025-06-11 16:14:09 +08:00
KevinShiCN
02f7e6de98
Add gemini-2.5-pro-preview-06-05 into constant.ts 2025-06-08 23:59:49 +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 2 deletions

View File

@ -546,6 +546,7 @@ const googleModels = [
"gemini-2.0-flash-thinking-exp-01-21",
"gemini-2.0-pro-exp",
"gemini-2.0-pro-exp-02-05",
"gemini-2.5-pro-preview-06-05",
];
const anthropicModels = [

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