Skip to content

Commit

Permalink
fix: aiproxy ali stream usage (#5228)
Browse files Browse the repository at this point in the history
  • Loading branch information
zijiren233 authored Nov 22, 2024
1 parent a74d3c5 commit 26bb340
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions service/aiproxy/relay/adaptor/ali/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ func ConvertRequest(request *model.GeneralOpenAIRequest) *model.GeneralOpenAIReq
if request.TopP != nil && *request.TopP >= 1 {
*request.TopP = 0.9999
}
if request.StreamOptions == nil {
request.StreamOptions = &model.StreamOptions{}
}
request.StreamOptions.IncludeUsage = true
return request
}

Expand Down

0 comments on commit 26bb340

Please sign in to comment.