google-apis-dialogflow_v2 0.87.0 → 0.89.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -119,13 +119,13 @@ module Google
119
119
  class GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings
120
120
  include Google::Apis::Core::Hashable
121
121
 
122
- # If true, DF Interaction logging is currently enabled.
122
+ # Enables DF Interaction logging.
123
123
  # Corresponds to the JSON property `enableInteractionLogging`
124
124
  # @return [Boolean]
125
125
  attr_accessor :enable_interaction_logging
126
126
  alias_method :enable_interaction_logging?, :enable_interaction_logging
127
127
 
128
- # If true, StackDriver logging is currently enabled.
128
+ # Enables StackDriver logging.
129
129
  # Corresponds to the JSON property `enableStackdriverLogging`
130
130
  # @return [Boolean]
131
131
  attr_accessor :enable_stackdriver_logging
@@ -3965,13 +3965,13 @@ module Google
3965
3965
  class GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings
3966
3966
  include Google::Apis::Core::Hashable
3967
3967
 
3968
- # If true, DF Interaction logging is currently enabled.
3968
+ # Enables DF Interaction logging.
3969
3969
  # Corresponds to the JSON property `enableInteractionLogging`
3970
3970
  # @return [Boolean]
3971
3971
  attr_accessor :enable_interaction_logging
3972
3972
  alias_method :enable_interaction_logging?, :enable_interaction_logging
3973
3973
 
3974
- # If true, StackDriver logging is currently enabled.
3974
+ # Enables StackDriver logging.
3975
3975
  # Corresponds to the JSON property `enableStackdriverLogging`
3976
3976
  # @return [Boolean]
3977
3977
  attr_accessor :enable_stackdriver_logging
@@ -6238,6 +6238,11 @@ module Google
6238
6238
  # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowCxV3beta1TextInput]
6239
6239
  attr_accessor :text
6240
6240
 
6241
+ # The result of calling a tool's action that has been executed by the client.
6242
+ # Corresponds to the JSON property `toolCallResult`
6243
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowCxV3beta1ToolCallResult]
6244
+ attr_accessor :tool_call_result
6245
+
6241
6246
  def initialize(**args)
6242
6247
  update!(**args)
6243
6248
  end
@@ -6250,6 +6255,7 @@ module Google
6250
6255
  @intent = args[:intent] if args.key?(:intent)
6251
6256
  @language_code = args[:language_code] if args.key?(:language_code)
6252
6257
  @text = args[:text] if args.key?(:text)
6258
+ @tool_call_result = args[:tool_call_result] if args.key?(:tool_call_result)
6253
6259
  end
6254
6260
  end
6255
6261
 
@@ -6366,6 +6372,11 @@ module Google
6366
6372
  # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowCxV3beta1ResponseMessageText]
6367
6373
  attr_accessor :text
6368
6374
 
6375
+ # Represents a call of a specific tool's action with the specified inputs.
6376
+ # Corresponds to the JSON property `toolCall`
6377
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowCxV3beta1ToolCall]
6378
+ attr_accessor :tool_call
6379
+
6369
6380
  def initialize(**args)
6370
6381
  update!(**args)
6371
6382
  end
@@ -6383,6 +6394,7 @@ module Google
6383
6394
  @play_audio = args[:play_audio] if args.key?(:play_audio)
6384
6395
  @telephony_transfer_call = args[:telephony_transfer_call] if args.key?(:telephony_transfer_call)
6385
6396
  @text = args[:text] if args.key?(:text)
6397
+ @tool_call = args[:tool_call] if args.key?(:tool_call)
6386
6398
  end
6387
6399
  end
6388
6400
 
@@ -7005,6 +7017,95 @@ module Google
7005
7017
  end
7006
7018
  end
7007
7019
 
7020
+ # Represents a call of a specific tool's action with the specified inputs.
7021
+ class GoogleCloudDialogflowCxV3beta1ToolCall
7022
+ include Google::Apis::Core::Hashable
7023
+
7024
+ # Required. The name of the tool's action associated with this call.
7025
+ # Corresponds to the JSON property `action`
7026
+ # @return [String]
7027
+ attr_accessor :action
7028
+
7029
+ # Optional. The action's input parameters.
7030
+ # Corresponds to the JSON property `inputParameters`
7031
+ # @return [Hash<String,Object>]
7032
+ attr_accessor :input_parameters
7033
+
7034
+ # Required. The tool associated with this call. Format: `projects//locations//
7035
+ # agents//tools/`.
7036
+ # Corresponds to the JSON property `tool`
7037
+ # @return [String]
7038
+ attr_accessor :tool
7039
+
7040
+ def initialize(**args)
7041
+ update!(**args)
7042
+ end
7043
+
7044
+ # Update properties of this object
7045
+ def update!(**args)
7046
+ @action = args[:action] if args.key?(:action)
7047
+ @input_parameters = args[:input_parameters] if args.key?(:input_parameters)
7048
+ @tool = args[:tool] if args.key?(:tool)
7049
+ end
7050
+ end
7051
+
7052
+ # The result of calling a tool's action that has been executed by the client.
7053
+ class GoogleCloudDialogflowCxV3beta1ToolCallResult
7054
+ include Google::Apis::Core::Hashable
7055
+
7056
+ # Required. The name of the tool's action associated with this call.
7057
+ # Corresponds to the JSON property `action`
7058
+ # @return [String]
7059
+ attr_accessor :action
7060
+
7061
+ # An error produced by the tool call.
7062
+ # Corresponds to the JSON property `error`
7063
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowCxV3beta1ToolCallResultError]
7064
+ attr_accessor :error
7065
+
7066
+ # The tool call's output parameters.
7067
+ # Corresponds to the JSON property `outputParameters`
7068
+ # @return [Hash<String,Object>]
7069
+ attr_accessor :output_parameters
7070
+
7071
+ # Required. The tool associated with this call. Format: `projects//locations//
7072
+ # agents//tools/`.
7073
+ # Corresponds to the JSON property `tool`
7074
+ # @return [String]
7075
+ attr_accessor :tool
7076
+
7077
+ def initialize(**args)
7078
+ update!(**args)
7079
+ end
7080
+
7081
+ # Update properties of this object
7082
+ def update!(**args)
7083
+ @action = args[:action] if args.key?(:action)
7084
+ @error = args[:error] if args.key?(:error)
7085
+ @output_parameters = args[:output_parameters] if args.key?(:output_parameters)
7086
+ @tool = args[:tool] if args.key?(:tool)
7087
+ end
7088
+ end
7089
+
7090
+ # An error produced by the tool call.
7091
+ class GoogleCloudDialogflowCxV3beta1ToolCallResultError
7092
+ include Google::Apis::Core::Hashable
7093
+
7094
+ # Optional. The error message of the function.
7095
+ # Corresponds to the JSON property `message`
7096
+ # @return [String]
7097
+ attr_accessor :message
7098
+
7099
+ def initialize(**args)
7100
+ update!(**args)
7101
+ end
7102
+
7103
+ # Update properties of this object
7104
+ def update!(**args)
7105
+ @message = args[:message] if args.key?(:message)
7106
+ end
7107
+ end
7108
+
7008
7109
  # A transition route specifies a intent that can be matched and/or a data
7009
7110
  # condition that can be evaluated during a session. When a specified transition
7010
7111
  # is matched, the following actions are taken in order: * If there is a `
@@ -7845,6 +7946,11 @@ module Google
7845
7946
  # @return [String]
7846
7947
  attr_accessor :document_efficiency
7847
7948
 
