Table of Contents

Class ReinforcementTuningExample

Namespace
Google.GenAI.Types
Assembly
Google.GenAI.dll

User-facing format for Gemini Reinforcement Tuning examples on Vertex.

public record ReinforcementTuningExample : IEquatable<ReinforcementTuningExample>
Inheritance
ReinforcementTuningExample
Implements
Inherited Members

Properties

Contents

Multi-turn contents that represents the Prompt.

[JsonPropertyName("contents")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<Content>? Contents { get; set; }

Property Value

List<Content>

References

References for the given prompt. The key is the name of the reference, and the value is the reference itself.

[JsonPropertyName("references")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public Dictionary<string, string>? References { get; set; }

Property Value

Dictionary<string, string>

SystemInstruction

Corresponds to system_instruction in user-facing GenerateContentRequest.

[JsonPropertyName("systemInstruction")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public Content? SystemInstruction { get; set; }

Property Value

Content

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a ReinforcementTuningExample object.

public static ReinforcementTuningExample? FromJson(string jsonString, JsonSerializerOptions? options = null)

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

ReinforcementTuningExample

The deserialized ReinforcementTuningExample object, or null if deserialization fails.