public final class Generator extends com.google.protobuf.GeneratedMessageV3 implements GeneratorOrBuilder
Generators contain prompt to be sent to the LLM model to generate text. The prompt can contain parameters which will be resolved before calling the model. It can optionally contain banned phrases to ensure the model responses are safe.Protobuf type
google.cloud.dialogflow.cx.v3.Generator| Modifier and Type | Class and Description |
|---|---|
static class |
Generator.Builder
Generators contain prompt to be sent to the LLM model to generate text.
|
static class |
Generator.ModelParameter
Parameters to be passed to the LLM.
|
static interface |
Generator.ModelParameterOrBuilder |
static class |
Generator.Placeholder
Represents a custom placeholder in the prompt text.
|
static interface |
Generator.PlaceholderOrBuilder |
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
DISPLAY_NAME_FIELD_NUMBER |
static int |
MODEL_PARAMETER_FIELD_NUMBER |
static int |
NAME_FIELD_NUMBER |
static int |
PLACEHOLDERS_FIELD_NUMBER |
static int |
PROMPT_TEXT_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static Generator |
getDefaultInstance() |
Generator |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
String |
getDisplayName()
Required.
|
com.google.protobuf.ByteString |
getDisplayNameBytes()
Required.
|
Generator.ModelParameter |
getModelParameter()
Parameters passed to the LLM to configure its behavior.
|
Generator.ModelParameterOrBuilder |
getModelParameterOrBuilder()
Parameters passed to the LLM to configure its behavior.
|
String |
getName()
The unique identifier of the generator.
|
com.google.protobuf.ByteString |
getNameBytes()
The unique identifier of the generator.
|
com.google.protobuf.Parser<Generator> |
getParserForType() |
Generator.Placeholder |
getPlaceholders(int index)
Optional.
|
int |
getPlaceholdersCount()
Optional.
|
List<Generator.Placeholder> |
getPlaceholdersList()
Optional.
|
Generator.PlaceholderOrBuilder |
getPlaceholdersOrBuilder(int index)
Optional.
|
List<? extends Generator.PlaceholderOrBuilder> |
getPlaceholdersOrBuilderList()
Optional.
|
Phrase |
getPromptText()
Required.
|
PhraseOrBuilder |
getPromptTextOrBuilder()
Required.
|
int |
getSerializedSize() |
int |
hashCode() |
boolean |
hasModelParameter()
Parameters passed to the LLM to configure its behavior.
|
boolean |
hasPromptText()
Required.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static Generator.Builder |
newBuilder() |
static Generator.Builder |
newBuilder(Generator prototype) |
Generator.Builder |
newBuilderForType() |
protected Generator.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static Generator |
parseDelimitedFrom(InputStream input) |
static Generator |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Generator |
parseFrom(byte[] data) |
static Generator |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Generator |
parseFrom(ByteBuffer data) |
static Generator |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Generator |
parseFrom(com.google.protobuf.ByteString data) |
static Generator |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Generator |
parseFrom(com.google.protobuf.CodedInputStream input) |
static Generator |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Generator |
parseFrom(InputStream input) |
static Generator |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<Generator> |
parser() |
Generator.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int NAME_FIELD_NUMBER
public static final int DISPLAY_NAME_FIELD_NUMBER
public static final int PROMPT_TEXT_FIELD_NUMBER
public static final int PLACEHOLDERS_FIELD_NUMBER
public static final int MODEL_PARAMETER_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public String getName()
The unique identifier of the generator. Must be set for the [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3.Generators.UpdateGenerator] method. [Generators.CreateGenerate][] populates the name automatically. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/generators/<GeneratorID>`.
string name = 1;getName in interface GeneratorOrBuilderpublic com.google.protobuf.ByteString getNameBytes()
The unique identifier of the generator. Must be set for the [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3.Generators.UpdateGenerator] method. [Generators.CreateGenerate][] populates the name automatically. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/generators/<GeneratorID>`.
string name = 1;getNameBytes in interface GeneratorOrBuilderpublic String getDisplayName()
Required. The human-readable name of the generator, unique within the agent. The prompt contains pre-defined parameters such as $conversation, $last-user-utterance, etc. populated by Dialogflow. It can also contain custom placeholders which will be resolved during fulfillment.
string display_name = 2 [(.google.api.field_behavior) = REQUIRED];getDisplayName in interface GeneratorOrBuilderpublic com.google.protobuf.ByteString getDisplayNameBytes()
Required. The human-readable name of the generator, unique within the agent. The prompt contains pre-defined parameters such as $conversation, $last-user-utterance, etc. populated by Dialogflow. It can also contain custom placeholders which will be resolved during fulfillment.
string display_name = 2 [(.google.api.field_behavior) = REQUIRED];getDisplayNameBytes in interface GeneratorOrBuilderpublic boolean hasPromptText()
Required. Prompt for the LLM model.
.google.cloud.dialogflow.cx.v3.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
hasPromptText in interface GeneratorOrBuilderpublic Phrase getPromptText()
Required. Prompt for the LLM model.
.google.cloud.dialogflow.cx.v3.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
getPromptText in interface GeneratorOrBuilderpublic PhraseOrBuilder getPromptTextOrBuilder()
Required. Prompt for the LLM model.
.google.cloud.dialogflow.cx.v3.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
getPromptTextOrBuilder in interface GeneratorOrBuilderpublic List<Generator.Placeholder> getPlaceholdersList()
Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
getPlaceholdersList in interface GeneratorOrBuilderpublic List<? extends Generator.PlaceholderOrBuilder> getPlaceholdersOrBuilderList()
Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
getPlaceholdersOrBuilderList in interface GeneratorOrBuilderpublic int getPlaceholdersCount()
Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
getPlaceholdersCount in interface GeneratorOrBuilderpublic Generator.Placeholder getPlaceholders(int index)
Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
getPlaceholders in interface GeneratorOrBuilderpublic Generator.PlaceholderOrBuilder getPlaceholdersOrBuilder(int index)
Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
getPlaceholdersOrBuilder in interface GeneratorOrBuilderpublic boolean hasModelParameter()
Parameters passed to the LLM to configure its behavior.
.google.cloud.dialogflow.cx.v3.Generator.ModelParameter model_parameter = 8;hasModelParameter in interface GeneratorOrBuilderpublic Generator.ModelParameter getModelParameter()
Parameters passed to the LLM to configure its behavior.
.google.cloud.dialogflow.cx.v3.Generator.ModelParameter model_parameter = 8;getModelParameter in interface GeneratorOrBuilderpublic Generator.ModelParameterOrBuilder getModelParameterOrBuilder()
Parameters passed to the LLM to configure its behavior.
.google.cloud.dialogflow.cx.v3.Generator.ModelParameter model_parameter = 8;getModelParameterOrBuilder in interface GeneratorOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static Generator parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Generator parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Generator parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Generator parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Generator parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Generator parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Generator parseFrom(InputStream input) throws IOException
IOExceptionpublic static Generator parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Generator parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static Generator parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Generator parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static Generator parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic Generator.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static Generator.Builder newBuilder()
public static Generator.Builder newBuilder(Generator prototype)
public Generator.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected Generator.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static Generator getDefaultInstance()
public static com.google.protobuf.Parser<Generator> parser()
public com.google.protobuf.Parser<Generator> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public Generator getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2025 Google LLC. All rights reserved.