mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-09-24 14:33:37 +00:00
18 lines
737 B
C#
18 lines
737 B
C#
|
|
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);
|
||
|
|
}
|