Go: add LLM usage (#17049)

### Summary

```
RAGFlow(api/default)> CHAT WITH 'glm-4-flash@new_test@zhipu-ai' MESSAGE '30 words describes LLM';
Answer: Hello! I'm ChatGLM, an AI assistant. Feel free to ask me any questions or request help with any tasks.
Input tokens: 5
Output tokens: 28
Time: 12.748241
```

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2026-07-17 21:28:43 +08:00
committed by GitHub
parent c420de0dc5
commit 8ebdc02cf6
7 changed files with 78 additions and 47 deletions

View File

@@ -820,6 +820,7 @@ func (h *ProviderHandler) ChatToModel(c *gin.Context) {
"code": 0,
"reasoning_content": response.ReasonContent,
"answer": response.Answer,
"usage": response.Usage,
})
}