Class: Google::Cloud::DiscoveryEngine::V1beta::AssistAnswer

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/discoveryengine/v1beta/assist_answer.rb

Overview

AssistAnswer resource, main part of [AssistResponse][google.cloud.discoveryengine.v1beta.AssistResponse].

Defined Under Namespace

Modules: AssistSkippedReason, State Classes: CustomerPolicyEnforcementResult, Reply

Instance Attribute Summary collapse

Instance Attribute Details

#assist_skipped_reasons::Array<::Google::Cloud::DiscoveryEngine::V1beta::AssistAnswer::AssistSkippedReason>

Returns Reasons for not answering the assist call.

Returns:



48
49
50
51
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# File 'proto_docs/google/cloud/discoveryengine/v1beta/assist_answer.rb', line 48

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

  # One part of the multi-part response of the assist call.
  # @!attribute [rw] grounded_content
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AssistantGroundedContent]
  #     Possibly grounded response text or media from the assistant.
  # @!attribute [rw] create_time
  #   @return [::Google::Protobuf::Timestamp]
  #     The time when the reply was created.
  class Reply
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Customer policy enforcement results. Contains the results of the various
  # policy checks, like the banned phrases or the Model Armor checks.
  # @!attribute [rw] verdict
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AssistAnswer::CustomerPolicyEnforcementResult::Verdict]
  #     Final verdict of the customer policy enforcement. If only one policy
  #     blocked the processing, the verdict is BLOCK.
  # @!attribute [rw] policy_results
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::AssistAnswer::CustomerPolicyEnforcementResult::PolicyEnforcementResult>]
  #     Customer policy enforcement results.
  #     Populated only if the assist call was skipped due to a policy
  #     violation. It contains results from those filters that blocked the
  #     processing of the query.
  class CustomerPolicyEnforcementResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Customer policy enforcement result for the banned phrase policy.
    # @!attribute [rw] banned_phrases
    #   @return [::Array<::String>]
    #     The banned phrases that were found in the query or the answer.
    class BannedPhraseEnforcementResult
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Customer policy enforcement result for the Model Armor policy.
    # @!attribute [rw] model_armor_violation
    #   @return [::String]
    #     The Model Armor violation that was found.
    #
    #     Note: The following fields are mutually exclusive: `model_armor_violation`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] error
    #   @return [::Google::Rpc::Status]
    #     The error returned by Model Armor if the policy enforcement failed
    #     for some reason.
    #
    #     Note: The following fields are mutually exclusive: `error`, `model_armor_violation`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    class ModelArmorEnforcementResult
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Customer policy enforcement result for a single policy type.
    # @!attribute [rw] banned_phrase_enforcement_result
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AssistAnswer::CustomerPolicyEnforcementResult::BannedPhraseEnforcementResult]
    #     The policy enforcement result for the banned phrase policy.
    #
    #     Note: The following fields are mutually exclusive: `banned_phrase_enforcement_result`, `model_armor_enforcement_result`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] model_armor_enforcement_result
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AssistAnswer::CustomerPolicyEnforcementResult::ModelArmorEnforcementResult]
    #     The policy enforcement result for the Model Armor policy.
    #
    #     Note: The following fields are mutually exclusive: `model_armor_enforcement_result`, `banned_phrase_enforcement_result`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    class PolicyEnforcementResult
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # The verdict of the customer policy enforcement.
    module Verdict
      # Unknown value.
      UNSPECIFIED = 0

      # There was no policy violation.
      ALLOW = 1

      # Processing was blocked by the customer policy.
      BLOCK = 2
    end
  end

  # State of the answer generation.
  module State
    # Unknown.
    STATE_UNSPECIFIED = 0

    # Assist operation is currently in progress.
    IN_PROGRESS = 1

    # Assist operation has failed.
    FAILED = 2

    # Assist operation has succeeded.
    SUCCEEDED = 3

    # Assist operation has been skipped.
    SKIPPED = 4

    # Assist operation has been cancelled (e.g. client closed the stream).
    # May contain a partial response.
    CANCELLED = 5
  end

  # Possible reasons for not answering an assist call.
  module AssistSkippedReason
    # Default value. Skip reason is not specified.
    ASSIST_SKIPPED_REASON_UNSPECIFIED = 0

    # The assistant ignored the query, because it did not appear to be
    # answer-seeking.
    NON_ASSIST_SEEKING_QUERY_IGNORED = 1

    # The assistant ignored the query or refused to answer because of a
    # customer policy violation (e.g., the query or the answer contained a
    # banned phrase).
    CUSTOMER_POLICY_VIOLATION = 2
  end
