Skip to content

Commit

Permalink
Revert "错误修正"
Browse files Browse the repository at this point in the history
This reverts commit 4ec6ddf.
  • Loading branch information
lvyonghuan committed Mar 25, 2023
1 parent 113c6c7 commit f5de367
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions cmd/chatgpt/chatgpt.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ func Client() (http.Client, error) {
// GenerateText 调用openai的API生成文本
func GenerateText(text string) string {
log.Println("正在调用OpenAI API生成文本...", text)
text = strings.ReplaceAll(text, "\r", "")
text = strings.ReplaceAll(text, "\n", "\\n")
postData := []byte(fmt.Sprintf(`{
"model": "%s",
"messages": %s,
Expand Down

0 comments on commit f5de367

Please sign in to comment.