diff --git a/controllers/ai.go b/controllers/ai.go index 6dfb890..e08ed5c 100644 --- a/controllers/ai.go +++ b/controllers/ai.go @@ -452,6 +452,9 @@ func (tc *TrainingController) streamAIAnalysis(c *gin.Context, prompt string, TopP: 0.6, MaxTokens: 4000, Stream: true, + StreamOptions: &openai.StreamOptions{ + IncludeUsage: true, + }, }, ) if err != nil {