end

#customer_policy_enforcement_result::Google::Cloud::DiscoveryEngine::V1beta::AssistAnswer::CustomerPolicyEnforcementResult

Returns Optional. The field contains information about the various policy checks' results like the banned phrases or the Model Armor checks. This field is populated only if the assist call was skipped due to a policy violation.

Returns:



48
49
50
51
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# File 'proto_docs/google/cloud/discoveryengine/v1beta/assist_answer.rb', line 48

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

  # One part of the multi-part response of the assist call.
  # @!attribute [rw] grounded_content
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AssistantGroundedContent]
  #     Possibly grounded response text or media from the assistant.
  # @!attribute [rw] create_time
  #   @return [::Google::Protobuf::Timestamp]
  #     The time when the reply was created.
  class Reply
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Customer policy enforcement results. Contains the results of the various
  # policy checks, like the banned phrases or the Model Armor checks.
  # @!attribute [rw] verdict
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AssistAnswer::CustomerPolicyEnforcementResult::Verdict]
  #     Final verdict of the customer policy enforcement. If only one policy
  #     blocked the processing, the verdict is BLOCK.
  # @!attribute [rw] policy_results
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::AssistAnswer::CustomerPolicyEnforcementResult::PolicyEnforcementResult>]
  #     Customer policy enforcement results.
  #     Populated only if the assist call was skipped due to a policy
  #     violation. It contains results from those filters that blocked the
  #     processing of the query.
  class CustomerPolicyEnforcementResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Customer policy enforcement result for the banned phrase policy.
    # @!attribute [rw] banned_phrases
    #   @return [::Array<::String>]
    #     The banned phrases that were found in the query or the answer.
    class BannedPhraseEnforcementResult
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Customer policy enforcement result for the Model Armor policy.
    # @!attribute [rw] model_armor_violation
    #   @return [::String]
    #     The Model Armor violation that was found.
    #
    #     Note: The following fields are mutually exclusive: `model_armor_violation`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] error
    #   @return [::Google::Rpc::Status]
    #     The error returned by Model Armor if the policy enforcement failed
    #     for some reason.
    #
    #     Note: The following fields are mutually exclusive: `error`, `model_armor_violation`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    class ModelArmorEnforcementResult
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Customer policy enforcement result for a single policy type.
    # @!attribute [rw] banned_phrase_enforcement_result
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AssistAnswer::CustomerPolicyEnforcementResult::BannedPhraseEnforcementResult]
    #     The policy enforcement result for the banned phrase policy.
    #
    #     Note: The following fields are mutually exclusive: `banned_phrase_enforcement_result`, `model_armor_enforcement_result`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] model_armor_enforcement_result
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AssistAnswer::CustomerPolicyEnforcementResult::ModelArmorEnforcementResult]
    #     The policy enforcement result for the Model Armor policy.
    #
    #     Note: The following fields are mutually exclusive: `model_armor_enforcement_result`, `banned_phrase_enforcement_result`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    class PolicyEnforcementResult
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # The verdict of the customer policy enforcement.
    module Verdict
      # Unknown value.
      UNSPECIFIED = 0

      # There was no policy violation.
      ALLOW = 1

      # Processing was blocked by the customer policy.
      BLOCK = 2
    end
  end

  # State of the answer generation.
  module State
    # Unknown.
    STATE_UNSPECIFIED = 0

    # Assist operation is currently in progress.
    IN_PROGRESS = 1

    # Assist operation has failed.
    FAILED = 2

    # Assist operation has succeeded.
    SUCCEEDED = 3

    # Assist operation has been skipped.
    SKIPPED = 4

    # Assist operation has been cancelled (e.g. client closed the stream).
    # May contain a partial response.
    CANCELLED = 5
  end

  # Possible reasons for not answering an assist call.
  module AssistSkippedReason
    # Default value. Skip reason is not specified.
    ASSIST_SKIPPED_REASON_UNSPECIFIED = 0

    # The assistant ignored the query, because it did not appear to be
    # answer-seeking.
    NON_ASSIST_SEEKING_QUERY_IGNORED = 1

    # The assistant ignored the query or refused to answer because of a
    # customer policy violation (e.g., the query or the answer contained a
    # banned phrase).
    CUSTOMER_POLICY_VIOLATION = 2
  end
