mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-14 10:13:48 +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
@@ -0,0 +1,18 @@
|
||||
namespace AIStudio.Provider.OpenAI;
|
||||
|
||||
/// <summary>
|
||||
/// What a streamed chat completion should report beyond its content.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// An OpenAI-compatible provider says nothing about what a streamed request cost unless it is asked
|
||||
/// to. Without this block, the stream simply ends and the only token number anybody ever sees is
|
||||
/// the one AI Studio estimated for itself.
|
||||
/// </remarks>
|
||||
/// <param name="IncludeUsage">Whether the stream should end with a line stating the token usage.</param>
|
||||
public sealed record ChatCompletionStreamOptions(bool IncludeUsage)
|
||||
{
|
||||
/// <summary>
|
||||
/// Asks for the usage line.
|
||||
/// </summary>
|
||||
public static readonly ChatCompletionStreamOptions INCLUDE_USAGE = new(true);
|
||||
}
|
||||
Reference in new issue
Block a user