Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
devinyf committed Mar 8, 2024
1 parent 79db6a6 commit f41ee85
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ func main() {

fmt.Println("\nnon-stream result: ")
fmt.Println(resp.Output.Choices[0].Message.Content.ToString())

// 获取 request_id, finish_reason, token usage (流式输出也同样使用以下方法统一获取)
fmt.Println(resp.RequestID)
fmt.Println(resp.Output.Choices[0].FinishReason)
fmt.Println(resp.Usage.TotalTokens)
}
```

Expand Down

0 comments on commit f41ee85

Please sign in to comment.