end

#name::String

Returns Immutable. Identifier. Resource name of the AssistAnswer. Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer}

This field must be a UTF-8 encoded string with a length limit of 1024 characters.

Returns:

  • (::String)

    Immutable. Identifier. Resource name of the AssistAnswer. Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer}

    This field must be a UTF-8 encoded string with a length limit of 1024 characters.



48
49
50
51
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# File 'proto_docs/google/cloud/discoveryengine/v1beta/assist_answer.rb', line 48

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

  # One part of the multi-part response of the assist call.
  # @!attribute [rw] grounded_content
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AssistantGroundedContent]
  #     Possibly grounded response text or media from the assistant.
  # @!attribute [rw] create_time
  #   @return [::Google::Protobuf::Timestamp]
  #     The time when the reply was created.
  class Reply
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Customer policy enforcement results. Contains the results of the various
  # policy checks, like the banned phrases or the Model Armor checks.
  # @!attribute [rw] verdict
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AssistAnswer::CustomerPolicyEnforcementResult::Verdict]
  #     Final verdict of the customer policy enforcement. If only one policy
  #     blocked the processing, the verdict is BLOCK.
  # @!attribute [rw] policy_results
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::AssistAnswer::CustomerPolicyEnforcementResult::PolicyEnforcementResult>]
  #     Customer policy enforcement results.
  #     Populated only if the assist call was skipped due to a policy
  #     violation. It contains results from those filters that blocked the
  #     processing of the query.
  class CustomerPolicyEnforcementResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Customer policy enforcement result for the banned phrase policy.
    # @!attribute [rw] banned_phrases
    #   @return [::Array<::String>]
    #     The banned phrases that were found in the query or the answer.
    class BannedPhraseEnforcementResult
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Customer policy enforcement result for the Model Armor policy.
    # @!attribute [rw] model_armor_violation
    #   @return [::String]
    #     The Model Armor violation that was found.
    #
    #     Note: The following fields are mutually exclusive: `model_armor_violation`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] error
    #   @return [::Google::Rpc::Status]
    #     The error returned by Model Armor if the policy enforcement failed
    #     for some reason.
    #
    #     Note: The following fields are mutually exclusive: `error`, `model_armor_violation`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    class ModelArmorEnforcementResult
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Customer policy enforcement result for a single policy type.
    # @!attribute [rw] banned_phrase_enforcement_result
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AssistAnswer::CustomerPolicyEnforcementResult::BannedPhraseEnforcementResult]
    #     The policy enforcement result for the banned phrase policy.
    #
    #     Note: The following fields are mutually exclusive: `banned_phrase_enforcement_result`, `model_armor_enforcement_result`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] model_armor_enforcement_result
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AssistAnswer::CustomerPolicyEnforcementResult::ModelArmorEnforcementResult]
    #     The policy enforcement result for the Model Armor policy.
    #
    #     Note: The following fields are mutually exclusive: `model_armor_enforcement_result`, `banned_phrase_enforcement_result`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    class PolicyEnforcementResult
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # The verdict of the customer policy enforcement.
    module Verdict
      # Unknown value.
      UNSPECIFIED = 0

      # There was no policy violation.
      ALLOW = 1

      # Processing was blocked by the customer policy.
      BLOCK = 2
    end
  end

  # State of the answer generation.
  module State
    # Unknown.
    STATE_UNSPECIFIED = 0

    # Assist operation is currently in progress.
    IN_PROGRESS = 1

    # Assist operation has failed.
    FAILED = 2

    # Assist operation has succeeded.
    SUCCEEDED = 3

    # Assist operation has been skipped.
    SKIPPED = 4

    # Assist operation has been cancelled (e.g. client closed the stream).
    # May contain a partial response.
    CANCELLED = 5
  end

  # Possible reasons for not answering an assist call.
  module AssistSkippedReason
    # Default value. Skip reason is not specified.
    ASSIST_SKIPPED_REASON_UNSPECIFIED = 0

    # The assistant ignored the query, because it did not appear to be
    # answer-seeking.
    NON_ASSIST_SEEKING_QUERY_IGNORED = 1

    # The assistant ignored the query or refused to answer because of a
    # customer policy violation (e.g., the query or the answer contained a
    # banned phrase).
    CUSTOMER_POLICY_VIOLATION = 2
  end
