Class GeminiPreferenceExample
Input example for preference optimization. This data type is not supported in Gemini API.
public record GeminiPreferenceExample : IEquatable<GeminiPreferenceExample>
- Inheritance
-
GeminiPreferenceExample
- Implements
- Inherited Members
Properties
Completions
List of completions for a given prompt.
[JsonPropertyName("completions")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<GeminiPreferenceExampleCompletion>? Completions { get; set; }
Property Value
Contents
Multi-turn contents that represents the Prompt.
[JsonPropertyName("contents")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<Content>? Contents { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a GeminiPreferenceExample object.
public static GeminiPreferenceExample? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- GeminiPreferenceExample
The deserialized GeminiPreferenceExample object, or null if deserialization fails.