From 4c7f9182665a259fc6b9cf10c93e696e97400a2c Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Thu, 20 Mar 2025 09:37:01 -0700 Subject: [PATCH] fix: error --- core/.eslintrc.json | 3 ++- core/llm/llms/Anthropic.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/.eslintrc.json b/core/.eslintrc.json index 7ef01a175..d1aee37a6 100644 --- a/core/.eslintrc.json +++ b/core/.eslintrc.json @@ -10,6 +10,7 @@ "@typescript-eslint/no-floating-promises": "off", "import/order": "off", "curly": "off", - "@typescript-eslint/semi": "off" + "@typescript-eslint/semi": "off", + "eqeqeq": "error" } } diff --git a/core/llm/llms/Anthropic.ts b/core/llm/llms/Anthropic.ts index dcd13d38e..f32d1a059 100644 --- a/core/llm/llms/Anthropic.ts +++ b/core/llm/llms/Anthropic.ts @@ -86,7 +86,7 @@ class Anthropic extends BaseLLM { const newpart = { ...part, // If multiple text parts, only add cache_control to the last one - ...(addCaching && contentIdx == message.content.length - 1 + ...(addCaching && contentIdx === message.content.length - 1 ? { cache_control: { type: "ephemeral" } } : {}), };