mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-08 14:49:40 +00:00
Replaced cref tags with plain names in the token count docs
This commit is contained in:
6 files changed
+22
-12
No files matched your search
@@ -30,6 +30,6 @@ public interface IResponseStreamLine : IAnnotationStreamLine
|
||||
/// <summary>
|
||||
/// Gets what the provider said the request cost.
|
||||
/// </summary>
|
||||
/// <returns>The usage, or <see cref="TokenUsage.UNKNOWN"/> when the line carries none.</returns>
|
||||
/// <returns>The usage, or TokenUsage.UNKNOWN when the line carries none.</returns>
|
||||
public TokenUsage GetUsage() => TokenUsage.UNKNOWN;
|
||||
}
|
||||
@@ -7,7 +7,7 @@ namespace AIStudio.Provider.OpenAI;
|
||||
/// <remarks>
|
||||
/// Every number is optional because this is somebody else's JSON: the block arrives only when the
|
||||
/// request asked for it, and the providers which follow the shape loosely leave fields out. Reading
|
||||
/// it is one thing, believing it another -- <see cref="TokenUsage.OfReported"/> decides that.
|
||||
/// it is one thing, believing it another -- TokenUsage.OfReported decides that.
|
||||
/// </remarks>
|
||||
public sealed record ChatCompletionUsage
|
||||
{
|
||||
|
||||
@@ -73,7 +73,7 @@ public readonly record struct TokenUsage
|
||||
/// </remarks>
|
||||
/// <param name="promptTokens">What the request carried, as the provider stated it.</param>
|
||||
/// <param name="completionTokens">What the answer cost, as the provider stated it.</param>
|
||||
/// <returns>The usage, or <see cref="UNKNOWN"/>.</returns>
|
||||
/// <returns>The usage, or UNKNOWN.</returns>
|
||||
public static TokenUsage OfReported(int? promptTokens, int? completionTokens) =>
|
||||
promptTokens is > 0
|
||||
? Of(promptTokens.Value, completionTokens is > 0 ? completionTokens.Value : 0)
|
||||
|
||||
Reference in new issue
Block a user