mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-17 12:38:00 +00:00
Added the exact token count where the provider reports it
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c95cc5bacc
commit
0aa3b23b81
21 files changed
+598
-7
No files matched your search
@@ -45,6 +45,27 @@ public readonly record struct ConversationTokens
|
||||
/// </remarks>
|
||||
public bool IsEstimate { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// How much of <see cref="Tokens"/> is the message being written right now.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Kept apart from the rest for the same reason the statements above are kept apart: what the
|
||||
/// conversation has already cost is something a provider can be asked about, while a sentence
|
||||
/// nobody has sent yet can only be estimated. What the conversation costs without it is this
|
||||
/// subtracted from <see cref="Tokens"/>.
|
||||
/// </remarks>
|
||||
public int DraftTokens { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether the conversation so far was counted by the provider rather than by this app.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// True once a provider has stated what a request of this conversation cost, which makes
|
||||
/// everything but the draft an exact number. It says nothing about the draft, which stays an
|
||||
/// estimate either way -- nobody has charged for that one yet.
|
||||
/// </remarks>
|
||||
public bool HistoryIsReported { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// How much the model reads, where anybody has stated it.
|
||||
/// </summary>
|
||||
|
||||
Reference in new issue
Block a user