7949
+ # Feedback for knowledge assist.
7950
+ # Corresponds to the JSON property `knowledgeAssistFeedback`
7951
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeAssistFeedback]
7952
+ attr_accessor :knowledge_assist_feedback
7953
+
7848
7954
  # Feedback for knowledge search.
7849
7955
  # Corresponds to the JSON property `knowledgeSearchFeedback`
7850
7956
  # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeSearchFeedback]
@@ -7864,11 +7970,41 @@ module Google
7864
7970
  @answer_relevance = args[:answer_relevance] if args.key?(:answer_relevance)
7865
7971
  @document_correctness = args[:document_correctness] if args.key?(:document_correctness)
7866
7972
  @document_efficiency = args[:document_efficiency] if args.key?(:document_efficiency)
7973
+ @knowledge_assist_feedback = args[:knowledge_assist_feedback] if args.key?(:knowledge_assist_feedback)
7867
7974
  @knowledge_search_feedback = args[:knowledge_search_feedback] if args.key?(:knowledge_search_feedback)
7868
7975
  @summarization_feedback = args[:summarization_feedback] if args.key?(:summarization_feedback)
7869
7976
  end
7870
7977
  end
7871
7978
 
7979
+ # Feedback for knowledge assist.
7980
+ class GoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeAssistFeedback
7981
+ include Google::Apis::Core::Hashable
7982
+
7983
+ # Whether the suggested answer was copied by the human agent. If the value is
7984
+ # set to be true, AnswerFeedback.clicked will be updated to be true.
7985
+ # Corresponds to the JSON property `answerCopied`
7986
+ # @return [Boolean]
7987
+ attr_accessor :answer_copied
7988
+ alias_method :answer_copied?, :answer_copied
7989
+
7990
+ # The URIs clicked by the human agent. The value is appended for each
7991
+ # UpdateAnswerRecordRequest. If the value is not empty, AnswerFeedback.clicked
7992
+ # will be updated to be true.
7993
+ # Corresponds to the JSON property `clickedUris`
7994
+ # @return [Array<String>]
7995
+ attr_accessor :clicked_uris
7996
+
7997
+ def initialize(**args)
7998
+ update!(**args)
7999
+ end
8000
+
8001
+ # Update properties of this object
8002
+ def update!(**args)
8003
+ @answer_copied = args[:answer_copied] if args.key?(:answer_copied)
8004
+ @clicked_uris = args[:clicked_uris] if args.key?(:clicked_uris)
8005
+ end
8006
+ end
8007
+
7872
8008
  # Feedback for knowledge search.
7873
8009
  class GoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeSearchFeedback
7874
8010
  include Google::Apis::Core::Hashable
@@ -8884,6 +9020,25 @@ module Google
8884
9020
  end
8885
9021
  end
8886
9022
 
9023
+ # Context of the conversation, including transcripts.
9024
+ class GoogleCloudDialogflowV2ConversationContext
9025
+ include Google::Apis::Core::Hashable
9026
+
9027
+ # Optional. List of message transcripts in the conversation.
9028
+ # Corresponds to the JSON property `messageEntries`
9029
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2MessageEntry>]
9030
+ attr_accessor :message_entries
9031
+
9032
+ def initialize(**args)
9033
+ update!(**args)
9034
+ end
9035
+
9036
+ # Update properties of this object
9037
+ def update!(**args)
9038
+ @message_entries = args[:message_entries] if args.key?(:message_entries)
9039
+ end
9040
+ end
9041
+
8887
9042
  # Represents a conversation dataset that a user imports raw data into. The data
8888
9043
  # inside ConversationDataset can not be changed after ImportConversationData
8889
9044
  # finishes (and calling ImportConversationData on a dataset that already has
@@ -10302,6 +10457,46 @@ module Google
10302
10457
  end
10303
10458
  end
10304
10459
 
10460
+ # Providing examples in the generator (i.e. building a few-shot generator) helps
10461
+ # convey the desired format of the LLM response. NEXT_ID: 10
10462
+ class GoogleCloudDialogflowV2FewShotExample
10463
+ include Google::Apis::Core::Hashable
10464
+
10465
+ # Context of the conversation, including transcripts.
10466
+ # Corresponds to the JSON property `conversationContext`
10467
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ConversationContext]
10468
+ attr_accessor :conversation_context
10469
+
10470
+ # Optional. Key is the placeholder field name in input, value is the value of
10471
+ # the placeholder. E.g. instruction contains "@price", and ingested data has <"
10472
+ # price", "10">
10473
+ # Corresponds to the JSON property `extraInfo`
10474
+ # @return [Hash<String,String>]
10475
+ attr_accessor :extra_info
10476
+
10477
+ # Suggestion generated using a Generator.
10478
+ # Corresponds to the JSON property `output`
10479
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2GeneratorSuggestion]
10480
+ attr_accessor :output
10481
+
10482
+ # List of summarization sections.
10483
+ # Corresponds to the JSON property `summarizationSectionList`
10484
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SummarizationSectionList]
10485
+ attr_accessor :summarization_section_list
10486
+
10487
+ def initialize(**args)
10488
+ update!(**args)
10489
+ end
10490
+
10491
+ # Update properties of this object
10492
+ def update!(**args)
10493
+ @conversation_context = args[:conversation_context] if args.key?(:conversation_context)
10494
+ @extra_info = args[:extra_info] if args.key?(:extra_info)
10495
+ @output = args[:output] if args.key?(:output)
10496
+ @summarization_section_list = args[:summarization_section_list] if args.key?(:summarization_section_list)
10497
+ end
10498
+ end
10499
+
10305
10500
  # By default, your agent responds to a matched intent with a static response. As
10306
10501
  # an alternative, you can provide a more dynamic response by using fulfillment.
10307
10502
  # When you enable fulfillment for an intent, Dialogflow responds to that intent
@@ -10473,6 +10668,64 @@ module Google
10473
10668
  end
10474
10669
  end
10475
10670
 
10671
+ # The request message for Conversations.GenerateStatelessSuggestion.
10672
+ class GoogleCloudDialogflowV2GenerateStatelessSuggestionRequest
10673
+ include Google::Apis::Core::Hashable
10674
+
10675
+ # Context of the conversation, including transcripts.
10676
+ # Corresponds to the JSON property `conversationContext`
10677
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ConversationContext]
10678
+ attr_accessor :conversation_context
10679
+
10680
+ # LLM generator.
10681
+ # Corresponds to the JSON property `generator`
10682
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Generator]
10683
+ attr_accessor :generator
10684
+
10685
+ # The resource name of the existing created generator. Format: `projects//
10686
+ # locations//generators/`
10687
+ # Corresponds to the JSON property `generatorName`
10688
+ # @return [String]
10689
+ attr_accessor :generator_name
10690
+
10691
+ # Optional. A list of trigger events. Generator will be triggered only if it's
10692
+ # trigger event is included here.
10693
+ # Corresponds to the JSON property `triggerEvents`
10694
+ # @return [Array<String>]
10695
+ attr_accessor :trigger_events
10696
+
10697
+ def initialize(**args)
10698
+ update!(**args)
10699
+ end
10700
+
10701
+ # Update properties of this object
10702
+ def update!(**args)
10703
+ @conversation_context = args[:conversation_context] if args.key?(:conversation_context)
10704
+ @generator = args[:generator] if args.key?(:generator)
10705
+ @generator_name = args[:generator_name] if args.key?(:generator_name)
10706
+ @trigger_events = args[:trigger_events] if args.key?(:trigger_events)
10707
+ end
10708
+ end
10709
+
10710
+ # The response message for Conversations.GenerateStatelessSuggestion.
10711
+ class GoogleCloudDialogflowV2GenerateStatelessSuggestionResponse
10712
+ include Google::Apis::Core::Hashable
10713
+
10714
+ # Suggestion generated using a Generator.
10715
+ # Corresponds to the JSON property `generatorSuggestion`
10716
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2GeneratorSuggestion]
10717
+ attr_accessor :generator_suggestion
10718
+
10719
+ def initialize(**args)
10720
+ update!(**args)
10721
+ end
10722
+
10723
+ # Update properties of this object
10724
+ def update!(**args)
10725
+ @generator_suggestion = args[:generator_suggestion] if args.key?(:generator_suggestion)
10726
+ end
10727
+ end
10728
+
10476
10729
  # The request message for Conversations.GenerateStatelessSummary.
