Skip to content

Commit ff74314

Browse files
committed
refactor: update comments
1 parent baeeaa7 commit ff74314

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

internal/services/toolkit/client/completion_v2.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,9 @@ func (a *AIClientV2) ChatCompletionStreamV2(ctx context.Context, callbackStream
9898
chunk := stream.Current()
9999

100100
if len(chunk.Choices) == 0 {
101+
// Handle usage information
101102
if chunk.Usage.TotalTokens > 0 {
102-
// Record usage and log stats asynchronously to avoid blocking the response
103+
// Record usage asynchronously to avoid blocking the response
103104
go func(usage services.UsageRecord) {
104105
bgCtx := context.Background()
105106
if err := a.usageService.RecordUsage(bgCtx, usage); err != nil {

0 commit comments

Comments
 (0)