From 9da39e42e1b72f0421480e10e867e0f3b71e8da9 Mon Sep 17 00:00:00 2001 From: Matt Rubens Date: Sun, 2 Feb 2025 01:23:45 -0500 Subject: [PATCH] Fix conflict --- src/core/sliding-window/index.ts | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/core/sliding-window/index.ts b/src/core/sliding-window/index.ts index 981d02fbae..6fbd5b8a9c 100644 --- a/src/core/sliding-window/index.ts +++ b/src/core/sliding-window/index.ts @@ -1,21 +1,8 @@ import { Anthropic } from "@anthropic-ai/sdk" -<<<<<<< HEAD - -/* -We can't implement a dynamically updating sliding window as it would break prompt cache -every time. To maintain the benefits of caching, we need to keep conversation history -static. This operation should be performed as infrequently as possible. If a user reaches -a 200k context, we can assume that the first half is likely irrelevant to their current task. -Therefore, this function should only be called when absolutely necessary to fit within -context limits, not as a continuous process. -*/ -export function truncateHalfConversation( -======= import { ModelInfo } from "../../shared/api" import { MessageParam } from "@anthropic-ai/sdk/resources/messages.mjs" export function truncateConversation( ->>>>>>> 455d850c (Enable separate config for truncation for models without context caching) messages: Anthropic.Messages.MessageParam[], fracToRemove: number, ): Anthropic.Messages.MessageParam[] {