10477
10730
  class GoogleCloudDialogflowV2GenerateStatelessSummaryRequest
10478
10731
  include Google::Apis::Core::Hashable
@@ -10608,6 +10861,82 @@ module Google
10608
10861
  end
10609
10862
  end
10610
10863
 
10864
+ # LLM generator.
10865
+ class GoogleCloudDialogflowV2Generator
10866
+ include Google::Apis::Core::Hashable
10867
+
10868
+ # Output only. Creation time of this generator.
10869
+ # Corresponds to the JSON property `createTime`
10870
+ # @return [String]
10871
+ attr_accessor :create_time
10872
+
10873
+ # Optional. Human readable description of the generator.
10874
+ # Corresponds to the JSON property `description`
10875
+ # @return [String]
10876
+ attr_accessor :description
10877
+
10878
+ # The parameters of inference.
10879
+ # Corresponds to the JSON property `inferenceParameter`
10880
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2InferenceParameter]
10881
+ attr_accessor :inference_parameter
10882
+
10883
+ # Output only. Identifier. The resource name of the generator. Format: `projects/
10884
+ # /locations//generators/`
10885
+ # Corresponds to the JSON property `name`
10886
+ # @return [String]
10887
+ attr_accessor :name
10888
+
10889
+ # Summarization context that customer can configure.
10890
+ # Corresponds to the JSON property `summarizationContext`
10891
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SummarizationContext]
10892
+ attr_accessor :summarization_context
10893
+
10894
+ # Optional. The trigger event of the generator. It defines when the generator is
10895
+ # triggered in a conversation.
10896
+ # Corresponds to the JSON property `triggerEvent`
10897
+ # @return [String]
10898
+ attr_accessor :trigger_event
10899
+
10900
+ # Output only. Update time of this generator.
10901
+ # Corresponds to the JSON property `updateTime`
10902
+ # @return [String]
10903
+ attr_accessor :update_time
10904
+
10905
+ def initialize(**args)
10906
+ update!(**args)
10907
+ end
10908
+
10909
+ # Update properties of this object
10910
+ def update!(**args)
10911
+ @create_time = args[:create_time] if args.key?(:create_time)
10912
+ @description = args[:description] if args.key?(:description)
10913
+ @inference_parameter = args[:inference_parameter] if args.key?(:inference_parameter)
10914
+ @name = args[:name] if args.key?(:name)
10915
+ @summarization_context = args[:summarization_context] if args.key?(:summarization_context)
10916
+ @trigger_event = args[:trigger_event] if args.key?(:trigger_event)
10917
+ @update_time = args[:update_time] if args.key?(:update_time)
10918
+ end
10919
+ end
10920
+
10921
+ # Suggestion generated using a Generator.
10922
+ class GoogleCloudDialogflowV2GeneratorSuggestion
10923
+ include Google::Apis::Core::Hashable
10924
+
10925
+ # Suggested summary of the conversation.
10926
+ # Corresponds to the JSON property `summarySuggestion`
10927
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SummarySuggestion]
10928
+ attr_accessor :summary_suggestion
10929
+
10930
+ def initialize(**args)
10931
+ update!(**args)
10932
+ end
10933
+
10934
+ # Update properties of this object
10935
+ def update!(**args)
10936
+ @summary_suggestion = args[:summary_suggestion] if args.key?(:summary_suggestion)
10937
+ end
10938
+ end
10939
+
10611
10940
  # Defines the Human Agent Assist to connect to a conversation.
10612
10941
  class GoogleCloudDialogflowV2HumanAgentAssistantConfig
10613
10942
  include Google::Apis::Core::Hashable
@@ -10739,12 +11068,29 @@ module Google
10739
11068
  class GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig
10740
11069
  include Google::Apis::Core::Hashable
10741
11070
 
11071
+ # Optional. When disable_high_latency_features_sync_delivery is true and using
11072
+ # the AnalyzeContent API, we will not deliver the responses from high latency
11073
+ # features in the API response. The human_agent_assistant_config.
11074
+ # notification_config must be configured and enable_event_based_suggestion must
11075
+ # be set to true to receive the responses from high latency features in Pub/Sub.
11076
+ # High latency feature(s): KNOWLEDGE_ASSIST.
11077
+ # Corresponds to the JSON property `disableHighLatencyFeaturesSyncDelivery`
11078
+ # @return [Boolean]
11079
+ attr_accessor :disable_high_latency_features_sync_delivery
11080
+ alias_method :disable_high_latency_features_sync_delivery?, :disable_high_latency_features_sync_delivery
11081
+
10742
11082
  # Configuration of different suggestion features. One feature can have only one
10743
11083
  # config.
10744
11084
  # Corresponds to the JSON property `featureConfigs`
10745
11085
  # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig>]
10746
11086
  attr_accessor :feature_configs
10747
11087
 
11088
+ # Optional. List of various generator resource names used in the conversation
11089
+ # profile.
11090
+ # Corresponds to the JSON property `generators`
11091
+ # @return [Array<String>]
11092
+ attr_accessor :generators
11093
+
10748
11094
  # If `group_suggestion_responses` is false, and there are multiple `
10749
11095
  # feature_configs` in `event based suggestion` or StreamingAnalyzeContent, we
10750
11096
  # will try to deliver suggestions to customers as soon as we get new suggestion.
@@ -10764,7 +11110,9 @@ module Google
10764
11110
 
10765
11111
  # Update properties of this object
10766
11112
  def update!(**args)
11113
+ @disable_high_latency_features_sync_delivery = args[:disable_high_latency_features_sync_delivery] if args.key?(:disable_high_latency_features_sync_delivery)
10767
11114
  @feature_configs = args[:feature_configs] if args.key?(:feature_configs)
11115
+ @generators = args[:generators] if args.key?(:generators)
10768
11116
  @group_suggestion_responses = args[:group_suggestion_responses] if args.key?(:group_suggestion_responses)
10769
11117
  end
10770
11118
  end
@@ -10807,6 +11155,20 @@ module Google
10807
11155
  attr_accessor :enable_event_based_suggestion
10808
11156
  alias_method :enable_event_based_suggestion?, :enable_event_based_suggestion
10809
11157
 
11158
+ # Optional. Enable query suggestion only. Supported features: KNOWLEDGE_ASSIST
11159
+ # Corresponds to the JSON property `enableQuerySuggestionOnly`
11160
+ # @return [Boolean]
11161
+ attr_accessor :enable_query_suggestion_only
11162
+ alias_method :enable_query_suggestion_only?, :enable_query_suggestion_only
11163
+
11164
+ # Optional. Enable query suggestion even if we can't find its answer. By default,
11165
+ # queries are suggested only if we find its answer. Supported features:
11166
+ # KNOWLEDGE_ASSIST
11167
+ # Corresponds to the JSON property `enableQuerySuggestionWhenNoAnswer`
11168
+ # @return [Boolean]
11169
+ attr_accessor :enable_query_suggestion_when_no_answer
11170
+ alias_method :enable_query_suggestion_when_no_answer?, :enable_query_suggestion_when_no_answer
11171
+
10810
11172
  # Config for suggestion query.
