TokenCounts
Namespace: Vercel.AI.GenerateText
public static class TokenCountsToken-count helpers. Maps to sumTokenCounts.
Inheritance: object
Methods
Section titled “Methods”SumTokenCounts(int?, int?)
Section titled “SumTokenCounts(int?, int?)”public static int? SumTokenCounts(int? tokenCount1, int? tokenCount2)Adds token counts. An unknown count is treated as 0 when the other count is known. Returns null when both counts are unknown.
Parameters
| Name | Type | Description |
|---|---|---|
tokenCount1 |
int? | |
tokenCount2 |
int? |
Returns: int?
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product