google-cloud-dialogflow-v2 1.8.0 → 1.9.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.
- checksums.yaml +4 -4
- data/lib/google/cloud/dialogflow/v2/conversation_pb.rb +8 -1
- data/lib/google/cloud/dialogflow/v2/conversation_services_pb.rb +7 -0
- data/lib/google/cloud/dialogflow/v2/conversations/client.rb +212 -1
- data/lib/google/cloud/dialogflow/v2/conversations/rest/client.rb +198 -1
- data/lib/google/cloud/dialogflow/v2/conversations/rest/service_stub.rb +132 -0
- data/lib/google/cloud/dialogflow/v2/generator_pb.rb +3 -1
- data/lib/google/cloud/dialogflow/v2/participant_pb.rb +5 -1
- data/lib/google/cloud/dialogflow/v2/rest.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
- data/lib/google/cloud/dialogflow/v2.rb +1 -1
- data/proto_docs/google/cloud/dialogflow/v2/audio_config.rb +2 -0
- data/proto_docs/google/cloud/dialogflow/v2/conversation.rb +154 -0
- data/proto_docs/google/cloud/dialogflow/v2/generator.rb +53 -0
- data/proto_docs/google/cloud/dialogflow/v2/participant.rb +46 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b539b60f59b5fe9d50e68178eca450e57689bf14ab392e224347f518ab916d4
|
4
|
+
data.tar.gz: f4c02f2b1049fcfac7d0d71de99f0c3435916fb0ac35766ed3487f3e04924a0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f025a9db6f85be81444c0dd9b537d21e4dc4e1874f1904dd21299bd691444acd026fc0e7cb58b95886de94ceaabfce83100368c08b3999cde4fe2db8e0705e2e
|
7
|
+
data.tar.gz: f31d59cb9d7dc278b4a9ca0b99d7cb05e9decfe65aaabca8a8e5c7a1c93b22f283ea1999d6d18b1f4bdf9c56aac796e66c55ee1af969620213755d725d1405ff
|
@@ -16,7 +16,7 @@ require 'google/protobuf/struct_pb'
|
|
16
16
|
require 'google/protobuf/timestamp_pb'
|
17
17
|
|
18
18
|
|
19
|
-
descriptor_data = "\n-google/cloud/dialogflow/v2/conversation.proto\x12\x1agoogle.cloud.dialogflow.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x35google/cloud/dialogflow/v2/conversation_profile.proto\x1a*google/cloud/dialogflow/v2/generator.proto\x1a,google/cloud/dialogflow/v2/participant.proto\x1a(google/cloud/dialogflow/v2/session.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe0\n\n\x0c\x43onversation\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12U\n\x0flifecycle_state\x18\x02 \x01(\x0e\x32\x37.google.cloud.dialogflow.v2.Conversation.LifecycleStateB\x03\xe0\x41\x03\x12S\n\x14\x63onversation_profile\x18\x03 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-dialogflow.googleapis.com/ConversationProfile\x12N\n\x0cphone_number\x18\x04 \x01(\x0b\x32\x33.google.cloud.dialogflow.v2.ConversationPhoneNumberB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12[\n\x12\x63onversation_stage\x18\x07 \x01(\x0e\x32:.google.cloud.dialogflow.v2.Conversation.ConversationStageB\x03\xe0\x41\x01\x12h\n\x19telephony_connection_info\x18\n \x01(\x0b\x32@.google.cloud.dialogflow.v2.Conversation.TelephonyConnectionInfoB\x03\xe0\x41\x03\x1a\x8e\x03\n\x17TelephonyConnectionInfo\x12\x1a\n\rdialed_number\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03sdp\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x64\n\x0bsip_headers\x18\x0c \x03(\x0b\x32J.google.cloud.dialogflow.v2.Conversation.TelephonyConnectionInfo.SipHeaderB\x03\xe0\x41\x03\x12n\n\x13\x65xtra_mime_contents\x18\r \x03(\x0b\x32L.google.cloud.dialogflow.v2.Conversation.TelephonyConnectionInfo.MimeContentB\x03\xe0\x41\x03\x1a\x32\n\tSipHeader\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05value\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a;\n\x0bMimeContent\x12\x16\n\tmime_type\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07\x63ontent\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x01\"Q\n\x0eLifecycleState\x12\x1f\n\x1bLIFECYCLE_STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIN_PROGRESS\x10\x01\x12\r\n\tCOMPLETED\x10\x02\"h\n\x11\x43onversationStage\x12\"\n\x1e\x43ONVERSATION_STAGE_UNSPECIFIED\x10\x00\x12\x17\n\x13VIRTUAL_AGENT_STAGE\x10\x01\x12\x16\n\x12HUMAN_ASSIST_STAGE\x10\x02:\xc0\x01\xea\x41\xbc\x01\n&dialogflow.googleapis.com/Conversation\x12/projects/{project}/conversations/{conversation}\x12\x44projects/{project}/locations/{location}/conversations/{conversation}*\rconversations2\x0c\x63onversation\"\xbe\x01\n\x19\x43reateConversationRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&dialogflow.googleapis.com/Conversation\x12\x43\n\x0c\x63onversation\x18\x02 \x01(\x0b\x32(.google.cloud.dialogflow.v2.ConversationB\x03\xe0\x41\x02\x12\x1c\n\x0f\x63onversation_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xa0\x01\n\x18ListConversationsRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&dialogflow.googleapis.com/Conversation\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"u\n\x19ListConversationsResponse\x12?\n\rconversations\x18\x01 \x03(\x0b\x32(.google.cloud.dialogflow.v2.Conversation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"V\n\x16GetConversationRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&dialogflow.googleapis.com/Conversation\"[\n\x1b\x43ompleteConversationRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&dialogflow.googleapis.com/Conversation\"\x96\x01\n\x13ListMessagesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!dialogflow.googleapis.com/Message\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"f\n\x14ListMessagesResponse\x12\x35\n\x08messages\x18\x01 \x03(\x0b\x32#.google.cloud.dialogflow.v2.Message\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"O\n\x17\x43onversationPhoneNumber\x12\x19\n\x0c\x63ountry_code\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x0cphone_number\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\x9c\x02\n!SuggestConversationSummaryRequest\x12\x44\n\x0c\x63onversation\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&dialogflow.googleapis.com/Conversation\x12\x41\n\x0elatest_message\x18\x03 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!dialogflow.googleapis.com/Message\x12\x19\n\x0c\x63ontext_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12S\n\x13\x61ssist_query_params\x18\x05 \x01(\x0b\x32\x31.google.cloud.dialogflow.v2.AssistQueryParametersB\x03\xe0\x41\x01\"\xf7\x03\n\"SuggestConversationSummaryResponse\x12W\n\x07summary\x18\x01 \x01(\x0b\x32\x46.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary\x12>\n\x0elatest_message\x18\x02 \x01(\tB&\xfa\x41#\n!dialogflow.googleapis.com/Message\x12\x14\n\x0c\x63ontext_size\x18\x03 \x01(\x05\x1a\xa1\x02\n\x07Summary\x12\x0c\n\x04text\x18\x01 \x01(\t\x12o\n\rtext_sections\x18\x04 \x03(\x0b\x32X.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary.TextSectionsEntry\x12\x42\n\ranswer_record\x18\x03 \x01(\tB+\xfa\x41(\n&dialogflow.googleapis.com/AnswerRecord\x12\x1e\n\x16\x62\x61seline_model_version\x18\x05 \x01(\t\x1a\x33\n\x11TextSectionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xdc\x03\n\x1fGenerateStatelessSummaryRequest\x12t\n\x16stateless_conversation\x18\x01 \x01(\x0b\x32O.google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversationB\x03\xe0\x41\x02\x12R\n\x14\x63onversation_profile\x18\x02 \x01(\x0b\x32/.google.cloud.dialogflow.v2.ConversationProfileB\x03\xe0\x41\x02\x12\x41\n\x0elatest_message\x18\x03 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!dialogflow.googleapis.com/Message\x12\x1d\n\x10max_context_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x1a\x8c\x01\n\x13MinimalConversation\x12:\n\x08messages\x18\x01 \x03(\x0b\x32#.google.cloud.dialogflow.v2.MessageB\x03\xe0\x41\x02\x12\x39\n\x06parent\x18\x02 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\"\xad\x03\n GenerateStatelessSummaryResponse\x12U\n\x07summary\x18\x01 \x01(\x0b\x32\x44.google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary\x12>\n\x0elatest_message\x18\x02 \x01(\tB&\xfa\x41#\n!dialogflow.googleapis.com/Message\x12\x14\n\x0c\x63ontext_size\x18\x03 \x01(\x05\x1a\xdb\x01\n\x07Summary\x12\x0c\n\x04text\x18\x01 \x01(\t\x12m\n\rtext_sections\x18\x02 \x03(\x0b\x32V.google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary.TextSectionsEntry\x12\x1e\n\x16\x62\x61seline_model_version\x18\x04 \x01(\t\x1a\x33\n\x11TextSectionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xe6\x02\n\"GenerateStatelessSuggestionRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12:\n\tgenerator\x18\x02 \x01(\x0b\x32%.google.cloud.dialogflow.v2.GeneratorH\x00\x12\x18\n\x0egenerator_name\x18\x03 \x01(\tH\x00\x12R\n\x14\x63onversation_context\x18\x05 \x01(\x0b\x32/.google.cloud.dialogflow.v2.ConversationContextB\x03\xe0\x41\x01\x12\x45\n\x0etrigger_events\x18\x06 \x03(\x0e\x32(.google.cloud.dialogflow.v2.TriggerEventB\x03\xe0\x41\x01\x42\x14\n\x12generator_resource\"y\n#GenerateStatelessSuggestionResponse\x12R\n\x14generator_suggestion\x18\x01 \x01(\x0b\x32/.google.cloud.dialogflow.v2.GeneratorSuggestionB\x03\xe0\x41\x02\"\x9c\x12\n\x16SearchKnowledgeRequest\x12\x13\n\x06parent\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x05query\x18\x01 \x01(\x0b\x32%.google.cloud.dialogflow.v2.TextInputB\x03\xe0\x41\x02\x12S\n\x14\x63onversation_profile\x18\x02 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-dialogflow.googleapis.com/ConversationProfile\x12\x17\n\nsession_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x0c\x63onversation\x18\x04 \x01(\tB.\xe0\x41\x01\xfa\x41(\n&dialogflow.googleapis.com/Conversation\x12\x41\n\x0elatest_message\x18\x05 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!dialogflow.googleapis.com/Message\x12Y\n\x0cquery_source\x18\x07 \x01(\x0e\x32>.google.cloud.dialogflow.v2.SearchKnowledgeRequest.QuerySourceB\x03\xe0\x41\x01\x12\x37\n\x11\x65nd_user_metadata\x18\t \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12[\n\rsearch_config\x18\x0b \x01(\x0b\x32?.google.cloud.dialogflow.v2.SearchKnowledgeRequest.SearchConfigB\x03\xe0\x41\x01\x12\x19\n\x0c\x65xact_search\x18\x0e \x01(\x08\x42\x03\xe0\x41\x01\x1a\xdb\x0c\n\x0cSearchConfig\x12\x64\n\x0b\x62oost_specs\x18\x01 \x03(\x0b\x32J.google.cloud.dialogflow.v2.SearchKnowledgeRequest.SearchConfig.BoostSpecsB\x03\xe0\x41\x01\x12\x66\n\x0c\x66ilter_specs\x18\x02 \x03(\x0b\x32K.google.cloud.dialogflow.v2.SearchKnowledgeRequest.SearchConfig.FilterSpecsB\x03\xe0\x41\x01\x1a\xbe\n\n\nBoostSpecs\x12\x45\n\x0b\x64\x61ta_stores\x18\x01 \x03(\tB0\xe0\x41\x01\xfa\x41*\n(discoveryengine.googleapis.com/DataStore\x12g\n\x04spec\x18\x02 \x03(\x0b\x32T.google.cloud.dialogflow.v2.SearchKnowledgeRequest.SearchConfig.BoostSpecs.BoostSpecB\x03\xe0\x41\x01\x1a\xff\x08\n\tBoostSpec\x12\x8b\x01\n\x15\x63ondition_boost_specs\x18\x01 \x03(\x0b\x32g.google.cloud.dialogflow.v2.SearchKnowledgeRequest.SearchConfig.BoostSpecs.BoostSpec.ConditionBoostSpecB\x03\xe0\x41\x01\x1a\xe3\x07\n\x12\x43onditionBoostSpec\x12\x16\n\tcondition\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x62oost\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\x12\x99\x01\n\x12\x62oost_control_spec\x18\x04 \x01(\x0b\x32x.google.cloud.dialogflow.v2.SearchKnowledgeRequest.SearchConfig.BoostSpecs.BoostSpec.ConditionBoostSpec.BoostControlSpecB\x03\xe0\x41\x01\x1a\x84\x06\n\x10\x42oostControlSpec\x12\x17\n\nfield_name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\xa4\x01\n\x0e\x61ttribute_type\x18\x02 \x01(\x0e\x32\x86\x01.google.cloud.dialogflow.v2.SearchKnowledgeRequest.SearchConfig.BoostSpecs.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeTypeB\x03\xe0\x41\x01\x12\xac\x01\n\x12interpolation_type\x18\x03 \x01(\x0e\x32\x8a\x01.google.cloud.dialogflow.v2.SearchKnowledgeRequest.SearchConfig.BoostSpecs.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationTypeB\x03\xe0\x41\x01\x12\xa3\x01\n\x0e\x63ontrol_points\x18\x04 \x03(\x0b\x32\x85\x01.google.cloud.dialogflow.v2.SearchKnowledgeRequest.SearchConfig.BoostSpecs.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPointB\x03\xe0\x41\x01\x1aG\n\x0c\x43ontrolPoint\x12\x1c\n\x0f\x61ttribute_value\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x62oost_amount\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\"M\n\rAttributeType\x12\x1e\n\x1a\x41TTRIBUTE_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tNUMERICAL\x10\x01\x12\r\n\tFRESHNESS\x10\x02\"C\n\x11InterpolationType\x12\"\n\x1eINTERPOLATION_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06LINEAR\x10\x01\x1a<\n\x0b\x46ilterSpecs\x12\x18\n\x0b\x64\x61ta_stores\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\"Q\n\x0bQuerySource\x12\x1c\n\x18QUERY_SOURCE_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x41GENT_QUERY\x10\x01\x12\x13\n\x0fSUGGESTED_QUERY\x10\x02\"v\n\x17SearchKnowledgeResponse\x12\x42\n\x07\x61nswers\x18\x02 \x03(\x0b\x32\x31.google.cloud.dialogflow.v2.SearchKnowledgeAnswer\x12\x17\n\x0frewritten_query\x18\x03 \x01(\t\"\xce\x03\n\x15SearchKnowledgeAnswer\x12\x0e\n\x06\x61nswer\x18\x01 \x01(\t\x12Q\n\x0b\x61nswer_type\x18\x02 \x01(\x0e\x32<.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerType\x12V\n\x0e\x61nswer_sources\x18\x03 \x03(\x0b\x32>.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource\x12\x42\n\ranswer_record\x18\x05 \x01(\tB+\xfa\x41(\n&dialogflow.googleapis.com/AnswerRecord\x1a\x66\n\x0c\x41nswerSource\x12\r\n\x05title\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x0f\n\x07snippet\x18\x03 \x01(\t\x12)\n\x08metadata\x18\x05 \x01(\x0b\x32\x17.google.protobuf.Struct\"N\n\nAnswerType\x12\x1b\n\x17\x41NSWER_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x46\x41Q\x10\x01\x12\x0e\n\nGENERATIVE\x10\x02\x12\n\n\x06INTENT\x10\x03\x32\xd3\x15\n\rConversations\x12\x8c\x02\n\x12\x43reateConversation\x12\x35.google.cloud.dialogflow.v2.CreateConversationRequest\x1a(.google.cloud.dialogflow.v2.Conversation\"\x94\x01\xda\x41\x13parent,conversation\x82\xd3\xe4\x93\x02x\"%/v2/{parent=projects/*}/conversations:\x0c\x63onversationZA\"1/v2/{parent=projects/*/locations/*}/conversations:\x0c\x63onversation\x12\xed\x01\n\x11ListConversations\x12\x34.google.cloud.dialogflow.v2.ListConversationsRequest\x1a\x35.google.cloud.dialogflow.v2.ListConversationsResponse\"k\xda\x41\x06parent\x82\xd3\xe4\x93\x02\\\x12%/v2/{parent=projects/*}/conversationsZ3\x12\x31/v2/{parent=projects/*/locations/*}/conversations\x12\xda\x01\n\x0fGetConversation\x12\x32.google.cloud.dialogflow.v2.GetConversationRequest\x1a(.google.cloud.dialogflow.v2.Conversation\"i\xda\x41\x04name\x82\xd3\xe4\x93\x02\\\x12%/v2/{name=projects/*/conversations/*}Z3\x12\x31/v2/{name=projects/*/locations/*/conversations/*}\x12\xfd\x01\n\x14\x43ompleteConversation\x12\x37.google.cloud.dialogflow.v2.CompleteConversationRequest\x1a(.google.cloud.dialogflow.v2.Conversation\"\x81\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02t\"./v2/{name=projects/*/conversations/*}:complete:\x01*Z?\":/v2/{name=projects/*/locations/*/conversations/*}:complete:\x01*\x12\xf5\x01\n\x0cListMessages\x12/.google.cloud.dialogflow.v2.ListMessagesRequest\x1a\x30.google.cloud.dialogflow.v2.ListMessagesResponse\"\x81\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02r\x12\x30/v2/{parent=projects/*/conversations/*}/messagesZ>\x12</v2/{parent=projects/*/locations/*/conversations/*}/messages\x12\xf4\x02\n\x1aSuggestConversationSummary\x12=.google.cloud.dialogflow.v2.SuggestConversationSummaryRequest\x1a>.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse\"\xd6\x01\xda\x41\x0c\x63onversation\x82\xd3\xe4\x93\x02\xc0\x01\"T/v2/{conversation=projects/*/conversations/*}/suggestions:suggestConversationSummary:\x01*Ze\"`/v2/{conversation=projects/*/locations/*/conversations/*}/suggestions:suggestConversationSummary:\x01*\x12\xdd\x02\n\x18GenerateStatelessSummary\x12;.google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest\x1a<.google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse\"\xc5\x01\x82\xd3\xe4\x93\x02\xbe\x01\"S/v2/{stateless_conversation.parent=projects/*}/suggestions:generateStatelessSummary:\x01*Zd\"_/v2/{stateless_conversation.parent=projects/*/locations/*}/suggestions:generateStatelessSummary:\x01*\x12\xeb\x01\n\x1bGenerateStatelessSuggestion\x12>.google.cloud.dialogflow.v2.GenerateStatelessSuggestionRequest\x1a?.google.cloud.dialogflow.v2.GenerateStatelessSuggestionResponse\"K\x82\xd3\xe4\x93\x02\x45\"@/v2/{parent=projects/*/locations/*}/statelessSuggestion:generate:\x01*\x12\xae\x03\n\x0fSearchKnowledge\x12\x32.google.cloud.dialogflow.v2.SearchKnowledgeRequest\x1a\x33.google.cloud.dialogflow.v2.SearchKnowledgeResponse\"\xb1\x02\x82\xd3\xe4\x93\x02\xaa\x02\"3/v2/{parent=projects/*}/suggestions:searchKnowledge:\x01*ZD\"?/v2/{parent=projects/*/locations/*}/suggestions:searchKnowledge:\x01*ZN\"I/v2/{conversation=projects/*/conversations/*}/suggestions:searchKnowledge:\x01*ZZ\"U/v2/{conversation=projects/*/locations/*/conversations/*}/suggestions:searchKnowledge:\x01*\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\xe0\x02\n\x1e\x63om.google.cloud.dialogflow.v2B\x11\x43onversationProtoP\x01Z>cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpb\xa2\x02\x02\x44\x46\xaa\x02\x1aGoogle.Cloud.Dialogflow.V2\xea\x41\xc5\x01\n(discoveryengine.googleapis.com/DataStore\x12Xprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}\x12?projects/{project}/locations/{location}/dataStores/{data_store}b\x06proto3"
|
19
|
+
descriptor_data = "\n-google/cloud/dialogflow/v2/conversation.proto\x12\x1agoogle.cloud.dialogflow.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x35google/cloud/dialogflow/v2/conversation_profile.proto\x1a*google/cloud/dialogflow/v2/generator.proto\x1a,google/cloud/dialogflow/v2/participant.proto\x1a(google/cloud/dialogflow/v2/session.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe8\x11\n\x0c\x43onversation\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12U\n\x0flifecycle_state\x18\x02 \x01(\x0e\x32\x37.google.cloud.dialogflow.v2.Conversation.LifecycleStateB\x03\xe0\x41\x03\x12S\n\x14\x63onversation_profile\x18\x03 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-dialogflow.googleapis.com/ConversationProfile\x12N\n\x0cphone_number\x18\x04 \x01(\x0b\x32\x33.google.cloud.dialogflow.v2.ConversationPhoneNumberB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12[\n\x12\x63onversation_stage\x18\x07 \x01(\x0e\x32:.google.cloud.dialogflow.v2.Conversation.ConversationStageB\x03\xe0\x41\x01\x12h\n\x19telephony_connection_info\x18\n \x01(\x0b\x32@.google.cloud.dialogflow.v2.Conversation.TelephonyConnectionInfoB\x03\xe0\x41\x03\x12q\n\x1bingested_context_references\x18\x11 \x03(\x0b\x32G.google.cloud.dialogflow.v2.Conversation.IngestedContextReferencesEntryB\x03\xe0\x41\x03\x1a\x8e\x03\n\x17TelephonyConnectionInfo\x12\x1a\n\rdialed_number\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03sdp\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x64\n\x0bsip_headers\x18\x0c \x03(\x0b\x32J.google.cloud.dialogflow.v2.Conversation.TelephonyConnectionInfo.SipHeaderB\x03\xe0\x41\x03\x12n\n\x13\x65xtra_mime_contents\x18\r \x03(\x0b\x32L.google.cloud.dialogflow.v2.Conversation.TelephonyConnectionInfo.MimeContentB\x03\xe0\x41\x03\x1a\x32\n\tSipHeader\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05value\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a;\n\x0bMimeContent\x12\x16\n\tmime_type\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07\x63ontent\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x01\x1a\x95\x05\n\x10\x43ontextReference\x12g\n\x10\x63ontext_contents\x18\x01 \x03(\x0b\x32H.google.cloud.dialogflow.v2.Conversation.ContextReference.ContextContentB\x03\xe0\x41\x02\x12^\n\x0bupdate_mode\x18\x02 \x01(\x0e\x32\x44.google.cloud.dialogflow.v2.Conversation.ContextReference.UpdateModeB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a\x9f\x02\n\x0e\x43ontextContent\x12\x14\n\x07\x63ontent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12s\n\x0e\x63ontent_format\x18\x02 \x01(\x0e\x32V.google.cloud.dialogflow.v2.Conversation.ContextReference.ContextContent.ContentFormatB\x03\xe0\x41\x02\x12\x37\n\x0eingestion_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"I\n\rContentFormat\x12\x1e\n\x1a\x43ONTENT_FORMAT_UNSPECIFIED\x10\x00\x12\x08\n\x04JSON\x10\x01\x12\x0e\n\nPLAIN_TEXT\x10\x02\"D\n\nUpdateMode\x12\x1b\n\x17UPDATE_MODE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41PPEND\x10\x01\x12\r\n\tOVERWRITE\x10\x02\x1a{\n\x1eIngestedContextReferencesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12H\n\x05value\x18\x02 \x01(\x0b\x32\x39.google.cloud.dialogflow.v2.Conversation.ContextReference:\x02\x38\x01\"Q\n\x0eLifecycleState\x12\x1f\n\x1bLIFECYCLE_STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIN_PROGRESS\x10\x01\x12\r\n\tCOMPLETED\x10\x02\"h\n\x11\x43onversationStage\x12\"\n\x1e\x43ONVERSATION_STAGE_UNSPECIFIED\x10\x00\x12\x17\n\x13VIRTUAL_AGENT_STAGE\x10\x01\x12\x16\n\x12HUMAN_ASSIST_STAGE\x10\x02:\xc0\x01\xea\x41\xbc\x01\n&dialogflow.googleapis.com/Conversation\x12/projects/{project}/conversations/{conversation}\x12\x44projects/{project}/locations/{location}/conversations/{conversation}*\rconversations2\x0c\x63onversation\"\xbe\x01\n\x19\x43reateConversationRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&dialogflow.googleapis.com/Conversation\x12\x43\n\x0c\x63onversation\x18\x02 \x01(\x0b\x32(.google.cloud.dialogflow.v2.ConversationB\x03\xe0\x41\x02\x12\x1c\n\x0f\x63onversation_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xa0\x01\n\x18ListConversationsRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&dialogflow.googleapis.com/Conversation\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"u\n\x19ListConversationsResponse\x12?\n\rconversations\x18\x01 \x03(\x0b\x32(.google.cloud.dialogflow.v2.Conversation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"V\n\x16GetConversationRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&dialogflow.googleapis.com/Conversation\"[\n\x1b\x43ompleteConversationRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&dialogflow.googleapis.com/Conversation\"\x96\x01\n\x13ListMessagesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!dialogflow.googleapis.com/Message\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"f\n\x14ListMessagesResponse\x12\x35\n\x08messages\x18\x01 \x03(\x0b\x32#.google.cloud.dialogflow.v2.Message\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"O\n\x17\x43onversationPhoneNumber\x12\x19\n\x0c\x63ountry_code\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x0cphone_number\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xcf\x02\n\x1eIngestContextReferencesRequest\x12\x44\n\x0c\x63onversation\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&dialogflow.googleapis.com/Conversation\x12r\n\x12\x63ontext_references\x18\x02 \x03(\x0b\x32Q.google.cloud.dialogflow.v2.IngestContextReferencesRequest.ContextReferencesEntryB\x03\xe0\x41\x02\x1as\n\x16\x43ontextReferencesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12H\n\x05value\x18\x02 \x01(\x0b\x32\x39.google.cloud.dialogflow.v2.Conversation.ContextReference:\x02\x38\x01\"\x9f\x02\n\x1fIngestContextReferencesResponse\x12\x7f\n\x1bingested_context_references\x18\x01 \x03(\x0b\x32Z.google.cloud.dialogflow.v2.IngestContextReferencesResponse.IngestedContextReferencesEntry\x1a{\n\x1eIngestedContextReferencesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12H\n\x05value\x18\x02 \x01(\x0b\x32\x39.google.cloud.dialogflow.v2.Conversation.ContextReference:\x02\x38\x01\"\x9c\x02\n!SuggestConversationSummaryRequest\x12\x44\n\x0c\x63onversation\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&dialogflow.googleapis.com/Conversation\x12\x41\n\x0elatest_message\x18\x03 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!dialogflow.googleapis.com/Message\x12\x19\n\x0c\x63ontext_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12S\n\x13\x61ssist_query_params\x18\x05 \x01(\x0b\x32\x31.google.cloud.dialogflow.v2.AssistQueryParametersB\x03\xe0\x41\x01\"\xf7\x03\n\"SuggestConversationSummaryResponse\x12W\n\x07summary\x18\x01 \x01(\x0b\x32\x46.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary\x12>\n\x0elatest_message\x18\x02 \x01(\tB&\xfa\x41#\n!dialogflow.googleapis.com/Message\x12\x14\n\x0c\x63ontext_size\x18\x03 \x01(\x05\x1a\xa1\x02\n\x07Summary\x12\x0c\n\x04text\x18\x01 \x01(\t\x12o\n\rtext_sections\x18\x04 \x03(\x0b\x32X.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary.TextSectionsEntry\x12\x42\n\ranswer_record\x18\x03 \x01(\tB+\xfa\x41(\n&dialogflow.googleapis.com/AnswerRecord\x12\x1e\n\x16\x62\x61seline_model_version\x18\x05 \x01(\t\x1a\x33\n\x11TextSectionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xdc\x03\n\x1fGenerateStatelessSummaryRequest\x12t\n\x16stateless_conversation\x18\x01 \x01(\x0b\x32O.google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversationB\x03\xe0\x41\x02\x12R\n\x14\x63onversation_profile\x18\x02 \x01(\x0b\x32/.google.cloud.dialogflow.v2.ConversationProfileB\x03\xe0\x41\x02\x12\x41\n\x0elatest_message\x18\x03 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!dialogflow.googleapis.com/Message\x12\x1d\n\x10max_context_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x1a\x8c\x01\n\x13MinimalConversation\x12:\n\x08messages\x18\x01 \x03(\x0b\x32#.google.cloud.dialogflow.v2.MessageB\x03\xe0\x41\x02\x12\x39\n\x06parent\x18\x02 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\"\xad\x03\n GenerateStatelessSummaryResponse\x12U\n\x07summary\x18\x01 \x01(\x0b\x32\x44.google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary\x12>\n\x0elatest_message\x18\x02 \x01(\tB&\xfa\x41#\n!dialogflow.googleapis.com/Message\x12\x14\n\x0c\x63ontext_size\x18\x03 \x01(\x05\x1a\xdb\x01\n\x07Summary\x12\x0c\n\x04text\x18\x01 \x01(\t\x12m\n\rtext_sections\x18\x02 \x03(\x0b\x32V.google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary.TextSectionsEntry\x12\x1e\n\x16\x62\x61seline_model_version\x18\x04 \x01(\t\x1a\x33\n\x11TextSectionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xd3\x04\n\"GenerateStatelessSuggestionRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12:\n\tgenerator\x18\x02 \x01(\x0b\x32%.google.cloud.dialogflow.v2.GeneratorH\x00\x12\x18\n\x0egenerator_name\x18\x03 \x01(\tH\x00\x12v\n\x12\x63ontext_references\x18\x04 \x03(\x0b\x32U.google.cloud.dialogflow.v2.GenerateStatelessSuggestionRequest.ContextReferencesEntryB\x03\xe0\x41\x01\x12R\n\x14\x63onversation_context\x18\x05 \x01(\x0b\x32/.google.cloud.dialogflow.v2.ConversationContextB\x03\xe0\x41\x01\x12\x45\n\x0etrigger_events\x18\x06 \x03(\x0e\x32(.google.cloud.dialogflow.v2.TriggerEventB\x03\xe0\x41\x01\x1as\n\x16\x43ontextReferencesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12H\n\x05value\x18\x02 \x01(\x0b\x32\x39.google.cloud.dialogflow.v2.Conversation.ContextReference:\x02\x38\x01\x42\x14\n\x12generator_resource\"y\n#GenerateStatelessSuggestionResponse\x12R\n\x14generator_suggestion\x18\x01 \x01(\x0b\x32/.google.cloud.dialogflow.v2.GeneratorSuggestionB\x03\xe0\x41\x02\"\x9c\x12\n\x16SearchKnowledgeRequest\x12\x13\n\x06parent\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x05query\x18\x01 \x01(\x0b\x32%.google.cloud.dialogflow.v2.TextInputB\x03\xe0\x41\x02\x12S\n\x14\x63onversation_profile\x18\x02 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-dialogflow.googleapis.com/ConversationProfile\x12\x17\n\nsession_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x0c\x63onversation\x18\x04 \x01(\tB.\xe0\x41\x01\xfa\x41(\n&dialogflow.googleapis.com/Conversation\x12\x41\n\x0elatest_message\x18\x05 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!dialogflow.googleapis.com/Message\x12Y\n\x0cquery_source\x18\x07 \x01(\x0e\x32>.google.cloud.dialogflow.v2.SearchKnowledgeRequest.QuerySourceB\x03\xe0\x41\x01\x12\x37\n\x11\x65nd_user_metadata\x18\t \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12[\n\rsearch_config\x18\x0b \x01(\x0b\x32?.google.cloud.dialogflow.v2.SearchKnowledgeRequest.SearchConfigB\x03\xe0\x41\x01\x12\x19\n\x0c\x65xact_search\x18\x0e \x01(\x08\x42\x03\xe0\x41\x01\x1a\xdb\x0c\n\x0cSearchConfig\x12\x64\n\x0b\x62oost_specs\x18\x01 \x03(\x0b\x32J.google.cloud.dialogflow.v2.SearchKnowledgeRequest.SearchConfig.BoostSpecsB\x03\xe0\x41\x01\x12\x66\n\x0c\x66ilter_specs\x18\x02 \x03(\x0b\x32K.google.cloud.dialogflow.v2.SearchKnowledgeRequest.SearchConfig.FilterSpecsB\x03\xe0\x41\x01\x1a\xbe\n\n\nBoostSpecs\x12\x45\n\x0b\x64\x61ta_stores\x18\x01 \x03(\tB0\xe0\x41\x01\xfa\x41*\n(discoveryengine.googleapis.com/DataStore\x12g\n\x04spec\x18\x02 \x03(\x0b\x32T.google.cloud.dialogflow.v2.SearchKnowledgeRequest.SearchConfig.BoostSpecs.BoostSpecB\x03\xe0\x41\x01\x1a\xff\x08\n\tBoostSpec\x12\x8b\x01\n\x15\x63ondition_boost_specs\x18\x01 \x03(\x0b\x32g.google.cloud.dialogflow.v2.SearchKnowledgeRequest.SearchConfig.BoostSpecs.BoostSpec.ConditionBoostSpecB\x03\xe0\x41\x01\x1a\xe3\x07\n\x12\x43onditionBoostSpec\x12\x16\n\tcondition\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x62oost\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\x12\x99\x01\n\x12\x62oost_control_spec\x18\x04 \x01(\x0b\x32x.google.cloud.dialogflow.v2.SearchKnowledgeRequest.SearchConfig.BoostSpecs.BoostSpec.ConditionBoostSpec.BoostControlSpecB\x03\xe0\x41\x01\x1a\x84\x06\n\x10\x42oostControlSpec\x12\x17\n\nfield_name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\xa4\x01\n\x0e\x61ttribute_type\x18\x02 \x01(\x0e\x32\x86\x01.google.cloud.dialogflow.v2.SearchKnowledgeRequest.SearchConfig.BoostSpecs.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeTypeB\x03\xe0\x41\x01\x12\xac\x01\n\x12interpolation_type\x18\x03 \x01(\x0e\x32\x8a\x01.google.cloud.dialogflow.v2.SearchKnowledgeRequest.SearchConfig.BoostSpecs.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationTypeB\x03\xe0\x41\x01\x12\xa3\x01\n\x0e\x63ontrol_points\x18\x04 \x03(\x0b\x32\x85\x01.google.cloud.dialogflow.v2.SearchKnowledgeRequest.SearchConfig.BoostSpecs.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPointB\x03\xe0\x41\x01\x1aG\n\x0c\x43ontrolPoint\x12\x1c\n\x0f\x61ttribute_value\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x62oost_amount\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\"M\n\rAttributeType\x12\x1e\n\x1a\x41TTRIBUTE_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tNUMERICAL\x10\x01\x12\r\n\tFRESHNESS\x10\x02\"C\n\x11InterpolationType\x12\"\n\x1eINTERPOLATION_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06LINEAR\x10\x01\x1a<\n\x0b\x46ilterSpecs\x12\x18\n\x0b\x64\x61ta_stores\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\"Q\n\x0bQuerySource\x12\x1c\n\x18QUERY_SOURCE_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x41GENT_QUERY\x10\x01\x12\x13\n\x0fSUGGESTED_QUERY\x10\x02\"v\n\x17SearchKnowledgeResponse\x12\x42\n\x07\x61nswers\x18\x02 \x03(\x0b\x32\x31.google.cloud.dialogflow.v2.SearchKnowledgeAnswer\x12\x17\n\x0frewritten_query\x18\x03 \x01(\t\"\xce\x03\n\x15SearchKnowledgeAnswer\x12\x0e\n\x06\x61nswer\x18\x01 \x01(\t\x12Q\n\x0b\x61nswer_type\x18\x02 \x01(\x0e\x32<.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerType\x12V\n\x0e\x61nswer_sources\x18\x03 \x03(\x0b\x32>.google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource\x12\x42\n\ranswer_record\x18\x05 \x01(\tB+\xfa\x41(\n&dialogflow.googleapis.com/AnswerRecord\x1a\x66\n\x0c\x41nswerSource\x12\r\n\x05title\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x0f\n\x07snippet\x18\x03 \x01(\t\x12)\n\x08metadata\x18\x05 \x01(\x0b\x32\x17.google.protobuf.Struct\"N\n\nAnswerType\x12\x1b\n\x17\x41NSWER_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x46\x41Q\x10\x01\x12\x0e\n\nGENERATIVE\x10\x02\x12\n\n\x06INTENT\x10\x03\"\xec\x01\n\x1aGenerateSuggestionsRequest\x12\x44\n\x0c\x63onversation\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&dialogflow.googleapis.com/Conversation\x12\x41\n\x0elatest_message\x18\x02 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!dialogflow.googleapis.com/Message\x12\x45\n\x0etrigger_events\x18\x03 \x03(\x0e\x32(.google.cloud.dialogflow.v2.TriggerEventB\x03\xe0\x41\x01\x32\xa6\x1a\n\rConversations\x12\x8c\x02\n\x12\x43reateConversation\x12\x35.google.cloud.dialogflow.v2.CreateConversationRequest\x1a(.google.cloud.dialogflow.v2.Conversation\"\x94\x01\xda\x41\x13parent,conversation\x82\xd3\xe4\x93\x02x\"%/v2/{parent=projects/*}/conversations:\x0c\x63onversationZA\"1/v2/{parent=projects/*/locations/*}/conversations:\x0c\x63onversation\x12\xed\x01\n\x11ListConversations\x12\x34.google.cloud.dialogflow.v2.ListConversationsRequest\x1a\x35.google.cloud.dialogflow.v2.ListConversationsResponse\"k\xda\x41\x06parent\x82\xd3\xe4\x93\x02\\\x12%/v2/{parent=projects/*}/conversationsZ3\x12\x31/v2/{parent=projects/*/locations/*}/conversations\x12\xda\x01\n\x0fGetConversation\x12\x32.google.cloud.dialogflow.v2.GetConversationRequest\x1a(.google.cloud.dialogflow.v2.Conversation\"i\xda\x41\x04name\x82\xd3\xe4\x93\x02\\\x12%/v2/{name=projects/*/conversations/*}Z3\x12\x31/v2/{name=projects/*/locations/*/conversations/*}\x12\xfd\x01\n\x14\x43ompleteConversation\x12\x37.google.cloud.dialogflow.v2.CompleteConversationRequest\x1a(.google.cloud.dialogflow.v2.Conversation\"\x81\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02t\"./v2/{name=projects/*/conversations/*}:complete:\x01*Z?\":/v2/{name=projects/*/locations/*/conversations/*}:complete:\x01*\x12\x92\x02\n\x17IngestContextReferences\x12:.google.cloud.dialogflow.v2.IngestContextReferencesRequest\x1a;.google.cloud.dialogflow.v2.IngestContextReferencesResponse\"~\xda\x41\x1f\x63onversation,context_references\x82\xd3\xe4\x93\x02V\"Q/v2/{conversation=projects/*/locations/*/conversations/*}:ingestContextReferences:\x01*\x12\xf5\x01\n\x0cListMessages\x12/.google.cloud.dialogflow.v2.ListMessagesRequest\x1a\x30.google.cloud.dialogflow.v2.ListMessagesResponse\"\x81\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02r\x12\x30/v2/{parent=projects/*/conversations/*}/messagesZ>\x12</v2/{parent=projects/*/locations/*/conversations/*}/messages\x12\xf4\x02\n\x1aSuggestConversationSummary\x12=.google.cloud.dialogflow.v2.SuggestConversationSummaryRequest\x1a>.google.cloud.dialogflow.v2.SuggestConversationSummaryResponse\"\xd6\x01\xda\x41\x0c\x63onversation\x82\xd3\xe4\x93\x02\xc0\x01\"T/v2/{conversation=projects/*/conversations/*}/suggestions:suggestConversationSummary:\x01*Ze\"`/v2/{conversation=projects/*/locations/*/conversations/*}/suggestions:suggestConversationSummary:\x01*\x12\xdd\x02\n\x18GenerateStatelessSummary\x12;.google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest\x1a<.google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse\"\xc5\x01\x82\xd3\xe4\x93\x02\xbe\x01\"S/v2/{stateless_conversation.parent=projects/*}/suggestions:generateStatelessSummary:\x01*Zd\"_/v2/{stateless_conversation.parent=projects/*/locations/*}/suggestions:generateStatelessSummary:\x01*\x12\xeb\x01\n\x1bGenerateStatelessSuggestion\x12>.google.cloud.dialogflow.v2.GenerateStatelessSuggestionRequest\x1a?.google.cloud.dialogflow.v2.GenerateStatelessSuggestionResponse\"K\x82\xd3\xe4\x93\x02\x45\"@/v2/{parent=projects/*/locations/*}/statelessSuggestion:generate:\x01*\x12\xae\x03\n\x0fSearchKnowledge\x12\x32.google.cloud.dialogflow.v2.SearchKnowledgeRequest\x1a\x33.google.cloud.dialogflow.v2.SearchKnowledgeResponse\"\xb1\x02\x82\xd3\xe4\x93\x02\xaa\x02\"3/v2/{parent=projects/*}/suggestions:searchKnowledge:\x01*ZD\"?/v2/{parent=projects/*/locations/*}/suggestions:searchKnowledge:\x01*ZN\"I/v2/{conversation=projects/*/conversations/*}/suggestions:searchKnowledge:\x01*ZZ\"U/v2/{conversation=projects/*/locations/*/conversations/*}/suggestions:searchKnowledge:\x01*\x12\xbb\x02\n\x13GenerateSuggestions\x12\x36.google.cloud.dialogflow.v2.GenerateSuggestionsRequest\x1a\x37.google.cloud.dialogflow.v2.GenerateSuggestionsResponse\"\xb2\x01\xda\x41\x0c\x63onversation\x82\xd3\xe4\x93\x02\x9c\x01\"B/v2/{conversation=projects/*/conversations/*}/suggestions:generate:\x01*ZS\"N/v2/{conversation=projects/*/locations/*/conversations/*}/suggestions:generate:\x01*\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\xe0\x02\n\x1e\x63om.google.cloud.dialogflow.v2B\x11\x43onversationProtoP\x01Z>cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpb\xa2\x02\x02\x44\x46\xaa\x02\x1aGoogle.Cloud.Dialogflow.V2\xea\x41\xc5\x01\n(discoveryengine.googleapis.com/DataStore\x12Xprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}\x12?projects/{project}/locations/{location}/dataStores/{data_store}b\x06proto3"
|
20
20
|
|
21
21
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
22
22
|
|
@@ -56,6 +56,10 @@ module Google
|
|
56
56
|
Conversation::TelephonyConnectionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.Conversation.TelephonyConnectionInfo").msgclass
|
57
57
|
Conversation::TelephonyConnectionInfo::SipHeader = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.Conversation.TelephonyConnectionInfo.SipHeader").msgclass
|
58
58
|
Conversation::TelephonyConnectionInfo::MimeContent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.Conversation.TelephonyConnectionInfo.MimeContent").msgclass
|
59
|
+
Conversation::ContextReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.Conversation.ContextReference").msgclass
|
60
|
+
Conversation::ContextReference::ContextContent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.Conversation.ContextReference.ContextContent").msgclass
|
61
|
+
Conversation::ContextReference::ContextContent::ContentFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.Conversation.ContextReference.ContextContent.ContentFormat").enummodule
|
62
|
+
Conversation::ContextReference::UpdateMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.Conversation.ContextReference.UpdateMode").enummodule
|
59
63
|
Conversation::LifecycleState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.Conversation.LifecycleState").enummodule
|
60
64
|
Conversation::ConversationStage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.Conversation.ConversationStage").enummodule
|
61
65
|
CreateConversationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.CreateConversationRequest").msgclass
|
@@ -66,6 +70,8 @@ module Google
|
|
66
70
|
ListMessagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.ListMessagesRequest").msgclass
|
67
71
|
ListMessagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.ListMessagesResponse").msgclass
|
68
72
|
ConversationPhoneNumber = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.ConversationPhoneNumber").msgclass
|
73
|
+
IngestContextReferencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.IngestContextReferencesRequest").msgclass
|
74
|
+
IngestContextReferencesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.IngestContextReferencesResponse").msgclass
|
69
75
|
SuggestConversationSummaryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.SuggestConversationSummaryRequest").msgclass
|
70
76
|
SuggestConversationSummaryResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.SuggestConversationSummaryResponse").msgclass
|
71
77
|
SuggestConversationSummaryResponse::Summary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.Summary").msgclass
|
@@ -90,6 +96,7 @@ module Google
|
|
90
96
|
SearchKnowledgeAnswer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.SearchKnowledgeAnswer").msgclass
|
91
97
|
SearchKnowledgeAnswer::AnswerSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerSource").msgclass
|
92
98
|
SearchKnowledgeAnswer::AnswerType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerType").enummodule
|
99
|
+
GenerateSuggestionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.GenerateSuggestionsRequest").msgclass
|
93
100
|
end
|
94
101
|
end
|
95
102
|
end
|
@@ -63,6 +63,9 @@ module Google
|
|
63
63
|
# Completes the specified conversation. Finished conversations are purged
|
64
64
|
# from the database after 30 days.
|
65
65
|
rpc :CompleteConversation, ::Google::Cloud::Dialogflow::V2::CompleteConversationRequest, ::Google::Cloud::Dialogflow::V2::Conversation
|
66
|
+
# Data ingestion API.
|
67
|
+
# Ingests context references for an existing conversation.
|
68
|
+
rpc :IngestContextReferences, ::Google::Cloud::Dialogflow::V2::IngestContextReferencesRequest, ::Google::Cloud::Dialogflow::V2::IngestContextReferencesResponse
|
66
69
|
# Lists messages that belong to a given conversation.
|
67
70
|
# `messages` are ordered by `create_time` in descending order. To fetch
|
68
71
|
# updates without duplication, send request with filter
|
@@ -81,6 +84,10 @@ module Google
|
|
81
84
|
rpc :GenerateStatelessSuggestion, ::Google::Cloud::Dialogflow::V2::GenerateStatelessSuggestionRequest, ::Google::Cloud::Dialogflow::V2::GenerateStatelessSuggestionResponse
|
82
85
|
# Get answers for the given query based on knowledge documents.
|
83
86
|
rpc :SearchKnowledge, ::Google::Cloud::Dialogflow::V2::SearchKnowledgeRequest, ::Google::Cloud::Dialogflow::V2::SearchKnowledgeResponse
|
87
|
+
# Generates all the suggestions using generators configured in the
|
88
|
+
# conversation profile. A generator is used only if its trigger event is
|
89
|
+
# matched.
|
90
|
+
rpc :GenerateSuggestions, ::Google::Cloud::Dialogflow::V2::GenerateSuggestionsRequest, ::Google::Cloud::Dialogflow::V2::GenerateSuggestionsResponse
|
84
91
|
end
|
85
92
|
|
86
93
|
Stub = Service.rpc_stub_class
|
@@ -605,6 +605,99 @@ module Google
|
|
605
605
|
raise ::Google::Cloud::Error.from_error(e)
|
606
606
|
end
|
607
607
|
|
608
|
+
##
|
609
|
+
# Data ingestion API.
|
610
|
+
# Ingests context references for an existing conversation.
|
611
|
+
#
|
612
|
+
# @overload ingest_context_references(request, options = nil)
|
613
|
+
# Pass arguments to `ingest_context_references` via a request object, either of type
|
614
|
+
# {::Google::Cloud::Dialogflow::V2::IngestContextReferencesRequest} or an equivalent Hash.
|
615
|
+
#
|
616
|
+
# @param request [::Google::Cloud::Dialogflow::V2::IngestContextReferencesRequest, ::Hash]
|
617
|
+
# A request object representing the call parameters. Required. To specify no
|
618
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
619
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
620
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
621
|
+
#
|
622
|
+
# @overload ingest_context_references(conversation: nil, context_references: nil)
|
623
|
+
# Pass arguments to `ingest_context_references` via keyword arguments. Note that at
|
624
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
625
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
626
|
+
#
|
627
|
+
# @param conversation [::String]
|
628
|
+
# Required. Resource identifier of the conversation to ingest context
|
629
|
+
# information for. Format: `projects/<Project ID>/locations/<Location
|
630
|
+
# ID>/conversations/<Conversation ID>`.
|
631
|
+
# @param context_references [::Hash{::String => ::Google::Cloud::Dialogflow::V2::Conversation::ContextReference, ::Hash}]
|
632
|
+
# Required. The context references to ingest. The key is the name of the
|
633
|
+
# context reference and the value contains the contents of the context
|
634
|
+
# reference. The key is used to incorporate ingested context references to
|
635
|
+
# enhance the generator.
|
636
|
+
#
|
637
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
638
|
+
# @yieldparam response [::Google::Cloud::Dialogflow::V2::IngestContextReferencesResponse]
|
639
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
640
|
+
#
|
641
|
+
# @return [::Google::Cloud::Dialogflow::V2::IngestContextReferencesResponse]
|
642
|
+
#
|
643
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
644
|
+
#
|
645
|
+
# @example Basic example
|
646
|
+
# require "google/cloud/dialogflow/v2"
|
647
|
+
#
|
648
|
+
# # Create a client object. The client can be reused for multiple calls.
|
649
|
+
# client = Google::Cloud::Dialogflow::V2::Conversations::Client.new
|
650
|
+
#
|
651
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
652
|
+
# request = Google::Cloud::Dialogflow::V2::IngestContextReferencesRequest.new
|
653
|
+
#
|
654
|
+
# # Call the ingest_context_references method.
|
655
|
+
# result = client.ingest_context_references request
|
656
|
+
#
|
657
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::IngestContextReferencesResponse.
|
658
|
+
# p result
|
659
|
+
#
|
660
|
+
def ingest_context_references request, options = nil
|
661
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
662
|
+
|
663
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::IngestContextReferencesRequest
|
664
|
+
|
665
|
+
# Converts hash and nil to an options object
|
666
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
667
|
+
|
668
|
+
# Customize the options with defaults
|
669
|
+
metadata = @config.rpcs.ingest_context_references.metadata.to_h
|
670
|
+
|
671
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
672
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
673
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
674
|
+
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
675
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
676
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
677
|
+
|
678
|
+
header_params = {}
|
679
|
+
if request.conversation
|
680
|
+
header_params["conversation"] = request.conversation
|
681
|
+
end
|
682
|
+
|
683
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
684
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
685
|
+
|
686
|
+
options.apply_defaults timeout: @config.rpcs.ingest_context_references.timeout,
|
687
|
+
metadata: metadata,
|
688
|
+
retry_policy: @config.rpcs.ingest_context_references.retry_policy
|
689
|
+
|
690
|
+
options.apply_defaults timeout: @config.timeout,
|
691
|
+
metadata: @config.metadata,
|
692
|
+
retry_policy: @config.retry_policy
|
693
|
+
|
694
|
+
@conversations_stub.call_rpc :ingest_context_references, request, options: options do |response, operation|
|
695
|
+
yield response, operation if block_given?
|
696
|
+
end
|
697
|
+
rescue ::GRPC::BadStatus => e
|
698
|
+
raise ::Google::Cloud::Error.from_error(e)
|
699
|
+
end
|
700
|
+
|
608
701
|
##
|
609
702
|
# Lists messages that belong to a given conversation.
|
610
703
|
# `messages` are ordered by `create_time` in descending order. To fetch
|
@@ -933,7 +1026,7 @@ module Google
|
|
933
1026
|
# @param options [::Gapic::CallOptions, ::Hash]
|
934
1027
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
935
1028
|
#
|
936
|
-
# @overload generate_stateless_suggestion(parent: nil, generator: nil, generator_name: nil, conversation_context: nil, trigger_events: nil)
|
1029
|
+
# @overload generate_stateless_suggestion(parent: nil, generator: nil, generator_name: nil, context_references: nil, conversation_context: nil, trigger_events: nil)
|
937
1030
|
# Pass arguments to `generate_stateless_suggestion` via keyword arguments. Note that at
|
938
1031
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
939
1032
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -951,6 +1044,11 @@ module Google
|
|
951
1044
|
# `projects/<Project ID>/locations/<Location ID>/generators/<Generator ID>`
|
952
1045
|
#
|
953
1046
|
# Note: The following fields are mutually exclusive: `generator_name`, `generator`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
1047
|
+
# @param context_references [::Hash{::String => ::Google::Cloud::Dialogflow::V2::Conversation::ContextReference, ::Hash}]
|
1048
|
+
# Optional. A section of ingested context information. The key is the name of
|
1049
|
+
# the context reference and the value contains the contents of the context
|
1050
|
+
# reference. The key is used to incorporate ingested context references to
|
1051
|
+
# enhance the generator.
|
954
1052
|
# @param conversation_context [::Google::Cloud::Dialogflow::V2::ConversationContext, ::Hash]
|
955
1053
|
# Optional. Context of the conversation, including transcripts.
|
956
1054
|
# @param trigger_events [::Array<::Google::Cloud::Dialogflow::V2::TriggerEvent>]
|
@@ -1155,6 +1253,105 @@ module Google
|
|
1155
1253
|
raise ::Google::Cloud::Error.from_error(e)
|
1156
1254
|
end
|
1157
1255
|
|
1256
|
+
##
|
1257
|
+
# Generates all the suggestions using generators configured in the
|
1258
|
+
# conversation profile. A generator is used only if its trigger event is
|
1259
|
+
# matched.
|
1260
|
+
#
|
1261
|
+
# @overload generate_suggestions(request, options = nil)
|
1262
|
+
# Pass arguments to `generate_suggestions` via a request object, either of type
|
1263
|
+
# {::Google::Cloud::Dialogflow::V2::GenerateSuggestionsRequest} or an equivalent Hash.
|
1264
|
+
#
|
1265
|
+
# @param request [::Google::Cloud::Dialogflow::V2::GenerateSuggestionsRequest, ::Hash]
|
1266
|
+
# A request object representing the call parameters. Required. To specify no
|
1267
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1268
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1269
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1270
|
+
#
|
1271
|
+
# @overload generate_suggestions(conversation: nil, latest_message: nil, trigger_events: nil)
|
1272
|
+
# Pass arguments to `generate_suggestions` via keyword arguments. Note that at
|
1273
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1274
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1275
|
+
#
|
1276
|
+
# @param conversation [::String]
|
1277
|
+
# Required. The conversation for which the suggestions are generated. Format:
|
1278
|
+
# `projects/<Project ID>/locations/<Location
|
1279
|
+
# ID>/conversations/<Conversation ID>`.
|
1280
|
+
#
|
1281
|
+
# The conversation must be created with a conversation profile which has
|
1282
|
+
# generators configured in it to be able to get suggestions.
|
1283
|
+
# @param latest_message [::String]
|
1284
|
+
# Optional. The name of the latest conversation message for which the request
|
1285
|
+
# is triggered. Format: `projects/<Project ID>/locations/<Location
|
1286
|
+
# ID>/conversations/<Conversation ID>/messages/<Message ID>`.
|
1287
|
+
# @param trigger_events [::Array<::Google::Cloud::Dialogflow::V2::TriggerEvent>]
|
1288
|
+
# Optional. A list of trigger events. Only generators configured in the
|
1289
|
+
# conversation_profile whose trigger_event is listed here will be triggered.
|
1290
|
+
#
|
1291
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1292
|
+
# @yieldparam response [::Google::Cloud::Dialogflow::V2::GenerateSuggestionsResponse]
|
1293
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1294
|
+
#
|
1295
|
+
# @return [::Google::Cloud::Dialogflow::V2::GenerateSuggestionsResponse]
|
1296
|
+
#
|
1297
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1298
|
+
#
|
1299
|
+
# @example Basic example
|
1300
|
+
# require "google/cloud/dialogflow/v2"
|
1301
|
+
#
|
1302
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1303
|
+
# client = Google::Cloud::Dialogflow::V2::Conversations::Client.new
|
1304
|
+
#
|
1305
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1306
|
+
# request = Google::Cloud::Dialogflow::V2::GenerateSuggestionsRequest.new
|
1307
|
+
#
|
1308
|
+
# # Call the generate_suggestions method.
|
1309
|
+
# result = client.generate_suggestions request
|
1310
|
+
#
|
1311
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::GenerateSuggestionsResponse.
|
1312
|
+
# p result
|
1313
|
+
#
|
1314
|
+
def generate_suggestions request, options = nil
|
1315
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1316
|
+
|
1317
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::GenerateSuggestionsRequest
|
1318
|
+
|
1319
|
+
# Converts hash and nil to an options object
|
1320
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1321
|
+
|
1322
|
+
# Customize the options with defaults
|
1323
|
+
metadata = @config.rpcs.generate_suggestions.metadata.to_h
|
1324
|
+
|
1325
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1326
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1327
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1328
|
+
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
1329
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1330
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1331
|
+
|
1332
|
+
header_params = {}
|
1333
|
+
if request.conversation
|
1334
|
+
header_params["conversation"] = request.conversation
|
1335
|
+
end
|
1336
|
+
|
1337
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1338
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1339
|
+
|
1340
|
+
options.apply_defaults timeout: @config.rpcs.generate_suggestions.timeout,
|
1341
|
+
metadata: metadata,
|
1342
|
+
retry_policy: @config.rpcs.generate_suggestions.retry_policy
|
1343
|
+
|
1344
|
+
options.apply_defaults timeout: @config.timeout,
|
1345
|
+
metadata: @config.metadata,
|
1346
|
+
retry_policy: @config.retry_policy
|
1347
|
+
|
1348
|
+
@conversations_stub.call_rpc :generate_suggestions, request, options: options do |response, operation|
|
1349
|
+
yield response, operation if block_given?
|
1350
|
+
end
|
1351
|
+
rescue ::GRPC::BadStatus => e
|
1352
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1353
|
+
end
|
1354
|
+
|
1158
1355
|
##
|
1159
1356
|
# Configuration class for the Conversations API.
|
1160
1357
|
#
|
@@ -1342,6 +1539,11 @@ module Google
|
|
1342
1539
|
#
|
1343
1540
|
attr_reader :complete_conversation
|
1344
1541
|
##
|
1542
|
+
# RPC-specific configuration for `ingest_context_references`
|
1543
|
+
# @return [::Gapic::Config::Method]
|
1544
|
+
#
|
1545
|
+
attr_reader :ingest_context_references
|
1546
|
+
##
|
1345
1547
|
# RPC-specific configuration for `list_messages`
|
1346
1548
|
# @return [::Gapic::Config::Method]
|
1347
1549
|
#
|
@@ -1366,6 +1568,11 @@ module Google
|
|
1366
1568
|
# @return [::Gapic::Config::Method]
|
1367
1569
|
#
|
1368
1570
|
attr_reader :search_knowledge
|
1571
|
+
##
|
1572
|
+
# RPC-specific configuration for `generate_suggestions`
|
1573
|
+
# @return [::Gapic::Config::Method]
|
1574
|
+
#
|
1575
|
+
attr_reader :generate_suggestions
|
1369
1576
|
|
1370
1577
|
# @private
|
1371
1578
|
def initialize parent_rpcs = nil
|
@@ -1377,6 +1584,8 @@ module Google
|
|
1377
1584
|
@get_conversation = ::Gapic::Config::Method.new get_conversation_config
|
1378
1585
|
complete_conversation_config = parent_rpcs.complete_conversation if parent_rpcs.respond_to? :complete_conversation
|
1379
1586
|
@complete_conversation = ::Gapic::Config::Method.new complete_conversation_config
|
1587
|
+
ingest_context_references_config = parent_rpcs.ingest_context_references if parent_rpcs.respond_to? :ingest_context_references
|
1588
|
+
@ingest_context_references = ::Gapic::Config::Method.new ingest_context_references_config
|
1380
1589
|
list_messages_config = parent_rpcs.list_messages if parent_rpcs.respond_to? :list_messages
|
1381
1590
|
@list_messages = ::Gapic::Config::Method.new list_messages_config
|
1382
1591
|
suggest_conversation_summary_config = parent_rpcs.suggest_conversation_summary if parent_rpcs.respond_to? :suggest_conversation_summary
|
@@ -1387,6 +1596,8 @@ module Google
|
|
1387
1596
|
@generate_stateless_suggestion = ::Gapic::Config::Method.new generate_stateless_suggestion_config
|
1388
1597
|
search_knowledge_config = parent_rpcs.search_knowledge if parent_rpcs.respond_to? :search_knowledge
|
1389
1598
|
@search_knowledge = ::Gapic::Config::Method.new search_knowledge_config
|
1599
|
+
generate_suggestions_config = parent_rpcs.generate_suggestions if parent_rpcs.respond_to? :generate_suggestions
|
1600
|
+
@generate_suggestions = ::Gapic::Config::Method.new generate_suggestions_config
|
1390
1601
|
|
1391
1602
|
yield self if block_given?
|
1392
1603
|
end
|