10811
11173
  # Corresponds to the JSON property `queryConfig`
10812
11174
  # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig]
@@ -10835,6 +11197,8 @@ module Google
10835
11197
  @disable_agent_query_logging = args[:disable_agent_query_logging] if args.key?(:disable_agent_query_logging)
10836
11198
  @enable_conversation_augmented_query = args[:enable_conversation_augmented_query] if args.key?(:enable_conversation_augmented_query)
10837
11199
  @enable_event_based_suggestion = args[:enable_event_based_suggestion] if args.key?(:enable_event_based_suggestion)
11200
+ @enable_query_suggestion_only = args[:enable_query_suggestion_only] if args.key?(:enable_query_suggestion_only)
11201
+ @enable_query_suggestion_when_no_answer = args[:enable_query_suggestion_when_no_answer] if args.key?(:enable_query_suggestion_when_no_answer)
10838
11202
  @query_config = args[:query_config] if args.key?(:query_config)
10839
11203
  @suggestion_feature = args[:suggestion_feature] if args.key?(:suggestion_feature)
10840
11204
  @suggestion_trigger_settings = args[:suggestion_trigger_settings] if args.key?(:suggestion_trigger_settings)
@@ -11124,7 +11488,7 @@ module Google
11124
11488
  class GoogleCloudDialogflowV2HumanAgentHandoffConfig
11125
11489
  include Google::Apis::Core::Hashable
11126
11490
 
11127
- # Configuration specific to LivePerson (https://www.liveperson.com).
11491
+ # Configuration specific to [LivePerson](https://www.liveperson.com).
11128
11492
  # Corresponds to the JSON property `livePersonConfig`
11129
11493
  # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentHandoffConfigLivePersonConfig]
11130
11494
  attr_accessor :live_person_config
@@ -11145,7 +11509,7 @@ module Google
11145
11509
  end
11146
11510
  end
11147
11511
 
11148
- # Configuration specific to LivePerson (https://www.liveperson.com).
11512
+ # Configuration specific to [LivePerson](https://www.liveperson.com).
11149
11513
  class GoogleCloudDialogflowV2HumanAgentHandoffConfigLivePersonConfig
11150
11514
  include Google::Apis::Core::Hashable
11151
11515
 
@@ -11403,6 +11767,60 @@ module Google
11403
11767
  end
11404
11768
  end
11405
11769
 
11770
+ # The parameters of inference.
11771
+ class GoogleCloudDialogflowV2InferenceParameter
11772
+ include Google::Apis::Core::Hashable
11773
+
11774
+ # Optional. Maximum number of the output tokens for the generator.
11775
+ # Corresponds to the JSON property `maxOutputTokens`
11776
+ # @return [Fixnum]
11777
+ attr_accessor :max_output_tokens
11778
+
11779
+ # Optional. Controls the randomness of LLM predictions. Low temperature = less
11780
+ # random. High temperature = more random. If unset (or 0), uses a default value
11781
+ # of 0.
11782
+ # Corresponds to the JSON property `temperature`
11783
+ # @return [Float]
11784
+ attr_accessor :temperature
11785
+
11786
+ # Optional. Top-k changes how the model selects tokens for output. A top-k of 1
11787
+ # means the selected token is the most probable among all tokens in the model's
11788
+ # vocabulary (also called greedy decoding), while a top-k of 3 means that the
11789
+ # next token is selected from among the 3 most probable tokens (using
11790
+ # temperature). For each token selection step, the top K tokens with the highest
11791
+ # probabilities are sampled. Then tokens are further filtered based on topP with
11792
+ # the final token selected using temperature sampling. Specify a lower value for
11793
+ # less random responses and a higher value for more random responses. Acceptable
11794
+ # value is [1, 40], default to 40.
11795
+ # Corresponds to the JSON property `topK`
11796
+ # @return [Fixnum]
11797
+ attr_accessor :top_k
11798
+
11799
+ # Optional. Top-p changes how the model selects tokens for output. Tokens are
11800
+ # selected from most K (see topK parameter) probable to least until the sum of
11801
+ # their probabilities equals the top-p value. For example, if tokens A, B, and C
11802
+ # have a probability of 0.3, 0.2, and 0.1 and the top-p value is 0.5, then the
11803
+ # model will select either A or B as the next token (using temperature) and
11804
+ # doesn't consider C. The default top-p value is 0.95. Specify a lower value for
11805
+ # less random responses and a higher value for more random responses. Acceptable
11806
+ # value is [0.0, 1.0], default to 0.95.
11807
+ # Corresponds to the JSON property `topP`
11808
+ # @return [Float]
11809
+ attr_accessor :top_p
11810
+
11811
+ def initialize(**args)
11812
+ update!(**args)
11813
+ end
11814
+
11815
+ # Update properties of this object
11816
+ def update!(**args)
11817
+ @max_output_tokens = args[:max_output_tokens] if args.key?(:max_output_tokens)
11818
+ @temperature = args[:temperature] if args.key?(:temperature)
11819
+ @top_k = args[:top_k] if args.key?(:top_k)
11820
+ @top_p = args[:top_p] if args.key?(:top_p)
11821
+ end
11822
+ end
11823
+
11406
11824
  # Instructs the speech recognizer how to process the audio content.
11407
11825
  class GoogleCloudDialogflowV2InputAudioConfig
11408
11826
  include Google::Apis::Core::Hashable
@@ -12866,34 +13284,25 @@ module Google
12866
13284
  end
12867
13285
  end
12868
13286
 
12869
- # A knowledge base represents a collection of knowledge documents that you
12870
- # provide to Dialogflow. Your knowledge documents contain information that may
12871
- # be useful during conversations with end-users. Some Dialogflow features use
12872
- # knowledge bases when looking for a response to an end-user input. For more
12873
- # information, see the [knowledge base guide](https://cloud.google.com/
12874
- # dialogflow/docs/how/knowledge-bases). Note: The `projects.agent.knowledgeBases`
12875
- # resource is deprecated; only use `projects.knowledgeBases`.
12876
- class GoogleCloudDialogflowV2KnowledgeBase
13287
+ # Represents a Knowledge Assist answer.
13288
+ class GoogleCloudDialogflowV2KnowledgeAssistAnswer
12877
13289
  include Google::Apis::Core::Hashable
12878
13290
 
12879
- # Required. The display name of the knowledge base. The name must be 1024 bytes
12880
- # or less; otherwise, the creation request fails.
12881
- # Corresponds to the JSON property `displayName`
13291
+ # The name of the answer record. Format: `projects//locations//answer Records/`.
13292
+ # Corresponds to the JSON property `answerRecord`
12882
13293
  # @return [String]
12883
- attr_accessor :display_name
13294
+ attr_accessor :answer_record
12884
13295
 
12885
- # Language which represents the KnowledgeBase. When the KnowledgeBase is created/
12886
- # updated, expect this to be present for non en-us languages. When unspecified,
12887
- # the default language code en-us applies.
12888
- # Corresponds to the JSON property `languageCode`
12889
- # @return [String]
12890
- attr_accessor :language_code
13296
+ # Represents a suggested query.
13297
+ # Corresponds to the JSON property `suggestedQuery`
13298
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery]
13299
+ attr_accessor :suggested_query
12891
13300
 
12892
- # The knowledge base resource name. The name must be empty when creating a
12893
- # knowledge base. Format: `projects//locations//knowledgeBases/`.
12894
- # Corresponds to the JSON property `name`
12895
- # @return [String]
12896
- attr_accessor :name
13301
+ # Represents an answer from Knowledge. Currently supports FAQ and Generative
13302
+ # answers.
13303
+ # Corresponds to the JSON property `suggestedQueryAnswer`
13304
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer]
13305
+ attr_accessor :suggested_query_answer
12897
13306
 
