Class Generator.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Generator.Builder>
com.google.cloud.dialogflow.cx.v3beta1.Generator.Builder
- All Implemented Interfaces:
GeneratorOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- Generator
public static final class Generator.Builder
extends com.google.protobuf.GeneratedMessage.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.v3beta1.Generator-
Method Summary
Modifier and TypeMethodDescriptionaddAllPlaceholders(Iterable<? extends Generator.Placeholder> values) Optional.addPlaceholders(int index, Generator.Placeholder value) Optional.addPlaceholders(int index, Generator.Placeholder.Builder builderForValue) Optional.Optional.addPlaceholders(Generator.Placeholder.Builder builderForValue) Optional.Optional.addPlaceholdersBuilder(int index) Optional.build()clear()Required.The LLM model settings.Parameters passed to the LLM to configure its behavior.The unique identifier of the generator.Optional.Required.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorRequired.com.google.protobuf.ByteStringRequired.The LLM model settings.The LLM model settings.The LLM model settings.Parameters passed to the LLM to configure its behavior.Parameters passed to the LLM to configure its behavior.Parameters passed to the LLM to configure its behavior.getName()The unique identifier of the generator.com.google.protobuf.ByteStringThe unique identifier of the generator.getPlaceholders(int index) Optional.getPlaceholdersBuilder(int index) Optional.Optional.intOptional.Optional.getPlaceholdersOrBuilder(int index) Optional.List<? extends Generator.PlaceholderOrBuilder>Optional.Required.Required.Required.booleanThe LLM model settings.booleanParameters passed to the LLM to configure its behavior.booleanRequired.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) The LLM model settings.Parameters passed to the LLM to configure its behavior.mergePromptText(Phrase value) Required.removePlaceholders(int index) Optional.setDisplayName(String value) Required.setDisplayNameBytes(com.google.protobuf.ByteString value) Required.The LLM model settings.setLlmModelSettings(LlmModelSettings.Builder builderForValue) The LLM model settings.Parameters passed to the LLM to configure its behavior.setModelParameter(Generator.ModelParameter.Builder builderForValue) Parameters passed to the LLM to configure its behavior.The unique identifier of the generator.setNameBytes(com.google.protobuf.ByteString value) The unique identifier of the generator.setPlaceholders(int index, Generator.Placeholder value) Optional.setPlaceholders(int index, Generator.Placeholder.Builder builderForValue) Optional.setPromptText(Phrase value) Required.setPromptText(Phrase.Builder builderForValue) Required.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<Generator.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<Generator.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<Generator.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Generator.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Generator.Builder>
-
mergeFrom
public Generator.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Generator.Builder>- Throws:
IOException
-
getName
The unique identifier of the generator. Must be set for the [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3beta1.Generators.UpdateGenerator] method. [Generators.CreateGenerate][] populates the name automatically. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/generators/<GeneratorID>`.
string name = 1;- Specified by:
getNamein interfaceGeneratorOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()The unique identifier of the generator. Must be set for the [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3beta1.Generators.UpdateGenerator] method. [Generators.CreateGenerate][] populates the name automatically. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/generators/<GeneratorID>`.
string name = 1;- Specified by:
getNameBytesin interfaceGeneratorOrBuilder- Returns:
- The bytes for name.
-
setName
The unique identifier of the generator. Must be set for the [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3beta1.Generators.UpdateGenerator] method. [Generators.CreateGenerate][] populates the name automatically. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/generators/<GeneratorID>`.
string name = 1;- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
The unique identifier of the generator. Must be set for the [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3beta1.Generators.UpdateGenerator] method. [Generators.CreateGenerate][] populates the name automatically. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/generators/<GeneratorID>`.
string name = 1;- Returns:
- This builder for chaining.
-
setNameBytes
The unique identifier of the generator. Must be set for the [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3beta1.Generators.UpdateGenerator] method. [Generators.CreateGenerate][] populates the name automatically. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/generators/<GeneratorID>`.
string name = 1;- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
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];- Specified by:
getDisplayNamein interfaceGeneratorOrBuilder- Returns:
- The displayName.
-
getDisplayNameBytes
public 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];- Specified by:
getDisplayNameBytesin interfaceGeneratorOrBuilder- Returns:
- The bytes for displayName.
-
setDisplayName
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];- Parameters:
value- The displayName to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
setDisplayNameBytes
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];- Parameters:
value- The bytes for displayName to set.- Returns:
- This builder for chaining.
-
hasPromptText
public boolean hasPromptText()Required. Prompt for the LLM model.
.google.cloud.dialogflow.cx.v3beta1.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];- Specified by:
hasPromptTextin interfaceGeneratorOrBuilder- Returns:
- Whether the promptText field is set.
-
getPromptText
Required. Prompt for the LLM model.
.google.cloud.dialogflow.cx.v3beta1.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getPromptTextin interfaceGeneratorOrBuilder- Returns:
- The promptText.
-
setPromptText
Required. Prompt for the LLM model.
.google.cloud.dialogflow.cx.v3beta1.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED]; -
setPromptText
Required. Prompt for the LLM model.
.google.cloud.dialogflow.cx.v3beta1.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED]; -
mergePromptText
Required. Prompt for the LLM model.
.google.cloud.dialogflow.cx.v3beta1.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED]; -
clearPromptText
Required. Prompt for the LLM model.
.google.cloud.dialogflow.cx.v3beta1.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED]; -
getPromptTextBuilder
Required. Prompt for the LLM model.
.google.cloud.dialogflow.cx.v3beta1.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED]; -
getPromptTextOrBuilder
Required. Prompt for the LLM model.
.google.cloud.dialogflow.cx.v3beta1.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getPromptTextOrBuilderin interfaceGeneratorOrBuilder
-
getPlaceholdersList
Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getPlaceholdersListin interfaceGeneratorOrBuilder
-
getPlaceholdersCount
public int getPlaceholdersCount()Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getPlaceholdersCountin interfaceGeneratorOrBuilder
-
getPlaceholders
Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getPlaceholdersin interfaceGeneratorOrBuilder
-
setPlaceholders
Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL]; -
setPlaceholders
Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL]; -
addPlaceholders
Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL]; -
addPlaceholders
Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL]; -
addPlaceholders
Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL]; -
addPlaceholders
Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL]; -
addAllPlaceholders
Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL]; -
clearPlaceholders
Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL]; -
removePlaceholders
Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL]; -
getPlaceholdersBuilder
Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL]; -
getPlaceholdersOrBuilder
Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getPlaceholdersOrBuilderin interfaceGeneratorOrBuilder
-
getPlaceholdersOrBuilderList
Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getPlaceholdersOrBuilderListin interfaceGeneratorOrBuilder
-
addPlaceholdersBuilder
Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL]; -
addPlaceholdersBuilder
Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL]; -
getPlaceholdersBuilderList
Optional. List of custom placeholders in the prompt text.
repeated .google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder placeholders = 5 [(.google.api.field_behavior) = OPTIONAL]; -
hasLlmModelSettings
public boolean hasLlmModelSettings()The LLM model settings.
.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9;- Specified by:
hasLlmModelSettingsin interfaceGeneratorOrBuilder- Returns:
- Whether the llmModelSettings field is set.
-
getLlmModelSettings
The LLM model settings.
.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9;- Specified by:
getLlmModelSettingsin interfaceGeneratorOrBuilder- Returns:
- The llmModelSettings.
-
setLlmModelSettings
The LLM model settings.
.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9; -
setLlmModelSettings
The LLM model settings.
.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9; -
mergeLlmModelSettings
The LLM model settings.
.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9; -
clearLlmModelSettings
The LLM model settings.
.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9; -
getLlmModelSettingsBuilder
The LLM model settings.
.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9; -
getLlmModelSettingsOrBuilder
The LLM model settings.
.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9;- Specified by:
getLlmModelSettingsOrBuilderin interfaceGeneratorOrBuilder
-
hasModelParameter
public boolean hasModelParameter()Parameters passed to the LLM to configure its behavior.
.google.cloud.dialogflow.cx.v3beta1.Generator.ModelParameter model_parameter = 8;- Specified by:
hasModelParameterin interfaceGeneratorOrBuilder- Returns:
- Whether the modelParameter field is set.
-
getModelParameter
Parameters passed to the LLM to configure its behavior.
.google.cloud.dialogflow.cx.v3beta1.Generator.ModelParameter model_parameter = 8;- Specified by:
getModelParameterin interfaceGeneratorOrBuilder- Returns:
- The modelParameter.
-
setModelParameter
Parameters passed to the LLM to configure its behavior.
.google.cloud.dialogflow.cx.v3beta1.Generator.ModelParameter model_parameter = 8; -
setModelParameter
Parameters passed to the LLM to configure its behavior.
.google.cloud.dialogflow.cx.v3beta1.Generator.ModelParameter model_parameter = 8; -
mergeModelParameter
Parameters passed to the LLM to configure its behavior.
.google.cloud.dialogflow.cx.v3beta1.Generator.ModelParameter model_parameter = 8; -
clearModelParameter
Parameters passed to the LLM to configure its behavior.
.google.cloud.dialogflow.cx.v3beta1.Generator.ModelParameter model_parameter = 8; -
getModelParameterBuilder
Parameters passed to the LLM to configure its behavior.
.google.cloud.dialogflow.cx.v3beta1.Generator.ModelParameter model_parameter = 8; -
getModelParameterOrBuilder
Parameters passed to the LLM to configure its behavior.
.google.cloud.dialogflow.cx.v3beta1.Generator.ModelParameter model_parameter = 8;- Specified by:
getModelParameterOrBuilderin interfaceGeneratorOrBuilder
-