mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-09 10:29:40 +00:00
Fixed the exact token count outliving the conversation it was reported for
This commit is contained in:
6 files changed
+239
-52
No files matched your search
@@ -37,6 +37,20 @@ public sealed record ReportedTokenUsage
|
||||
/// </remarks>
|
||||
public string ModelId { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// How many blocks the conversation had when the request went out, this answer included.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// What tells an outdated report apart without anybody having to remember anything about it.
|
||||
/// Blocks are only ever added at the end, so while this answer is the last block, a thread with
|
||||
/// the same count is the thread the provider saw. A lower count means an earlier message was
|
||||
/// deleted, and that message is still inside the reported number.
|
||||
///
|
||||
/// Taken when the request is sent rather than when the report arrives: whatever is deleted
|
||||
/// while the answer streams in was still part of what the provider counted.
|
||||
/// </remarks>
|
||||
public int BlockCount { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// States the stored numbers as a usage again.
|
||||
/// </summary>
|
||||
|
||||
Reference in new issue
Block a user