File tree Expand file tree Collapse file tree
src/main/java/com/alibaba/dashscope Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11// Copyright (c) Alibaba, Inc. and its affiliates.
22package com .alibaba .dashscope .audio .asr .recognition ;
33
4+ import com .alibaba .dashscope .utils .ApiKeywords ;
5+ import com .google .gson .annotations .SerializedName ;
46import lombok .Data ;
57import lombok .experimental .SuperBuilder ;
68
79@ Data
810@ SuperBuilder
911public final class RecognitionUsage {
1012 private Integer duration ;
13+
14+ @ SerializedName (ApiKeywords .INPUT_TOKENS )
15+ private Integer inputTokens ;
16+
17+ @ SerializedName (ApiKeywords .OUTPUT_TOKENS )
18+ private Integer outputTokens ;
19+
20+ @ SerializedName (ApiKeywords .TOTAL_TOKENS )
21+ private Integer totalTokens ;
1122}
Original file line number Diff line number Diff line change 11// Copyright (c) Alibaba, Inc. and its affiliates.
22package com .alibaba .dashscope .audio .tts ;
33
4+ import com .alibaba .dashscope .utils .ApiKeywords ;
5+ import com .google .gson .annotations .SerializedName ;
46import lombok .Data ;
57import lombok .experimental .SuperBuilder ;
68
79@ Data
810@ SuperBuilder
911public final class SpeechSynthesisUsage {
1012 private Integer characters ;
13+
14+ @ SerializedName (ApiKeywords .INPUT_TOKENS )
15+ private Integer inputTokens ;
16+
17+ @ SerializedName (ApiKeywords .OUTPUT_TOKENS )
18+ private Integer outputTokens ;
19+
20+ @ SerializedName (ApiKeywords .TOTAL_TOKENS )
21+ private Integer totalTokens ;
1122}
Original file line number Diff line number Diff line change @@ -93,6 +93,8 @@ public class ApiKeywords {
9393
9494 public static final String INPUT_TOKENS = "input_tokens" ;
9595
96+ public static final String TOTAL_TOKENS = "total_tokens" ;
97+
9698 public static final String ERROR = "error" ;
9799
98100 public static final String EVENT = "event" ;
You can’t perform that action at this time.
0 commit comments