Skip to content

Commit

Permalink
perf: systemPrompt
Browse files Browse the repository at this point in the history
  • Loading branch information
feng626 committed Dec 19, 2023
1 parent 8c6fe9b commit a0487a0
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pkg/manager/openai.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,8 @@ func ChatGPT(ask *AskChatGPT, prompt string, currentAskInterrupt *bool) {
})
}

systemPrompt := "请不要提供与政治相关的信息。"
if prompt != "" {
systemPrompt = prompt
}

systemPrompt := " 请不要提供与政治相关的信息。"
systemPrompt = prompt + systemPrompt
messages = append([]openai.ChatCompletionMessage{
{
Role: openai.ChatMessageRoleSystem,
Expand Down

0 comments on commit a0487a0

Please sign in to comment.