ignore: fix
This commit is contained in:
parent
9bb25a9260
commit
eb24d2f847
1 changed files with 1 additions and 1 deletions
|
|
@ -25,7 +25,7 @@ export namespace SessionCompaction {
|
||||||
const count = input.tokens.input + input.tokens.cache.read + input.tokens.output
|
const count = input.tokens.input + input.tokens.cache.read + input.tokens.output
|
||||||
const output = Math.min(input.model.limit.output, SessionPrompt.OUTPUT_TOKEN_MAX) || SessionPrompt.OUTPUT_TOKEN_MAX
|
const output = Math.min(input.model.limit.output, SessionPrompt.OUTPUT_TOKEN_MAX) || SessionPrompt.OUTPUT_TOKEN_MAX
|
||||||
const usable = input.model.limit.context - output
|
const usable = input.model.limit.context - output
|
||||||
return count > usable / 2
|
return count > usable
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function run(input: { sessionID: string; providerID: string; modelID: string }) {
|
export async function run(input: { sessionID: string; providerID: string; modelID: string }) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue