File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -23,11 +23,7 @@ export interface ChatCompletionResponseChoice {
23
23
export interface ChatCompletionChunk {
24
24
id : string ;
25
25
choices : ChoicesChunk [ ] ;
26
- usage ?: {
27
- prompt_tokens : number ;
28
- completion_tokens : number ;
29
- total_tokens : number ;
30
- } ;
26
+ usage ?: UsageInfo ;
31
27
}
32
28
33
29
export interface ChoiceDelta {
@@ -42,12 +38,19 @@ export interface ChoicesChunk {
42
38
finish_reason ?: string ;
43
39
}
44
40
41
+ export interface UsageInfo {
42
+ prompt_tokens : number ;
43
+ completion_tokens : number ;
44
+ total_tokens : number ;
45
+ }
46
+
45
47
export declare namespace ChatCompletions {
46
48
export {
47
49
type ChatCompletionResponseChoice ,
48
50
type ChatCompletionResponse ,
49
51
type ChoiceDelta ,
50
52
type ChoicesChunk ,
51
53
type ChatCompletionChunk ,
54
+ type UsageInfo ,
52
55
}
53
56
}
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ export {
10
10
type ChoiceDelta ,
11
11
type ChoicesChunk ,
12
12
type ChatCompletionChunk ,
13
+ type UsageInfo ,
13
14
} from "./ChatCompletionsResponse" ;
14
15
15
16
export {
Original file line number Diff line number Diff line change @@ -24,4 +24,5 @@ export {
24
24
type ChoicesChunk ,
25
25
type ChatCompletionChunk ,
26
26
type ChatModel ,
27
+ type UsageInfo ,
27
28
} from "./chat" ;
You can’t perform that action at this time.
0 commit comments