From 6fea649f7c0673745deb9a286dec3465eaaa50e3 Mon Sep 17 00:00:00 2001 From: Minghan Zhang <112773885+zmh-program@users.noreply.github.com> Date: Sat, 30 Mar 2024 23:11:25 +0800 Subject: [PATCH] chore: update claude format --- adapter/claude/chat.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/adapter/claude/chat.go b/adapter/claude/chat.go index 4472ff0..be6735a 100644 --- a/adapter/claude/chat.go +++ b/adapter/claude/chat.go @@ -54,14 +54,12 @@ func (c *ChatInstance) GetTokens(props *adaptercommon.ChatProps) int { } func (c *ChatInstance) ConvertMessages(props *adaptercommon.ChatProps) []globals.Message { - // anthropic api: top message must be user message, system message is not allowed + // anthropic api: top message must be user message, only `user` and `assistant` role messages are allowd start := false result := make([]globals.Message, 0) for _, message := range props.Message { - - // System message is set when constructing Chatbody if message.Role == globals.System { continue }