Class GeminiPreferenceExampleCompletion
Completion and its preference score. This data type is not supported in Gemini API.
public record GeminiPreferenceExampleCompletion : IEquatable<GeminiPreferenceExampleCompletion>
- Inheritance
-
GeminiPreferenceExampleCompletion
- Implements
- Inherited Members
Properties
Completion
Single turn completion for the given prompt.
[JsonPropertyName("completion")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public Content? Completion { get; set; }
Property Value
Score
The score for the given completion.
[JsonPropertyName("score")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public double? Score { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a GeminiPreferenceExampleCompletion object.
public static GeminiPreferenceExampleCompletion? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- GeminiPreferenceExampleCompletion
The deserialized GeminiPreferenceExampleCompletion object, or null if deserialization fails.