end

#replies::Array<::Google::Cloud::DiscoveryEngine::V1beta::AssistAnswer::Reply>

Returns Replies of the assistant.

Returns:



48
49
50
51
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# File 'proto_docs/google/cloud/discoveryengine/v1beta/assist_answer.rb', line 48

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

  # One part of the multi-part response of the assist call.
  # @!attribute [rw] grounded_content
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AssistantGroundedContent]
  #     Possibly grounded response text or media from the assistant.
  # @!attribute [rw] create_time
  #   @return [::Google::Protobuf::Timestamp]
  #     The time when the reply was created.
  class Reply
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Customer policy enforcement results. Contains the results of the various
  # policy checks, like the banned phrases or the Model Armor checks.
  # @!attribute [rw] verdict
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AssistAnswer::CustomerPolicyEnforcementResult::Verdict]
  #     Final verdict of the customer policy enforcement. If only one policy
  #     blocked the processing, the verdict is BLOCK.
  # @!attribute [rw] policy_results
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::AssistAnswer::CustomerPolicyEnforcementResult::PolicyEnforcementResult>]
  #     Customer policy enforcement results.
  #     Populated only if the assist call was skipped due to a policy
  #     violation. It contains results from those filters that blocked the
  #     processing of the query.
  class CustomerPolicyEnforcementResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Customer policy enforcement result for the banned phrase policy.
    # @!attribute [rw] banned_phrases
    #   @return [::Array<::String>]
    #     The banned phrases that were found in the query or the answer.
    class BannedPhraseEnforcementResult
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Customer policy enforcement result for the Model Armor policy.
    # @!attribute [rw] model_armor_violation
    #   @return [::String]
    #     The Model Armor violation that was found.
    #
    #     Note: The following fields are mutually exclusive: `model_armor_violation`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] error
    #   @return [::Google::Rpc::Status]
    #     The error returned by Model Armor if the policy enforcement failed
    #     for some reason.
    #
    #     Note: The following fields are mutually exclusive: `error`, `model_armor_violation`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    class ModelArmorEnforcementResult
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Customer policy enforcement result for a single policy type.
    # @!attribute [rw] banned_phrase_enforcement_result
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AssistAnswer::CustomerPolicyEnforcementResult::BannedPhraseEnforcementResult]
    #     The policy enforcement result for the banned phrase policy.
    #
    #     Note: The following fields are mutually exclusive: `banned_phrase_enforcement_result`, `model_armor_enforcement_result`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] model_armor_enforcement_result
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AssistAnswer::CustomerPolicyEnforcementResult::ModelArmorEnforcementResult]
    #     The policy enforcement result for the Model Armor policy.
    #
    #     Note: The following fields are mutually exclusive: `model_armor_enforcement_result`, `banned_phrase_enforcement_result`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    class PolicyEnforcementResult
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # The verdict of the customer policy enforcement.
    module Verdict
      # Unknown value.
      UNSPECIFIED = 0

      # There was no policy violation.
      ALLOW = 1

      # Processing was blocked by the customer policy.
      BLOCK = 2
    end
  end

  # State of the answer generation.
  module State
    # Unknown.
    STATE_UNSPECIFIED = 0

    # Assist operation is currently in progress.
    IN_PROGRESS = 1

    # Assist operation has failed.
    FAILED = 2

    # Assist operation has succeeded.
    SUCCEEDED = 3

    # Assist operation has been skipped.
    SKIPPED = 4

    # Assist operation has been cancelled (e.g. client closed the stream).
    # May contain a partial response.
    CANCELLED = 5
  end

  # Possible reasons for not answering an assist call.
  module AssistSkippedReason
    # Default value. Skip reason is not specified.
    ASSIST_SKIPPED_REASON_UNSPECIFIED = 0

    # The assistant ignored the query, because it did not appear to be
    # answer-seeking.
    NON_ASSIST_SEEKING_QUERY_IGNORED = 1

    # The assistant ignored the query or refused to answer because of a
    # customer policy violation (e.g., the query or the answer contained a
    # banned phrase).
    CUSTOMER_POLICY_VIOLATION = 2
  end
