From 81e342b1548500e62ae53c0365c2e67b4f0a04a9 Mon Sep 17 00:00:00 2001 From: junleea <354425203@qq.com> Date: Sun, 30 Mar 2025 14:21:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Ddoubao=E6=9C=AA=E8=BF=94?= =?UTF-8?q?=E5=9B=9Etoken=E4=BF=A1=E6=81=AF=E5=AF=BC=E8=87=B4=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/doubao.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/service/doubao.go b/service/doubao.go index 17679e1..e76667c 100644 --- a/service/doubao.go +++ b/service/doubao.go @@ -93,6 +93,9 @@ func DouBaoV2(modelParam proto.ModelParam, imCtx *proto.IMParamContext) { req := model.CreateChatCompletionRequest{ Model: modelParam.Model, Messages: messages, + StreamOptions: &model.StreamOptions{ + IncludeUsage: true, + }, } stream, err := doubaoClient.CreateChatCompletionStream(ctx, req)