Class ComputeTokensResponse
Response for computing tokens.
public record ComputeTokensResponse : IEquatable<ComputeTokensResponse>
- Inheritance
-
ComputeTokensResponse
- Implements
- Inherited Members
Properties
SdkHttpResponse
Used to retain the full HTTP response.
[JsonPropertyName("sdkHttpResponse")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public HttpResponse? SdkHttpResponse { get; set; }
Property Value
TokensInfo
Lists of tokens info from the input. A ComputeTokensRequest could have multiple instances with a prompt in each instance. We also need to return lists of tokens info for the request with multiple instances.
[JsonPropertyName("tokensInfo")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<TokensInfo>? TokensInfo { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a ComputeTokensResponse object.
public static ComputeTokensResponse? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- ComputeTokensResponse
The deserialized ComputeTokensResponse object, or null if deserialization fails.