Skip to content

Commit

Permalink
AIX: Anthropic: Disable breakpoint on the system message. Too short f…
Browse files Browse the repository at this point in the history
…or typical chats (for now). #623
  • Loading branch information
enricoros committed Aug 16, 2024
1 parent d4bba26 commit 590843f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ export function aixToAnthropicMessageCreate(model: AixAPI_Model, chatGenerate: A
// If auto-caching is enabled, we will add the cache hints (AnthropicWire_Blocks.blockSetCacheControl(true)) to the last two messages with an user role, in-place
if (anthropicAutoCache && chatMessages.length) {
// Add cache_control to the system message
if (systemMessage?.length)
AnthropicWire_Blocks.blockSetCacheControl(systemMessage[0], 'ephemeral');
// NOTE: 2024-08-16: disabled because the system message is most often too short and user attachments are in the first user message
// will enable again once Anthropic sorts things out
// if (systemMessage?.length)
// AnthropicWire_Blocks.blockSetCacheControl(systemMessage[0], 'ephemeral');

// Add cache_control to the end of the last two user messages
let breakpointsRemaining = 2;
Expand Down

0 comments on commit 590843f

Please sign in to comment.