12898
13307
  def initialize(**args)
12899
13308
  update!(**args)
@@ -12901,20 +13310,182 @@ module Google
12901
13310
 
12902
13311
  # Update properties of this object
12903
13312
  def update!(**args)
12904
- @display_name = args[:display_name] if args.key?(:display_name)
12905
- @language_code = args[:language_code] if args.key?(:language_code)
12906
- @name = args[:name] if args.key?(:name)
13313
+ @answer_record = args[:answer_record] if args.key?(:answer_record)
13314
+ @suggested_query = args[:suggested_query] if args.key?(:suggested_query)
13315
+ @suggested_query_answer = args[:suggested_query_answer] if args.key?(:suggested_query_answer)
12907
13316
  end
12908
13317
  end
12909
13318
 
12910
- # Metadata in google::longrunning::Operation for Knowledge operations.
12911
- class GoogleCloudDialogflowV2KnowledgeOperationMetadata
13319
+ # Represents an answer from Knowledge. Currently supports FAQ and Generative
13320
+ # answers.
13321
+ class GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer
12912
13322
  include Google::Apis::Core::Hashable
12913
13323
 
12914
- # Metadata related to the Export Data Operations (e.g. ExportDocument).
12915
- # Corresponds to the JSON property `exportOperationMetadata`
12916
- # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ExportOperationMetadata]
12917
- attr_accessor :export_operation_metadata
13324
+ # The piece of text from the `source` that answers this suggested query.
13325
+ # Corresponds to the JSON property `answerText`
13326
+ # @return [String]
13327
+ attr_accessor :answer_text
13328
+
13329
+ # Details about source of FAQ answer.
13330
+ # Corresponds to the JSON property `faqSource`
13331
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource]
13332
+ attr_accessor :faq_source
13333
+
13334
+ # Details about source of Generative answer.
13335
+ # Corresponds to the JSON property `generativeSource`
13336
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource]
13337
+ attr_accessor :generative_source
13338
+
13339
+ def initialize(**args)
13340
+ update!(**args)
13341
+ end
13342
+
13343
+ # Update properties of this object
13344
+ def update!(**args)
13345
+ @answer_text = args[:answer_text] if args.key?(:answer_text)
13346
+ @faq_source = args[:faq_source] if args.key?(:faq_source)
13347
+ @generative_source = args[:generative_source] if args.key?(:generative_source)
13348
+ end
13349
+ end
13350
+
13351
+ # Details about source of FAQ answer.
13352
+ class GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource
13353
+ include Google::Apis::Core::Hashable
13354
+
13355
+ # The corresponding FAQ question.
13356
+ # Corresponds to the JSON property `question`
13357
+ # @return [String]
13358
+ attr_accessor :question
13359
+
13360
+ def initialize(**args)
13361
+ update!(**args)
13362
+ end
13363
+
13364
+ # Update properties of this object
13365
+ def update!(**args)
13366
+ @question = args[:question] if args.key?(:question)
13367
+ end
13368
+ end
13369
+
13370
+ # Details about source of Generative answer.
13371
+ class GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource
13372
+ include Google::Apis::Core::Hashable
13373
+
13374
+ # All snippets used for this Generative Prediction, with their source URI and
13375
+ # data.
13376
+ # Corresponds to the JSON property `snippets`
13377
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet>]
13378
+ attr_accessor :snippets
13379
+
13380
+ def initialize(**args)
13381
+ update!(**args)
13382
+ end
13383
+
13384
+ # Update properties of this object
13385
+ def update!(**args)
13386
+ @snippets = args[:snippets] if args.key?(:snippets)
13387
+ end
13388
+ end
13389
+
13390
+ # Snippet Source for a Generative Prediction.
13391
+ class GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet
13392
+ include Google::Apis::Core::Hashable
13393
+
13394
+ # Text taken from that URI.
13395
+ # Corresponds to the JSON property `text`
13396
+ # @return [String]
13397
+ attr_accessor :text
13398
+
13399
+ # Title of the document.
13400
+ # Corresponds to the JSON property `title`
13401
+ # @return [String]
13402
+ attr_accessor :title
13403
+
13404
+ # URI the data is sourced from.
13405
+ # Corresponds to the JSON property `uri`
13406
+ # @return [String]
13407
+ attr_accessor :uri
13408
+
13409
+ def initialize(**args)
13410
+ update!(**args)
13411
+ end
13412
+
13413
+ # Update properties of this object
13414
+ def update!(**args)
13415
+ @text = args[:text] if args.key?(:text)
13416
+ @title = args[:title] if args.key?(:title)
13417
+ @uri = args[:uri] if args.key?(:uri)
13418
+ end
13419
+ end
13420
+
13421
+ # Represents a suggested query.
13422
+ class GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery
13423
+ include Google::Apis::Core::Hashable
13424
+
13425
+ # Suggested query text.
13426
+ # Corresponds to the JSON property `queryText`
13427
+ # @return [String]
13428
+ attr_accessor :query_text
13429
+
13430
+ def initialize(**args)
13431
+ update!(**args)
13432
+ end
13433
+
13434
+ # Update properties of this object
13435
+ def update!(**args)
13436
+ @query_text = args[:query_text] if args.key?(:query_text)
13437
+ end
13438
+ end
13439
+
13440
+ # A knowledge base represents a collection of knowledge documents that you
13441
+ # provide to Dialogflow. Your knowledge documents contain information that may
13442
+ # be useful during conversations with end-users. Some Dialogflow features use
13443
+ # knowledge bases when looking for a response to an end-user input. For more
13444
+ # information, see the [knowledge base guide](https://cloud.google.com/
13445
+ # dialogflow/docs/how/knowledge-bases). Note: The `projects.agent.knowledgeBases`
13446
+ # resource is deprecated; only use `projects.knowledgeBases`.
13447
+ class GoogleCloudDialogflowV2KnowledgeBase
13448
+ include Google::Apis::Core::Hashable
13449
+
13450
+ # Required. The display name of the knowledge base. The name must be 1024 bytes
13451
+ # or less; otherwise, the creation request fails.
13452
+ # Corresponds to the JSON property `displayName`
13453
+ # @return [String]
13454
+ attr_accessor :display_name
13455
+
13456
+ # Language which represents the KnowledgeBase. When the KnowledgeBase is created/
13457
+ # updated, expect this to be present for non en-us languages. When unspecified,
13458
+ # the default language code en-us applies.
13459
+ # Corresponds to the JSON property `languageCode`
13460
+ # @return [String]
13461
+ attr_accessor :language_code
13462
+
13463
+ # The knowledge base resource name. The name must be empty when creating a
13464
+ # knowledge base. Format: `projects//locations//knowledgeBases/`.
13465
+ # Corresponds to the JSON property `name`
13466
+ # @return [String]
13467
+ attr_accessor :name
13468
+
13469
+ def initialize(**args)
13470
+ update!(**args)
13471
+ end
13472
+
13473
+ # Update properties of this object
13474
+ def update!(**args)
13475
+ @display_name = args[:display_name] if args.key?(:display_name)
13476
+ @language_code = args[:language_code] if args.key?(:language_code)
13477
+ @name = args[:name] if args.key?(:name)
13478
+ end
13479
+ end
13480
+
13481
+ # Metadata in google::longrunning::Operation for Knowledge operations.
13482
+ class GoogleCloudDialogflowV2KnowledgeOperationMetadata
13483
+ include Google::Apis::Core::Hashable
13484
+
13485
+ # Metadata related to the Export Data Operations (e.g. ExportDocument).
13486
+ # Corresponds to the JSON property `exportOperationMetadata`
13487
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ExportOperationMetadata]
13488
+ attr_accessor :export_operation_metadata
12918
13489
 
