Skip to content

Commit

Permalink
Refine the logs for user and bot. v1.0.31
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Dec 16, 2023
1 parent 58755e9 commit b7fac7c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,5 +201,6 @@ The changelog:
* Support official OpenAI API without proxy. [v1.0.28](https://github.com/ossrs/ai-talk/releases/tag/v1.0.28)
* Always use HTTPS proxy if not specified. v1.0.29
* Do not require some variables. v1.0.30
* Refine the logs for user and bot. v1.0.31

Winlin, 2023.12
3 changes: 3 additions & 0 deletions backend/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,8 @@ func handleUploadQuestionAudio(ctx context.Context, w http.ResponseWriter, r *ht
robot.uuid, robot.label, robot.asrLanguage, stage.previousAsrText, resp.Text)
asrText := resp.Text
stage.previousAsrText = resp.Text

logger.Tf(ctx, "You: %v", asrText)
fmt.Fprintf(os.Stderr, fmt.Sprintf("You: %v\n", asrText))

// Keep alive the stage.
Expand Down Expand Up @@ -851,6 +853,7 @@ func handleDownloadAnswerTTS(ctx context.Context, w http.ResponseWriter, r *http
logger.Tf(ctx, "Query segment %v %v, dummy=%v, segment=%v, err=%v",
rid, asid, segment.dummy, segment.text, segment.err)

logger.Tf(ctx, "Bot: %v", segment.text)
fmt.Fprintf(os.Stderr, "Bot: %v\n", segment.text)

// Read the ttsFile and response it as opus audio.
Expand Down

0 comments on commit b7fac7c

Please sign in to comment.