mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-08 14:29:40 +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
@@ -23,6 +23,17 @@ public record ChatCompletionAPIRequest(
|
||||
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public bool? ParallelToolCalls { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Asks a streamed request to end with what it cost.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Derived rather than set, so that every provider which builds one of these asks for it
|
||||
/// without having to know that it exists. A request which is not streamed carries no such
|
||||
/// line, and then the block would only be a field the provider has to ignore.
|
||||
/// </remarks>
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public ChatCompletionStreamOptions? StreamOptions => this.Stream ? ChatCompletionStreamOptions.INCLUDE_USAGE : null;
|
||||
|
||||
// Attention: The "required" modifier is not supported for [JsonExtensionData].
|
||||
[JsonExtensionData]
|
||||
|
||||
Reference in new issue
Block a user