12919
13490
  # The name of the knowledge base interacted with during the operation.
12920
13491
  # Corresponds to the JSON property `knowledgeBase`
@@ -13205,6 +13776,32 @@ module Google
13205
13776
  end
13206
13777
  end
13207
13778
 
13779
+ # Response of ListGenerators.
13780
+ class GoogleCloudDialogflowV2ListGeneratorsResponse
13781
+ include Google::Apis::Core::Hashable
13782
+
13783
+ # List of generators retrieved.
13784
+ # Corresponds to the JSON property `generators`
13785
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Generator>]
13786
+ attr_accessor :generators
13787
+
13788
+ # Token to retrieve the next page of results, or empty if there are no more
13789
+ # results in the list.
13790
+ # Corresponds to the JSON property `nextPageToken`
13791
+ # @return [String]
13792
+ attr_accessor :next_page_token
13793
+
13794
+ def initialize(**args)
13795
+ update!(**args)
13796
+ end
13797
+
13798
+ # Update properties of this object
13799
+ def update!(**args)
13800
+ @generators = args[:generators] if args.key?(:generators)
13801
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
13802
+ end
13803
+ end
13804
+
13208
13805
  # The response message for Intents.ListIntents.
13209
13806
  class GoogleCloudDialogflowV2ListIntentsResponse
13210
13807
  include Google::Apis::Core::Hashable
@@ -13492,6 +14089,45 @@ module Google
13492
14089
  end
13493
14090
  end
13494
14091
 
14092
+ # Represents a message entry of a conversation.
14093
+ class GoogleCloudDialogflowV2MessageEntry
14094
+ include Google::Apis::Core::Hashable
14095
+
14096
+ # Optional. Create time of the message entry.
14097
+ # Corresponds to the JSON property `createTime`
14098
+ # @return [String]
14099
+ attr_accessor :create_time
14100
+
14101
+ # Optional. The language of the text. See [Language Support](https://cloud.
14102
+ # google.com/dialogflow/docs/reference/language) for a list of the currently
14103
+ # supported language codes.
14104
+ # Corresponds to the JSON property `languageCode`
14105
+ # @return [String]
14106
+ attr_accessor :language_code
14107
+
14108
+ # Optional. Participant role of the message.
14109
+ # Corresponds to the JSON property `role`
14110
+ # @return [String]
14111
+ attr_accessor :role
14112
+
14113
+ # Optional. Transcript content of the message.
14114
+ # Corresponds to the JSON property `text`
14115
+ # @return [String]
14116
+ attr_accessor :text
14117
+
14118
+ def initialize(**args)
14119
+ update!(**args)
14120
+ end
14121
+
14122
+ # Update properties of this object
14123
+ def update!(**args)
14124
+ @create_time = args[:create_time] if args.key?(:create_time)
14125
+ @language_code = args[:language_code] if args.key?(:language_code)
14126
+ @role = args[:role] if args.key?(:role)
14127
+ @text = args[:text] if args.key?(:text)
14128
+ end
14129
+ end
14130
+
13495
14131
  # Defines notification behavior.
13496
14132
  class GoogleCloudDialogflowV2NotificationConfig
13497
14133
  include Google::Apis::Core::Hashable
@@ -14863,6 +15499,79 @@ module Google
14863
15499
  end
14864
15500
  end
14865
15501
 
15502
+ # The request message for Participants.SuggestKnowledgeAssist.
15503
+ class GoogleCloudDialogflowV2SuggestKnowledgeAssistRequest
15504
+ include Google::Apis::Core::Hashable
15505
+
15506
+ # Optional. Max number of messages prior to and including latest_message to use
15507
+ # as context when compiling the suggestion. The context size is by default 100
15508
+ # and at most 100.
15509
+ # Corresponds to the JSON property `contextSize`
15510
+ # @return [Fixnum]
15511
+ attr_accessor :context_size
15512
+
15513
+ # Optional. The name of the latest conversation message to compile suggestions
15514
+ # for. If empty, it will be the latest message of the conversation. Format: `
15515
+ # projects//locations//conversations//messages/`.
15516
+ # Corresponds to the JSON property `latestMessage`
15517
+ # @return [String]
15518
+ attr_accessor :latest_message
15519
+
15520
+ # Optional. The previously suggested query for the given conversation. This
15521
+ # helps identify whether the next suggestion we generate is resonably different
15522
+ # from the previous one. This is useful to avoid similar suggestions within the
15523
+ # conversation.
15524
+ # Corresponds to the JSON property `previousSuggestedQuery`
15525
+ # @return [String]
15526
+ attr_accessor :previous_suggested_query
15527
+
15528
+ def initialize(**args)
15529
+ update!(**args)
15530
+ end
15531
+
15532
+ # Update properties of this object
15533
+ def update!(**args)
15534
+ @context_size = args[:context_size] if args.key?(:context_size)
15535
+ @latest_message = args[:latest_message] if args.key?(:latest_message)
15536
+ @previous_suggested_query = args[:previous_suggested_query] if args.key?(:previous_suggested_query)
15537
+ end
15538
+ end
15539
+
15540
+ # The response message for Participants.SuggestKnowledgeAssist.
15541
+ class GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse
15542
+ include Google::Apis::Core::Hashable
15543
+
15544
+ # Number of messages prior to and including latest_message to compile the
15545
+ # suggestion. It may be smaller than the SuggestKnowledgeAssistRequest.
15546
+ # context_size field in the request if there are fewer messages in the
15547
+ # conversation.
15548
+ # Corresponds to the JSON property `contextSize`
15549
+ # @return [Fixnum]
15550
+ attr_accessor :context_size
15551
+
15552
+ # Represents a Knowledge Assist answer.
15553
+ # Corresponds to the JSON property `knowledgeAssistAnswer`
15554
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2KnowledgeAssistAnswer]
15555
+ attr_accessor :knowledge_assist_answer
15556
+
15557
+ # The name of the latest conversation message used to compile suggestion for.
15558
+ # Format: `projects//locations//conversations//messages/`.
15559
+ # Corresponds to the JSON property `latestMessage`
15560
+ # @return [String]
15561
+ attr_accessor :latest_message
15562
+
15563
+ def initialize(**args)
15564
+ update!(**args)
15565
+ end
15566
+
15567
+ # Update properties of this object
15568
+ def update!(**args)
15569
+ @context_size = args[:context_size] if args.key?(:context_size)
15570
+ @knowledge_assist_answer = args[:knowledge_assist_answer] if args.key?(:knowledge_assist_answer)
15571
+ @latest_message = args[:latest_message] if args.key?(:latest_message)
15572
+ end
15573
+ end
15574
+
14866
15575
  # The request message for Participants.SuggestSmartReplies.
14867
15576
  class GoogleCloudDialogflowV2SuggestSmartRepliesRequest
14868
15577
  include Google::Apis::Core::Hashable
@@ -15001,6 +15710,11 @@ module Google
15001
15710
  # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SuggestFaqAnswersResponse]
15002
15711
  attr_accessor :suggest_faq_answers_response
15003
15712
 
15713
+ # The response message for Participants.SuggestKnowledgeAssist.
15714
+ # Corresponds to the JSON property `suggestKnowledgeAssistResponse`
15715
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse]
15716
+ attr_accessor :suggest_knowledge_assist_response
15717
+
15004
15718
  # The response message for Participants.SuggestSmartReplies.
