Class Generator

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.dialogflow.cx.v3beta1.Generator
All Implemented Interfaces:
GeneratorOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class Generator extends com.google.protobuf.GeneratedMessage 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
See Also:
  • Field Details

    • NAME_FIELD_NUMBER

      public static final int NAME_FIELD_NUMBER
      See Also:
    • DISPLAY_NAME_FIELD_NUMBER

      public static final int DISPLAY_NAME_FIELD_NUMBER
      See Also:
    • PROMPT_TEXT_FIELD_NUMBER

      public static final int PROMPT_TEXT_FIELD_NUMBER
      See Also:
    • PLACEHOLDERS_FIELD_NUMBER

      public static final int PLACEHOLDERS_FIELD_NUMBER
      See Also:
    • LLM_MODEL_SETTINGS_FIELD_NUMBER

      public static final int LLM_MODEL_SETTINGS_FIELD_NUMBER
      See Also:
    • MODEL_PARAMETER_FIELD_NUMBER

      public static final int MODEL_PARAMETER_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getName

      public String 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:
      getName in interface GeneratorOrBuilder
      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:
      getNameBytes in interface GeneratorOrBuilder
      Returns:
      The bytes for name.
    • 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];
      Specified by:
      getDisplayName in interface GeneratorOrBuilder
      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:
      getDisplayNameBytes in interface GeneratorOrBuilder
      Returns:
      The bytes for displayName.
    • 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:
      hasPromptText in interface GeneratorOrBuilder
      Returns:
      Whether the promptText field is set.
    • getPromptText

      public Phrase getPromptText()
       Required. Prompt for the LLM model.
       
      .google.cloud.dialogflow.cx.v3beta1.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getPromptText in interface GeneratorOrBuilder
      Returns:
      The promptText.
    • getPromptTextOrBuilder

      public PhraseOrBuilder getPromptTextOrBuilder()
       Required. Prompt for the LLM model.
       
      .google.cloud.dialogflow.cx.v3beta1.Phrase prompt_text = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getPromptTextOrBuilder in interface GeneratorOrBuilder
    • getPlaceholdersList

      public List<Generator.Placeholder> 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:
      getPlaceholdersList in interface GeneratorOrBuilder
    • getPlaceholdersOrBuilderList

      public List<? extends Generator.PlaceholderOrBuilder> 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:
      getPlaceholdersOrBuilderList in interface GeneratorOrBuilder
    • 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:
      getPlaceholdersCount in interface GeneratorOrBuilder
    • getPlaceholders

      public Generator.Placeholder getPlaceholders(int index)
       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:
      getPlaceholders in interface GeneratorOrBuilder
    • getPlaceholdersOrBuilder

      public Generator.PlaceholderOrBuilder getPlaceholdersOrBuilder(int index)
       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:
      getPlaceholdersOrBuilder in interface GeneratorOrBuilder
    • hasLlmModelSettings

      public boolean hasLlmModelSettings()
       The LLM model settings.
       
      .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9;
      Specified by:
      hasLlmModelSettings in interface GeneratorOrBuilder
      Returns:
      Whether the llmModelSettings field is set.
    • getLlmModelSettings

      public LlmModelSettings getLlmModelSettings()
       The LLM model settings.
       
      .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9;
      Specified by:
      getLlmModelSettings in interface GeneratorOrBuilder
      Returns:
      The llmModelSettings.
    • getLlmModelSettingsOrBuilder

      public LlmModelSettingsOrBuilder getLlmModelSettingsOrBuilder()
       The LLM model settings.
       
      .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9;
      Specified by:
      getLlmModelSettingsOrBuilder in interface GeneratorOrBuilder
    • 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:
      hasModelParameter in interface GeneratorOrBuilder
      Returns:
      Whether the modelParameter field is set.
    • getModelParameter

      public Generator.ModelParameter getModelParameter()
       Parameters passed to the LLM to configure its behavior.
       
      .google.cloud.dialogflow.cx.v3beta1.Generator.ModelParameter model_parameter = 8;
      Specified by:
      getModelParameter in interface GeneratorOrBuilder
      Returns:
      The modelParameter.
    • getModelParameterOrBuilder

      public Generator.ModelParameterOrBuilder getModelParameterOrBuilder()
       Parameters passed to the LLM to configure its behavior.
       
      .google.cloud.dialogflow.cx.v3beta1.Generator.ModelParameter model_parameter = 8;
      Specified by:
      getModelParameterOrBuilder in interface GeneratorOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static Generator parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Generator parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Generator parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Generator parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Generator parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Generator parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Generator parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Generator parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Generator parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Generator parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Generator parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Generator parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public Generator.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static Generator.Builder newBuilder()
    • newBuilder

      public static Generator.Builder newBuilder(Generator prototype)
    • toBuilder

      public Generator.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected Generator.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static Generator getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<Generator> parser()
    • getParserForType

      public com.google.protobuf.Parser<Generator> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public Generator getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder