refactor: 将多个 fmt.Println 日志替换为 log.Printf,以统一日志输出格式并提升可读性

This commit is contained in:
lixiangwuxian
2025-04-16 00:32:16 +08:00
parent 61eada5d1e
commit 20d82d485e
8 changed files with 22 additions and 17 deletions

View File

@@ -111,7 +111,7 @@ func ask(from string, question string) (reply string) {
)
if err != nil {
fmt.Printf("ChatCompletion error: %v\n", err)
log.Printf("ChatCompletion error: %v\n", err)
return
}
AppendReplyToHistory(from, resp.Choices[0].Message.Content)