15005
15719
  # Corresponds to the JSON property `suggestSmartRepliesResponse`
15006
15720
  # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SuggestSmartRepliesResponse]
@@ -15015,10 +15729,147 @@ module Google
15015
15729
  @error = args[:error] if args.key?(:error)
15016
15730
  @suggest_articles_response = args[:suggest_articles_response] if args.key?(:suggest_articles_response)
15017
15731
  @suggest_faq_answers_response = args[:suggest_faq_answers_response] if args.key?(:suggest_faq_answers_response)
15732
+ @suggest_knowledge_assist_response = args[:suggest_knowledge_assist_response] if args.key?(:suggest_knowledge_assist_response)
15018
15733
  @suggest_smart_replies_response = args[:suggest_smart_replies_response] if args.key?(:suggest_smart_replies_response)
15019
15734
  end
15020
15735
  end
15021
15736
 
15737
+ # Summarization context that customer can configure.
15738
+ class GoogleCloudDialogflowV2SummarizationContext
15739
+ include Google::Apis::Core::Hashable
15740
+
15741
+ # Optional. List of few shot examples.
15742
+ # Corresponds to the JSON property `fewShotExamples`
15743
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2FewShotExample>]
15744
+ attr_accessor :few_shot_examples
15745
+
15746
+ # Optional. The target language of the generated summary. The language code for
15747
+ # conversation will be used if this field is empty. Supported 2.0 and later
15748
+ # versions.
15749
+ # Corresponds to the JSON property `outputLanguageCode`
15750
+ # @return [String]
15751
+ attr_accessor :output_language_code
15752
+
15753
+ # Optional. List of sections. Note it contains both predefined section sand
15754
+ # customer defined sections.
15755
+ # Corresponds to the JSON property `summarizationSections`
15756
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SummarizationSection>]
15757
+ attr_accessor :summarization_sections
15758
+
15759
+ # Optional. Version of the feature. If not set, default to latest version.
15760
+ # Current candidates are ["1.0"].
15761
+ # Corresponds to the JSON property `version`
15762
+ # @return [String]
15763
+ attr_accessor :version
15764
+
15765
+ def initialize(**args)
15766
+ update!(**args)
15767
+ end
15768
+
15769
+ # Update properties of this object
15770
+ def update!(**args)
15771
+ @few_shot_examples = args[:few_shot_examples] if args.key?(:few_shot_examples)
15772
+ @output_language_code = args[:output_language_code] if args.key?(:output_language_code)
15773
+ @summarization_sections = args[:summarization_sections] if args.key?(:summarization_sections)
15774
+ @version = args[:version] if args.key?(:version)
15775
+ end
15776
+ end
15777
+
15778
+ # Represents the section of summarization.
15779
+ class GoogleCloudDialogflowV2SummarizationSection
15780
+ include Google::Apis::Core::Hashable
15781
+
15782
+ # Optional. Definition of the section, for example, "what the customer needs
15783
+ # help with or has question about."
15784
+ # Corresponds to the JSON property `definition`
15785
+ # @return [String]
15786
+ attr_accessor :definition
15787
+
15788
+ # Optional. Name of the section, for example, "situation".
15789
+ # Corresponds to the JSON property `key`
15790
+ # @return [String]
15791
+ attr_accessor :key
15792
+
15793
+ # Optional. Type of the summarization section.
15794
+ # Corresponds to the JSON property `type`
15795
+ # @return [String]
15796
+ attr_accessor :type
15797
+
15798
+ def initialize(**args)
15799
+ update!(**args)
15800
+ end
15801
+
15802
+ # Update properties of this object
15803
+ def update!(**args)
15804
+ @definition = args[:definition] if args.key?(:definition)
15805
+ @key = args[:key] if args.key?(:key)
15806
+ @type = args[:type] if args.key?(:type)
15807
+ end
15808
+ end
15809
+
15810
+ # List of summarization sections.
15811
+ class GoogleCloudDialogflowV2SummarizationSectionList
15812
+ include Google::Apis::Core::Hashable
15813
+
15814
+ # Optional. Summarization sections.
15815
+ # Corresponds to the JSON property `summarizationSections`
15816
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SummarizationSection>]
15817
+ attr_accessor :summarization_sections
15818
+
15819
+ def initialize(**args)
15820
+ update!(**args)
15821
+ end
15822
+
15823
+ # Update properties of this object
15824
+ def update!(**args)
15825
+ @summarization_sections = args[:summarization_sections] if args.key?(:summarization_sections)
15826
+ end
15827
+ end
15828
+
15829
+ # Suggested summary of the conversation.
15830
+ class GoogleCloudDialogflowV2SummarySuggestion
15831
+ include Google::Apis::Core::Hashable
15832
+
15833
+ # Required. All the parts of generated summary.
15834
+ # Corresponds to the JSON property `summarySections`
15835
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SummarySuggestionSummarySection>]
15836
+ attr_accessor :summary_sections
15837
+
15838
+ def initialize(**args)
15839
+ update!(**args)
15840
+ end
15841
+
15842
+ # Update properties of this object
15843
+ def update!(**args)
15844
+ @summary_sections = args[:summary_sections] if args.key?(:summary_sections)
15845
+ end
15846
+ end
15847
+
15848
+ # A component of the generated summary.
15849
+ class GoogleCloudDialogflowV2SummarySuggestionSummarySection
15850
+ include Google::Apis::Core::Hashable
15851
+
15852
+ # Required. Name of the section.
15853
+ # Corresponds to the JSON property `section`
15854
+ # @return [String]
15855
+ attr_accessor :section
15856
+
15857
+ # Required. Summary text for the section.
15858
+ # Corresponds to the JSON property `summary`
15859
+ # @return [String]
15860
+ attr_accessor :summary
15861
+
15862
+ def initialize(**args)
15863
+ update!(**args)
15864
+ end
15865
+
15866
+ # Update properties of this object
15867
+ def update!(**args)
15868
+ @section = args[:section] if args.key?(:section)
15869
+ @summary = args[:summary] if args.key?(:summary)
15870
+ end
15871
+ end
15872
+
15022
15873
  # Configuration of how speech should be synthesized.
15023
15874
  class GoogleCloudDialogflowV2SynthesizeSpeechConfig
15024
15875
  include Google::Apis::Core::Hashable
@@ -17917,6 +18768,159 @@ module Google
17917
18768
  end
17918
18769
  end
17919
18770
 
