Skip to content

Commit e7eba25

Browse files
committed
Refactor token usage structure in API responses
Updated token count keys from `inputTokenCount`, `outputTokenCount`, and `totalTokenCount` to `promptTokens`, `completionTokens`, and `totalTokens` for improved clarity. Modified `question` and `answer` fields to align with the new structure, with some values set to `null` to indicate streaming state.
1 parent 817658d commit e7eba25

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ This repository contains a Blazor Web App as well as a Minimal API that allows t
3636
"streamState": null,
3737
"tokenUsage": {
3838
"reformulation": {
39-
"inputTokenCount": 107,
40-
"outputTokenCount": 10,
41-
"totalTokenCount": 117
39+
"promptTokens": 107,
40+
"completionTokens": 10,
41+
"totalTokens": 117
4242
},
4343
"embeddingTokenCount": 10,
4444
"question": {
45-
"inputTokenCount": 9142,
46-
"outputTokenCount": 53,
47-
"totalTokenCount": 9195
45+
"promptTokens": 9142,
46+
"completionTokens": 53,
47+
"totalTokens": 9195
4848
}
4949
}
5050
}
@@ -63,9 +63,9 @@ When using the `/api/ask-streaming` endpoint, answers will be streamed as happen
6363
"streamState": "Start",
6464
"tokenUsage": {
6565
"reformulation": {
66-
"inputTokenCount": 107,
67-
"outputTokenCount": 10,
68-
"totalTokenCount": 117
66+
"promptTokens": 107,
67+
"completionTokens": 10,
68+
"totalTokens": 117
6969
},
7070
"embeddingTokenCount": 10,
7171
"question": null
@@ -130,9 +130,9 @@ When using the `/api/ask-streaming` endpoint, answers will be streamed as happen
130130
"reformulation": null,
131131
"embeddingTokenCount": null,
132132
"question": {
133-
"inputTokenCount": 8986,
134-
"outputTokenCount": 31,
135-
"totalTokenCount": 9017
133+
"promptTokens": 8986,
134+
"completionTokens": 31,
135+
"totalTokens": 9017
136136
}
137137
}
138138
}

0 commit comments

Comments
 (0)