namespace AIStudio.Provider.OpenAI; /// /// One line of a streamed Chat Completions answer, as the tool calling rounds read it. /// /// /// The plain text path reads the very same lines through its own provider-specific type, which /// knows about text and about the sources some providers put in it. Reading a line twice costs /// nothing next to the request it arrived on, and it keeps the tool calls out of a type every /// provider implements -- including those which never call a tool. /// /// The ID of the answer. /// The choices this line adds to. public sealed record ChatCompletionToolStreamLine(string? Id, IList? Choices) { /// /// What the provider says the request cost, on the one line which carries it. /// /// /// The same block the plain text path reads, and asked for the same way: every streamed /// ChatCompletionAPIRequest asks for it, the requests of the tool rounds included. Not a /// positional parameter, because nobody but the serializer ever builds this line. /// public ChatCompletionUsage? Usage { get; init; } }