Class: Google::Cloud::Dialogflow::CX::V3::Generator

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/dialogflow/cx/v3/generator.rb

Overview

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.

Defined Under Namespace

Classes: ModelParameter, Placeholder

Instance Attribute Summary collapse

Instance Attribute Details

#display_name::String

Returns 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.

Returns:

  • (::String)

    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.



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'proto_docs/google/cloud/dialogflow/cx/v3/generator.rb', line 52

class Generator
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents a custom placeholder in the prompt text.
  # @!attribute [rw] id
  #   @return [::String]
  #     Unique ID used to map custom placeholder to parameters in fulfillment.
  # @!attribute [rw] name
  #   @return [::String]
  #     Custom placeholder value in the prompt text.
  class Placeholder
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Parameters to be passed to the LLM. If not set, default values will be
  # used.
  # @!attribute [rw] temperature
  #   @return [::Float]
  #     The temperature used for sampling. Temperature sampling occurs after both
  #     topP and topK have been applied.
  #     Valid range: [0.0, 1.0]
  #     Low temperature = less random. High temperature = more random.
  # @!attribute [rw] max_decode_steps
  #   @return [::Integer]
  #     The maximum number of tokens to generate.
  # @!attribute [rw] top_p
  #   @return [::Float]
  #     If set, only the tokens comprising the top top_p probability mass are
  #     considered. If both top_p and top_k are
  #     set, top_p will be used for further refining candidates selected with
  #     top_k.
  #     Valid range: (0.0, 1.0].
  #     Small topP = less random. Large topP = more random.
  # @!attribute [rw] top_k
  #   @return [::Integer]
  #     If set, the sampling process in each step is limited to the top_k tokens
  #     with highest probabilities.
  #     Valid range: [1, 40] or 1000+.
  #     Small topK = less random. Large topK = more random.
  class ModelParameter
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#model_parameter::Google::Cloud::Dialogflow::CX::V3::Generator::ModelParameter

Returns Parameters passed to the LLM to configure its behavior.

Returns:



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'proto_docs/google/cloud/dialogflow/cx/v3/generator.rb', line 52

class Generator
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents a custom placeholder in the prompt text.
  # @!attribute [rw] id
  #   @return [::String]
  #     Unique ID used to map custom placeholder to parameters in fulfillment.
  # @!attribute [rw] name
  #   @return [::String]
  #     Custom placeholder value in the prompt text.
  class Placeholder
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Parameters to be passed to the LLM. If not set, default values will be
  # used.
  # @!attribute [rw] temperature
  #   @return [::Float]
  #     The temperature used for sampling. Temperature sampling occurs after both
  #     topP and topK have been applied.
  #     Valid range: [0.0, 1.0]
  #     Low temperature = less random. High temperature = more random.
  # @!attribute [rw] max_decode_steps
  #   @return [::Integer]
  #     The maximum number of tokens to generate.
  # @!attribute [rw] top_p
  #   @return [::Float]
  #     If set, only the tokens comprising the top top_p probability mass are
  #     considered. If both top_p and top_k are
  #     set, top_p will be used for further refining candidates selected with
  #     top_k.
  #     Valid range: (0.0, 1.0].
  #     Small topP = less random. Large topP = more random.
  # @!attribute [rw] top_k
  #   @return [::Integer]
  #     If set, the sampling process in each step is limited to the top_k tokens
  #     with highest probabilities.
  #     Valid range: [1, 40] or 1000+.
  #     Small topK = less random. Large topK = more random.
  class ModelParameter
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#name::String

Returns The unique identifier of the generator. Must be set for the Generators.UpdateGenerator method. [Generators.CreateGenerate][] populates the name automatically. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/generators/<GeneratorID>.

Returns:

  • (::String)

    The unique identifier of the generator. Must be set for the Generators.UpdateGenerator method. [Generators.CreateGenerate][] populates the name automatically. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/generators/<GeneratorID>.



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'proto_docs/google/cloud/dialogflow/cx/v3/generator.rb', line 52

