From 071650ff617d714526a15a017b32751884e26243 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Thu, 27 Jun 2024 22:08:47 -0600 Subject: [PATCH] Fix a stupid bug that was dropping system prompts for Claude (#13626) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Release Notes: - Fixed a bug that was causing system prompts to be dropped for Anthropic models. @JosephTLyons @notpeter We probably need to hot-fix this as I'm pretty sure this affects the regular anthropic provider in addition to just the feature-flagged cloud stuff. Wouldn't mind confirming that first so we can communicate around it. 😬 --- crates/assistant/src/completion_provider/anthropic.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/assistant/src/completion_provider/anthropic.rs b/crates/assistant/src/completion_provider/anthropic.rs index 669e8cb808be95f18b8b70ccd6673260ede7c78a..87236501a94d306d5d82502bb8daba48f689961b 100644 --- a/crates/assistant/src/completion_provider/anthropic.rs +++ b/crates/assistant/src/completion_provider/anthropic.rs @@ -236,7 +236,7 @@ pub fn preprocess_anthropic_request(request: &mut LanguageModelRequest) { } if !system_message.is_empty() { - request.messages.insert( + new_messages.insert( 0, LanguageModelRequestMessage { role: Role::System,