Skip to content

Commit

Permalink
Replace fmt.Println with log.Printf for error logging in chatStre…
Browse files Browse the repository at this point in the history
…amGemini.
  • Loading branch information
swuecho committed Sep 15, 2024
1 parent 5ebbe32 commit b778147
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/chat_main_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -1484,10 +1484,10 @@ func (h *ChatHandler) chatStreamGemini(w http.ResponseWriter, chatSession sqlc_q
}
if err != nil {
if errors.Is(err, io.EOF) {
fmt.Println("End of stream reached")
log.Printf("End of stream reached: %+v", err)
return answer, answer_id, false
} else {
fmt.Printf("Error while reading response: %+v", err)
log.Printf("Error while reading response: %+v", err)
return "", "", true
}
}
Expand Down

0 comments on commit b778147

Please sign in to comment.