18771
+ # Represents a Knowledge Assist answer.
18772
+ class GoogleCloudDialogflowV2beta1KnowledgeAssistAnswer
18773
+ include Google::Apis::Core::Hashable
18774
+
18775
+ # The name of the answer record. Format: `projects//locations//answer Records/`.
18776
+ # Corresponds to the JSON property `answerRecord`
18777
+ # @return [String]
18778
+ attr_accessor :answer_record
18779
+
18780
+ # Represents a suggested query.
18781
+ # Corresponds to the JSON property `suggestedQuery`
18782
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery]
18783
+ attr_accessor :suggested_query
18784
+
18785
+ # Represents an answer from Knowledge. Currently supports FAQ and Generative
18786
+ # answers.
18787
+ # Corresponds to the JSON property `suggestedQueryAnswer`
18788
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer]
18789
+ attr_accessor :suggested_query_answer
18790
+
18791
+ def initialize(**args)
18792
+ update!(**args)
18793
+ end
18794
+
18795
+ # Update properties of this object
18796
+ def update!(**args)
18797
+ @answer_record = args[:answer_record] if args.key?(:answer_record)
18798
+ @suggested_query = args[:suggested_query] if args.key?(:suggested_query)
18799
+ @suggested_query_answer = args[:suggested_query_answer] if args.key?(:suggested_query_answer)
18800
+ end
18801
+ end
18802
+
18803
+ # Represents an answer from Knowledge. Currently supports FAQ and Generative
18804
+ # answers.
18805
+ class GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer
18806
+ include Google::Apis::Core::Hashable
18807
+
18808
+ # The piece of text from the `source` that answers this suggested query.
18809
+ # Corresponds to the JSON property `answerText`
18810
+ # @return [String]
18811
+ attr_accessor :answer_text
18812
+
18813
+ # Details about source of FAQ answer.
18814
+ # Corresponds to the JSON property `faqSource`
18815
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource]
18816
+ attr_accessor :faq_source
18817
+
18818
+ # Details about source of Generative answer.
18819
+ # Corresponds to the JSON property `generativeSource`
18820
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource]
18821
+ attr_accessor :generative_source
18822
+
18823
+ def initialize(**args)
18824
+ update!(**args)
18825
+ end
18826
+
18827
+ # Update properties of this object
18828
+ def update!(**args)
18829
+ @answer_text = args[:answer_text] if args.key?(:answer_text)
18830
+ @faq_source = args[:faq_source] if args.key?(:faq_source)
18831
+ @generative_source = args[:generative_source] if args.key?(:generative_source)
18832
+ end
18833
+ end
18834
+
18835
+ # Details about source of FAQ answer.
18836
+ class GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource
18837
+ include Google::Apis::Core::Hashable
18838
+
18839
+ # The corresponding FAQ question.
18840
+ # Corresponds to the JSON property `question`
18841
+ # @return [String]
18842
+ attr_accessor :question
18843
+
18844
+ def initialize(**args)
18845
+ update!(**args)
18846
+ end
18847
+
18848
+ # Update properties of this object
18849
+ def update!(**args)
18850
+ @question = args[:question] if args.key?(:question)
18851
+ end
18852
+ end
18853
+
18854
+ # Details about source of Generative answer.
18855
+ class GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource
18856
+ include Google::Apis::Core::Hashable
18857
+
18858
+ # All snippets used for this Generative Prediction, with their source URI and
18859
+ # data.
18860
+ # Corresponds to the JSON property `snippets`
18861
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet>]
18862
+ attr_accessor :snippets
18863
+
18864
+ def initialize(**args)
18865
+ update!(**args)
18866
+ end
18867
+
18868
+ # Update properties of this object
18869
+ def update!(**args)
18870
+ @snippets = args[:snippets] if args.key?(:snippets)
18871
+ end
18872
+ end
18873
+
18874
+ # Snippet Source for a Generative Prediction.
18875
+ class GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet
18876
+ include Google::Apis::Core::Hashable
18877
+
18878
+ # Text taken from that URI.
18879
+ # Corresponds to the JSON property `text`
18880
+ # @return [String]
18881
+ attr_accessor :text
18882
+
18883
+ # Title of the document.
18884
+ # Corresponds to the JSON property `title`
18885
+ # @return [String]
18886
+ attr_accessor :title
18887
+
18888
+ # URI the data is sourced from.
18889
+ # Corresponds to the JSON property `uri`
18890
+ # @return [String]
18891
+ attr_accessor :uri
18892
+
18893
+ def initialize(**args)
18894
+ update!(**args)
18895
+ end
18896
+
18897
+ # Update properties of this object
18898
+ def update!(**args)
18899
+ @text = args[:text] if args.key?(:text)
18900
+ @title = args[:title] if args.key?(:title)
18901
+ @uri = args[:uri] if args.key?(:uri)
18902
+ end
18903
+ end
18904
+
18905
+ # Represents a suggested query.
18906
+ class GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery
18907
+ include Google::Apis::Core::Hashable
18908
+
18909
+ # Suggested query text.
18910
+ # Corresponds to the JSON property `queryText`
18911
+ # @return [String]
18912
+ attr_accessor :query_text
18913
+
18914
+ def initialize(**args)
18915
+ update!(**args)
18916
+ end
18917
+
18918
+ # Update properties of this object
18919
+ def update!(**args)
18920
+ @query_text = args[:query_text] if args.key?(:query_text)
18921
+ end
18922
+ end
18923
+
17920
18924
  # Metadata in google::longrunning::Operation for Knowledge operations.
17921
18925
  class GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata
17922
18926
  include Google::Apis::Core::Hashable
@@ -18543,6 +19547,41 @@ module Google
18543
19547
  end
18544
19548
  end
18545
19549
 
19550
+ # The response message for Participants.SuggestKnowledgeAssist.
19551
+ class GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse
19552
+ include Google::Apis::Core::Hashable
19553
+
19554
+ # Number of messages prior to and including latest_message to compile the
19555
+ # suggestion. It may be smaller than the SuggestKnowledgeAssistRequest.
19556
+ # context_size field in the request if there are fewer messages in the
19557
+ # conversation.
19558
+ # Corresponds to the JSON property `contextSize`
19559
+ # @return [Fixnum]
19560
+ attr_accessor :context_size
19561
+
19562
+ # Represents a Knowledge Assist answer.
19563
+ # Corresponds to the JSON property `knowledgeAssistAnswer`
19564
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1KnowledgeAssistAnswer]
19565
+ attr_accessor :knowledge_assist_answer
19566
+
19567
+ # The name of the latest conversation message used to compile suggestion for.
19568
+ # Format: `projects//locations//conversations//messages/`.
19569
+ # Corresponds to the JSON property `latestMessage`
19570
+ # @return [String]
19571
+ attr_accessor :latest_message
19572
+
19573
+ def initialize(**args)
19574
+ update!(**args)
19575
+ end
19576
+
19577
+ # Update properties of this object
19578
+ def update!(**args)
19579
+ @context_size = args[:context_size] if args.key?(:context_size)
19580
+ @knowledge_assist_answer = args[:knowledge_assist_answer] if args.key?(:knowledge_assist_answer)
19581
+ @latest_message = args[:latest_message] if args.key?(:latest_message)
19582
+ end
19583
+ end
19584
+
18546
19585
  # The response message for Participants.SuggestSmartReplies.
18547
19586
  class GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse
18548
19587
  include Google::Apis::Core::Hashable
@@ -18615,6 +19654,11 @@ module Google
18615
19654
  # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse]
18616
19655
  attr_accessor :suggest_faq_answers_response
18617
19656
 
19657
+ # The response message for Participants.SuggestKnowledgeAssist.
19658
+ # Corresponds to the JSON property `suggestKnowledgeAssistResponse`
19659
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse]
19660
+ attr_accessor :suggest_knowledge_assist_response
19661
+
18618
19662
  # The response message for Participants.SuggestSmartReplies.
18619
19663
  # Corresponds to the JSON property `suggestSmartRepliesResponse`
18620
19664
  # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse]
@@ -18631,6 +19675,7 @@ module Google
18631
19675
  @suggest_dialogflow_assists_response = args[:suggest_dialogflow_assists_response] if args.key?(:suggest_dialogflow_assists_response)
18632
19676
  @suggest_entity_extraction_response = args[:suggest_entity_extraction_response] if args.key?(:suggest_entity_extraction_response)
18633
19677
  @suggest_faq_answers_response = args[:suggest_faq_answers_response] if args.key?(:suggest_faq_answers_response)
19678
+ @suggest_knowledge_assist_response = args[:suggest_knowledge_assist_response] if args.key?(:suggest_knowledge_assist_response)
18634
19679
  @suggest_smart_replies_response = args[:suggest_smart_replies_response] if args.key?(:suggest_smart_replies_response)
18635
19680
  end
18636
19681
  end