- 0.63.0 (latest)
- 0.62.0
- 0.60.0
- 0.59.0
- 0.58.0
- 0.57.0
- 0.56.0
- 0.55.0
- 0.54.0
- 0.53.0
- 0.52.0
- 0.51.0
- 0.50.0
- 0.48.0
- 0.47.0
- 0.46.0
- 0.45.0
- 0.44.0
- 0.43.0
- 0.42.0
- 0.41.0
- 0.40.0
- 0.39.0
- 0.38.0
- 0.35.0
- 0.34.0
- 0.33.0
- 0.32.0
- 0.31.0
- 0.30.0
- 0.29.0
- 0.28.0
- 0.27.0
- 0.26.0
- 0.25.0
- 0.24.0
- 0.23.0
- 0.22.0
- 0.20.0
- 0.19.0
- 0.18.0
- 0.17.0
- 0.16.0
- 0.15.0
- 0.14.7
- 0.13.1
- 0.12.1
- 0.11.5
public static final class Generator.Builder extends GeneratedMessageV3.Builder<Generator.Builder> 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
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > Generator.BuilderImplements
GeneratorOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
Methods
addAllPlaceholders(Iterable<? extends Generator.Placeholder> values)
public Generator.Builder addAllPlaceholders(Iterable<? extends Generator.Placeholder> values)
Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
values |
Iterable<? extends com.google.cloud.dialogflow.cx.v3.Generator.Placeholder> |
Returns | |
---|---|
Type | Description |
Generator.Builder |
addPlaceholders(Generator.Placeholder value)
public Generator.Builder addPlaceholders(Generator.Placeholder value)
Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
value |
Generator.Placeholder |
Returns | |
---|---|
Type | Description |
Generator.Builder |
addPlaceholders(Generator.Placeholder.Builder builderForValue)
public Generator.Builder addPlaceholders(Generator.Placeholder.Builder builderForValue)
Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
builderForValue |
Generator.Placeholder.Builder |
Returns | |
---|---|
Type | Description |
Generator.Builder |
addPlaceholders(int index, Generator.Placeholder value)
public Generator.Builder addPlaceholders(int index, Generator.Placeholder value)
Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
Parameters | |
---|---|
Name | Description |
index |
int |
value |
Generator.Placeholder |
Returns | |
---|---|
Type | Description |
Generator.Builder |
addPlaceholders(int index, Generator.Placeholder.Builder builderForValue)
public Generator.Builder addPlaceholders(int index, Generator.Placeholder.Builder builderForValue)
Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
Parameters | |
---|---|
Name | Description |
index |
int |
builderForValue |
Generator.Placeholder.Builder |
Returns | |
---|---|
Type | Description |
Generator.Builder |
addPlaceholdersBuilder()
public Generator.Placeholder.Builder addPlaceholdersBuilder()
Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
Generator.Placeholder.Builder |
addPlaceholdersBuilder(int index)
public Generator.Placeholder.Builder addPlaceholdersBuilder(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];
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
Generator.Placeholder.Builder |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Generator.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
value |
Object |
Returns | |
---|---|
Type | Description |
Generator.Builder |
build()
public Generator build()
Returns | |
---|---|
Type | Description |
Generator |
buildPartial()
public Generator buildPartial()
Returns | |
---|---|
Type | Description |
Generator |
clear()
public Generator.Builder clear()
Returns | |
---|---|
Type | Description |
Generator.Builder |
clearDisplayName()
public Generator.Builder clearDisplayName()
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];
Returns | |
---|---|
Type | Description |
Generator.Builder |
This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public Generator.Builder clearField(Descriptors.FieldDescriptor field)
Parameter | |
---|---|
Name | Description |
field |
FieldDescriptor |
Returns | |
---|---|
Type | Description |
Generator.Builder |
clearName()
public Generator.Builder clearName()
The unique identifier of the generator.
Must be set for the
Generators.UpdateGenerator
method. [Generators.CreateGenerate][] populates the name automatically.
Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
ID>/generators/<Generator ID>
.
string name = 1;
Returns | |
---|---|
Type | Description |
Generator.Builder |
This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public Generator.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter | |
---|---|
Name | Description |
oneof |
OneofDescriptor |
Returns | |
---|---|
Type | Description |
Generator.Builder |
clearPlaceholders()
public Generator.Builder clearPlaceholders()
Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
Generator.Builder |
clearPromptText()
public Generator.Builder clearPromptText()
Required. Prompt for the LLM model.
.google.cloud.dialogflow.cx.v3.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
Returns | |
---|---|
Type | Description |
Generator.Builder |
clone()
public Generator.Builder clone()
Returns | |
---|---|
Type | Description |
Generator.Builder |
getDefaultInstanceForType()
public Generator getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
Generator |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns | |
---|---|
Type | Description |
Descriptor |
getDisplayName()
public 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];
Returns | |
---|---|
Type | Description |
String |
The displayName. |
getDisplayNameBytes()
public 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];
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for displayName. |
getName()
public String getName()
The unique identifier of the generator.
Must be set for the
Generators.UpdateGenerator
method. [Generators.CreateGenerate][] populates the name automatically.
Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
ID>/generators/<Generator ID>
.
string name = 1;
Returns | |
---|---|
Type | Description |
String |
The name. |
getNameBytes()
public ByteString getNameBytes()
The unique identifier of the generator.
Must be set for the
Generators.UpdateGenerator
method. [Generators.CreateGenerate][] populates the name automatically.
Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
ID>/generators/<Generator ID>
.
string name = 1;
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for name. |
getPlaceholders(int index)
public 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];
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
Generator.Placeholder |
getPlaceholdersBuilder(int index)
public Generator.Placeholder.Builder getPlaceholdersBuilder(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];
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
Generator.Placeholder.Builder |
getPlaceholdersBuilderList()
public List<Generator.Placeholder.Builder> getPlaceholdersBuilderList()
Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
List<Builder> |
getPlaceholdersCount()
public 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];
Returns | |
---|---|
Type | Description |
int |
getPlaceholdersList()
public 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];
Returns | |
---|---|
Type | Description |
List<Placeholder> |
getPlaceholdersOrBuilder(int index)
public 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];
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
Generator.PlaceholderOrBuilder |
getPlaceholdersOrBuilderList()
public 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];
Returns | |
---|---|
Type | Description |
List<? extends com.google.cloud.dialogflow.cx.v3.Generator.PlaceholderOrBuilder> |
getPromptText()
public Phrase getPromptText()
Required. Prompt for the LLM model.
.google.cloud.dialogflow.cx.v3.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
Returns | |
---|---|
Type | Description |
Phrase |
The promptText. |
getPromptTextBuilder()
public Phrase.Builder getPromptTextBuilder()
Required. Prompt for the LLM model.
.google.cloud.dialogflow.cx.v3.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
Returns | |
---|---|
Type | Description |
Phrase.Builder |
getPromptTextOrBuilder()
public PhraseOrBuilder getPromptTextOrBuilder()
Required. Prompt for the LLM model.
.google.cloud.dialogflow.cx.v3.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
Returns | |
---|---|
Type | Description |
PhraseOrBuilder |
hasPromptText()
public boolean hasPromptText()
Required. Prompt for the LLM model.
.google.cloud.dialogflow.cx.v3.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
Returns | |
---|---|
Type | Description |
boolean |
Whether the promptText field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
mergeFrom(Generator other)
public Generator.Builder mergeFrom(Generator other)
Parameter | |
---|---|
Name | Description |
other |
Generator |
Returns | |
---|---|
Type | Description |
Generator.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Generator.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
Generator.Builder |
Exceptions | |
---|---|
Type | Description |
IOException |
mergeFrom(Message other)
public Generator.Builder mergeFrom(Message other)
Parameter | |
---|---|
Name | Description |
other |
Message |
Returns | |
---|---|
Type | Description |
Generator.Builder |
mergePromptText(Phrase value)
public Generator.Builder mergePromptText(Phrase value)
Required. Prompt for the LLM model.
.google.cloud.dialogflow.cx.v3.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
Parameter | |
---|---|
Name | Description |
value |
Phrase |
Returns | |
---|---|
Type | Description |
Generator.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Generator.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
Generator.Builder |
removePlaceholders(int index)
public Generator.Builder removePlaceholders(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];
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
Generator.Builder |
setDisplayName(String value)
public Generator.Builder setDisplayName(String value)
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];
Parameter | |
---|---|
Name | Description |
value |
String The displayName to set. |
Returns | |
---|---|
Type | Description |
Generator.Builder |
This builder for chaining. |
setDisplayNameBytes(ByteString value)
public Generator.Builder setDisplayNameBytes(ByteString value)
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];
Parameter | |
---|---|
Name | Description |
value |
ByteString The bytes for displayName to set. |
Returns | |
---|---|
Type | Description |
Generator.Builder |
This builder for chaining. |
setField(Descriptors.FieldDescriptor field, Object value)
public Generator.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
value |
Object |
Returns | |
---|---|
Type | Description |
Generator.Builder |
setName(String value)
public Generator.Builder setName(String value)
The unique identifier of the generator.
Must be set for the
Generators.UpdateGenerator
method. [Generators.CreateGenerate][] populates the name automatically.
Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
ID>/generators/<Generator ID>
.
string name = 1;
Parameter | |
---|---|
Name | Description |
value |
String The name to set. |
Returns | |
---|---|
Type | Description |
Generator.Builder |
This builder for chaining. |
setNameBytes(ByteString value)
public Generator.Builder setNameBytes(ByteString value)
The unique identifier of the generator.
Must be set for the
Generators.UpdateGenerator
method. [Generators.CreateGenerate][] populates the name automatically.
Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
ID>/generators/<Generator ID>
.
string name = 1;
Parameter | |
---|---|
Name | Description |
value |
ByteString The bytes for name to set. |
Returns | |
---|---|
Type | Description |
Generator.Builder |
This builder for chaining. |
setPlaceholders(int index, Generator.Placeholder value)
public Generator.Builder setPlaceholders(int index, Generator.Placeholder value)
Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
Parameters | |
---|---|
Name | Description |
index |
int |
value |
Generator.Placeholder |
Returns | |
---|---|
Type | Description |
Generator.Builder |
setPlaceholders(int index, Generator.Placeholder.Builder builderForValue)
public Generator.Builder setPlaceholders(int index, Generator.Placeholder.Builder builderForValue)
Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];
Parameters | |
---|---|
Name | Description |
index |
int |
builderForValue |
Generator.Placeholder.Builder |
Returns | |
---|---|
Type | Description |
Generator.Builder |
setPromptText(Phrase value)
public Generator.Builder setPromptText(Phrase value)
Required. Prompt for the LLM model.
.google.cloud.dialogflow.cx.v3.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
Parameter | |
---|---|
Name | Description |
value |
Phrase |
Returns | |
---|---|
Type | Description |
Generator.Builder |
setPromptText(Phrase.Builder builderForValue)
public Generator.Builder setPromptText(Phrase.Builder builderForValue)
Required. Prompt for the LLM model.
.google.cloud.dialogflow.cx.v3.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
Parameter | |
---|---|
Name | Description |
builderForValue |
Phrase.Builder |
Returns | |
---|---|
Type | Description |
Generator.Builder |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Generator.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
index |
int |
value |
Object |
Returns | |
---|---|
Type | Description |
Generator.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final Generator.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
Generator.Builder |