Package com.google.genai.types
Class GeminiPreferenceExample
-
- All Implemented Interfaces:
public abstract class GeminiPreferenceExample extends JsonSerializable
Input example for preference optimization. This data type is not supported in Gemini API.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classGeminiPreferenceExample.BuilderBuilder for GeminiPreferenceExample.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description GeminiPreferenceExample()
-
Method Summary
Modifier and Type Method Description abstract Optional<List<GeminiPreferenceExampleCompletion>>completions()List of completions for a given prompt. abstract Optional<List<Content>>contents()Multi-turn contents that represents the Prompt. static GeminiPreferenceExample.Builderbuilder()Instantiates a builder for GeminiPreferenceExample. abstract GeminiPreferenceExample.BuildertoBuilder()Creates a builder with the same values as this instance. static GeminiPreferenceExamplefromJson(String jsonString)Deserializes a JSON string to a GeminiPreferenceExample object. -
Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
completions
abstract Optional<List<GeminiPreferenceExampleCompletion>> completions()
List of completions for a given prompt.
-
contents
abstract Optional<List<Content>> contents()
Multi-turn contents that represents the Prompt.
-
builder
static GeminiPreferenceExample.Builder builder()
Instantiates a builder for GeminiPreferenceExample.
-
toBuilder
abstract GeminiPreferenceExample.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static GeminiPreferenceExample fromJson(String jsonString)
Deserializes a JSON string to a GeminiPreferenceExample object.
-
-
-
-