mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-09-30 10:23:14 +00:00
chore: Start summarizing at 80k tok instead of 100k (#604)
* chore: Start summarizing at 80k tok instead of 100k * cr
This commit is contained in:
parent
f50c4ed124
commit
1b60509aac
2 changed files with 2 additions and 9 deletions
|
|
@ -11,7 +11,6 @@ import {
|
|||
import {
|
||||
calculateConversationHistoryTokenCount,
|
||||
getMessagesSinceLastSummary,
|
||||
MAX_INTERNAL_TOKENS,
|
||||
} from "../utils/tokens.js";
|
||||
import { GraphState } from "@open-swe/shared/open-swe/types";
|
||||
|
||||
|
|
@ -769,9 +768,3 @@ describe("getMessagesSinceLastSummary", () => {
|
|||
expect(toolMessageExists).not.toBeDefined();
|
||||
});
|
||||
});
|
||||
|
||||
describe("MAX_INTERNAL_TOKENS constant", () => {
|
||||
it("should be defined as 100,000", async () => {
|
||||
expect(MAX_INTERNAL_TOKENS).toBe(100_000);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ import {
|
|||
import { getMessageContentString } from "@open-swe/shared/messages";
|
||||
import { traceable } from "langsmith/traceable";
|
||||
|
||||
// After 100k tokens, summarize the conversation history.
|
||||
export const MAX_INTERNAL_TOKENS = 100_000;
|
||||
// After 80k tokens, summarize the conversation history.
|
||||
export const MAX_INTERNAL_TOKENS = 80_000;
|
||||
|
||||
export function calculateConversationHistoryTokenCount(
|
||||
messages: BaseMessage[],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue