Skip to content

Commit

Permalink
fix: convert system message to user message for claude
Browse files Browse the repository at this point in the history
  • Loading branch information
songquanpeng committed Jul 27, 2023
1 parent 0a39521 commit b9f6461
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions controller/relay-claude.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ func requestOpenAI2Claude(textRequest GeneralOpenAIRequest) *ClaudeRequest {
prompt += fmt.Sprintf("\n\nHuman: %s", message.Content)
} else if message.Role == "assistant" {
prompt += fmt.Sprintf("\n\nAssistant: %s", message.Content)
} else {
// ignore other roles
} else if message.Role == "system" {
prompt += fmt.Sprintf("\n\nSystem: %s", message.Content)
}
prompt += "\n\nAssistant:"
}
prompt += "\n\nAssistant:"
claudeRequest.Prompt = prompt
return &claudeRequest
}
Expand Down

0 comments on commit b9f6461

Please sign in to comment.