From e7eba25bc45a0cfc478727e3fd504aedbe38cb19 Mon Sep 17 00:00:00 2001 From: Marco Minerva Date: Mon, 24 Mar 2025 18:01:38 +0100 Subject: [PATCH] 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. --- README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 5ef466e..735a880 100644 --- a/README.md +++ b/README.md @@ -36,15 +36,15 @@ This repository contains a Blazor Web App as well as a Minimal API that allows t "streamState": null, "tokenUsage": { "reformulation": { - "inputTokenCount": 107, - "outputTokenCount": 10, - "totalTokenCount": 117 + "promptTokens": 107, + "completionTokens": 10, + "totalTokens": 117 }, "embeddingTokenCount": 10, "question": { - "inputTokenCount": 9142, - "outputTokenCount": 53, - "totalTokenCount": 9195 + "promptTokens": 9142, + "completionTokens": 53, + "totalTokens": 9195 } } } @@ -63,9 +63,9 @@ When using the `/api/ask-streaming` endpoint, answers will be streamed as happen "streamState": "Start", "tokenUsage": { "reformulation": { - "inputTokenCount": 107, - "outputTokenCount": 10, - "totalTokenCount": 117 + "promptTokens": 107, + "completionTokens": 10, + "totalTokens": 117 }, "embeddingTokenCount": 10, "question": null @@ -130,9 +130,9 @@ When using the `/api/ask-streaming` endpoint, answers will be streamed as happen "reformulation": null, "embeddingTokenCount": null, "question": { - "inputTokenCount": 8986, - "outputTokenCount": 31, - "totalTokenCount": 9017 + "promptTokens": 8986, + "completionTokens": 31, + "totalTokens": 9017 } } }