end

#state::Google::Cloud::DiscoveryEngine::V1beta::AssistAnswer::State

Returns State of the answer generation.

Returns:



48
49
50
51
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# File 'proto_docs/google/cloud/discoveryengine/v1beta/assist_answer.rb', line 48

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

  # One part of the multi-part response of the assist call.
  # @!attribute [rw] grounded_content
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AssistantGroundedContent]
  #     Possibly grounded response text or media from the assistant.
  # @!attribute [rw] create_time
  #   @return [::Google::Protobuf::Timestamp]
  #     The time when the reply was created.
  class Reply
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Customer policy enforcement results. Contains the results of the various
  # policy checks, like the banned phrases or the Model Armor checks.
  # @!attribute [rw] verdict
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AssistAnswer::CustomerPolicyEnforcementResult::Verdict]
  #     Final verdict of the customer policy enforcement. If only one policy
  #     blocked the processing, the verdict is BLOCK.
  # @!attribute [rw] policy_results
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::AssistAnswer::CustomerPolicyEnforcementResult::PolicyEnforcementResult>]
  #     Customer policy enforcement results.
  #     Populated only if the assist call was skipped due to a policy
  #     violation. It contains results from those filters that blocked the
  #     processing of the query.
  class CustomerPolicyEnforcementResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Customer policy enforcement result for the banned phrase policy.
    # @!attribute [rw] banned_phrases
    #   @return [::Array<::String>]
    #     The banned phrases that were found in the query or the answer.
    class BannedPhraseEnforcementResult
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Customer policy enforcement result for the Model Armor policy.
    # @!attribute [rw] model_armor_violation
    #   @return [::String]
    #     The Model Armor violation that was found.
    #
    #     Note: The following fields are mutually exclusive: `model_armor_violation`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] error
    #   @return [::Google::Rpc::Status]
    #     The error returned by Model Armor if the policy enforcement failed
    #     for some reason.
    #
    #     Note: The following fields are mutually exclusive: `error`, `model_armor_violation`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    class ModelArmorEnforcementResult
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Customer policy enforcement result for a single policy type.
    # @!attribute [rw] banned_phrase_enforcement_result
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AssistAnswer::CustomerPolicyEnforcementResult::BannedPhraseEnforcementResult]
    #     The policy enforcement result for the banned phrase policy.
    #
    #     Note: The following fields are mutually exclusive: `banned_phrase_enforcement_result`, `model_armor_enforcement_result`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!attribute [rw] model_armor_enforcement_result
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AssistAnswer::CustomerPolicyEnforcementResult::ModelArmorEnforcementResult]
    #     The policy enforcement result for the Model Armor policy.
    #
    #     Note: The following fields are mutually exclusive: `model_armor_enforcement_result`, `banned_phrase_enforcement_result`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    class PolicyEnforcementResult
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # The verdict of the customer policy enforcement.
    module Verdict
      # Unknown value.
      UNSPECIFIED = 0

      # There was no policy violation.
      ALLOW = 1

      # Processing was blocked by the customer policy.
      BLOCK = 2
    end
  end

  # State of the answer generation.
  module State
    # Unknown.
    STATE_UNSPECIFIED = 0

    # Assist operation is currently in progress.
    IN_PROGRESS = 1

    # Assist operation has failed.
    FAILED = 2

    # Assist operation has succeeded.
    SUCCEEDED = 3

    # Assist operation has been skipped.
    SKIPPED = 4

    # Assist operation has been cancelled (e.g. client closed the stream).
    # May contain a partial response.
    CANCELLED = 5
  end

  # Possible reasons for not answering an assist call.
  module AssistSkippedReason
    # Default value. Skip reason is not specified.
    ASSIST_SKIPPED_REASON_UNSPECIFIED = 0

    # The assistant ignored the query, because it did not appear to be
    # answer-seeking.
    NON_ASSIST_SEEKING_QUERY_IGNORED = 1

    # The assistant ignored the query or refused to answer because of a
    # customer policy violation (e.g., the query or the answer contained a
    # banned phrase).
    CUSTOMER_POLICY_VIOLATION = 2
  end
end