Replaced cref tags with plain names in the token count docs

This commit is contained in:
Thorsten Sommer committed 2026-09-23 17:53:51 +02:00
1 parent ae10bb4809
commit 39c93f6812
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)