Fix a stupid bug that was dropping system prompts for Claude (#13626)

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. 😬
This commit is contained in:
Nathan Sobo 2024-06-27 22:08:47 -06:00 committed by GitHub
parent c560a24e7d
commit 61bbb3539a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,