Go: add stats (#17061)

### Summary

Add LLM token stats framework

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2026-07-18 21:02:07 +08:00
committed by GitHub
parent cafbbd467d
commit b8d06d02e6
144 changed files with 1578 additions and 1280 deletions

View File

@@ -530,11 +530,11 @@ func (r *MessageResponse) PrintOut() {
}
type NonStreamResponse struct {
Code int `json:"code"`
ReasoningContent string `json:"reasoning_content"`
Answer string `json:"answer"`
Message string `json:"message"`
Usage *models.ChatUsage `json:"usage"`
Code int `json:"code"`
ReasoningContent string `json:"reasoning_content"`
Answer string `json:"answer"`
Message string `json:"message"`
Usage *models.TokenUsage `json:"usage"`
Duration float64
OutputFormat OutputFormat
}