class Generator
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents a custom placeholder in the prompt text.
  # @!attribute [rw] id
  #   @return [::String]
  #     Unique ID used to map custom placeholder to parameters in fulfillment.
  # @!attribute [rw] name
  #   @return [::String]
  #     Custom placeholder value in the prompt text.
  class Placeholder
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Parameters to be passed to the LLM. If not set, default values will be
  # used.
  # @!attribute [rw] temperature
  #   @return [::Float]
  #     The temperature used for sampling. Temperature sampling occurs after both
  #     topP and topK have been applied.
  #     Valid range: [0.0, 1.0]
  #     Low temperature = less random. High temperature = more random.
  # @!attribute [rw] max_decode_steps
  #   @return [::Integer]
  #     The maximum number of tokens to generate.
  # @!attribute [rw] top_p
  #   @return [::Float]
  #     If set, only the tokens comprising the top top_p probability mass are
  #     considered. If both top_p and top_k are
  #     set, top_p will be used for further refining candidates selected with
  #     top_k.
  #     Valid range: (0.0, 1.0].
  #     Small topP = less random. Large topP = more random.
  # @!attribute [rw] top_k
  #   @return [::Integer]
  #     If set, the sampling process in each step is limited to the top_k tokens
  #     with highest probabilities.
  #     Valid range: [1, 40] or 1000+.
  #     Small topK = less random. Large topK = more random.
  class ModelParameter
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#placeholders::Array<::Google::Cloud::Dialogflow::CX::V3::Generator::Placeholder>

Returns Optional. List of custom placeholders in the prompt text.

Returns:



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'proto_docs/google/cloud/dialogflow/cx/v3/generator.rb', line 52

class Generator
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents a custom placeholder in the prompt text.
  # @!attribute [rw] id
  #   @return [::String]
  #     Unique ID used to map custom placeholder to parameters in fulfillment.
  # @!attribute [rw] name
  #   @return [::String]
  #     Custom placeholder value in the prompt text.
  class Placeholder
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Parameters to be passed to the LLM. If not set, default values will be
  # used.
  # @!attribute [rw] temperature
  #   @return [::Float]
  #     The temperature used for sampling. Temperature sampling occurs after both
  #     topP and topK have been applied.
  #     Valid range: [0.0, 1.0]
  #     Low temperature = less random. High temperature = more random.
  # @!attribute [rw] max_decode_steps
  #   @return [::Integer]
  #     The maximum number of tokens to generate.
  # @!attribute [rw] top_p
  #   @return [::Float]
  #     If set, only the tokens comprising the top top_p probability mass are
  #     considered. If both top_p and top_k are
  #     set, top_p will be used for further refining candidates selected with
  #     top_k.
  #     Valid range: (0.0, 1.0].
  #     Small topP = less random. Large topP = more random.
  # @!attribute [rw] top_k
  #   @return [::Integer]
  #     If set, the sampling process in each step is limited to the top_k tokens
  #     with highest probabilities.
  #     Valid range: [1, 40] or 1000+.
  #     Small topK = less random. Large topK = more random.
  class ModelParameter
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#prompt_text::Google::Cloud::Dialogflow::CX::V3::Phrase

Returns Required. Prompt for the LLM model.

Returns:



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'proto_docs/google/cloud/dialogflow/cx/v3/generator.rb', line 52

class Generator
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents a custom placeholder in the prompt text.
  # @!attribute [rw] id
  #   @return [::String]
  #     Unique ID used to map custom placeholder to parameters in fulfillment.
  # @!attribute [rw] name
  #   @return [::String]
  #     Custom placeholder value in the prompt text.
  class Placeholder
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Parameters to be passed to the LLM. If not set, default values will be
  # used.
  # @!attribute [rw] temperature
  #   @return [::Float]
  #     The temperature used for sampling. Temperature sampling occurs after both
  #     topP and topK have been applied.
  #     Valid range: [0.0, 1.0]
  #     Low temperature = less random. High temperature = more random.
  # @!attribute [rw] max_decode_steps
  #   @return [::Integer]
  #     The maximum number of tokens to generate.
  # @!attribute [rw] top_p
  #   @return [::Float]
  #     If set, only the tokens comprising the top top_p probability mass are
  #     considered. If both top_p and top_k are
  #     set, top_p will be used for further refining candidates selected with
  #     top_k.
  #     Valid range: (0.0, 1.0].
  #     Small topP = less random. Large topP = more random.
  # @!attribute [rw] top_k
  #   @return [::Integer]
  #     If set, the sampling process in each step is limited to the top_k tokens
  #     with highest probabilities.
  #     Valid range: [1, 40] or 1000+.
  #     Small topK = less random. Large topK = more random.
  class ModelParameter
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end