Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the Participants Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all Participants clients ::Google::Cloud::Dialogflow::V2::Participants::Client.configure do |config| config.timeout = 10.0 end
#analyze_content
def analyze_content(request, options = nil) -> ::Google::Cloud::Dialogflow::V2::AnalyzeContentResponse
def analyze_content(participant: nil, text_input: nil, event_input: nil, reply_audio_config: nil, query_params: nil, assist_query_params: nil, request_id: nil) -> ::Google::Cloud::Dialogflow::V2::AnalyzeContentResponse
Adds a text (chat, for example), or audio (phone recording, for example) message from a participant into the conversation.
Note: Always use agent versions for production traffic sent to virtual agents. See Versions and environments.
def analyze_content(request, options = nil) -> ::Google::Cloud::Dialogflow::V2::AnalyzeContentResponse
analyze_content
via a request object, either of type
AnalyzeContentRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::V2::AnalyzeContentRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def analyze_content(participant: nil, text_input: nil, event_input: nil, reply_audio_config: nil, query_params: nil, assist_query_params: nil, request_id: nil) -> ::Google::Cloud::Dialogflow::V2::AnalyzeContentResponse
analyze_content
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
participant (::String) — Required. The name of the participant this text comes from.
Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>
. - text_input (::Google::Cloud::Dialogflow::V2::TextInput, ::Hash) — The natural language text to be processed.
- event_input (::Google::Cloud::Dialogflow::V2::EventInput, ::Hash) — An input event to send to Dialogflow.
- reply_audio_config (::Google::Cloud::Dialogflow::V2::OutputAudioConfig, ::Hash) — Speech synthesis configuration. The speech synthesis settings for a virtual agent that may be configured for the associated conversation profile are not used when calling AnalyzeContent. If this configuration is not supplied, speech synthesis is disabled.
- query_params (::Google::Cloud::Dialogflow::V2::QueryParameters, ::Hash) — Parameters for a Dialogflow virtual-agent query.
- assist_query_params (::Google::Cloud::Dialogflow::V2::AssistQueryParameters, ::Hash) — Parameters for a human assist query.
-
request_id (::String) — A unique identifier for this request. Restricted to 36 ASCII characters.
A random UUID is recommended.
This request is only idempotent if a
request_id
is provided.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Dialogflow::V2::AnalyzeContentResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/dialogflow/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dialogflow::V2::Participants::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::V2::AnalyzeContentRequest.new # Call the analyze_content method. result = client.analyze_content request # The returned object is of type Google::Cloud::Dialogflow::V2::AnalyzeContentResponse. p result
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the Participants Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#create_participant
def create_participant(request, options = nil) -> ::Google::Cloud::Dialogflow::V2::Participant
def create_participant(parent: nil, participant: nil) -> ::Google::Cloud::Dialogflow::V2::Participant
Creates a new participant in a conversation.
def create_participant(request, options = nil) -> ::Google::Cloud::Dialogflow::V2::Participant
create_participant
via a request object, either of type
CreateParticipantRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::V2::CreateParticipantRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_participant(parent: nil, participant: nil) -> ::Google::Cloud::Dialogflow::V2::Participant
create_participant
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. Resource identifier of the conversation adding the participant.
Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>
. - participant (::Google::Cloud::Dialogflow::V2::Participant, ::Hash) — Required. The participant to create.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Dialogflow::V2::Participant)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/dialogflow/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dialogflow::V2::Participants::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::V2::CreateParticipantRequest.new # Call the create_participant method. result = client.create_participant request # The returned object is of type Google::Cloud::Dialogflow::V2::Participant. p result
#get_participant
def get_participant(request, options = nil) -> ::Google::Cloud::Dialogflow::V2::Participant
def get_participant(name: nil) -> ::Google::Cloud::Dialogflow::V2::Participant
Retrieves a conversation participant.
def get_participant(request, options = nil) -> ::Google::Cloud::Dialogflow::V2::Participant
get_participant
via a request object, either of type
GetParticipantRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::V2::GetParticipantRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_participant(name: nil) -> ::Google::Cloud::Dialogflow::V2::Participant
get_participant
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The name of the participant. Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>
.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Dialogflow::V2::Participant)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/dialogflow/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dialogflow::V2::Participants::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::V2::GetParticipantRequest.new # Call the get_participant method. result = client.get_participant request # The returned object is of type Google::Cloud::Dialogflow::V2::Participant. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new Participants client object.
- (config) — Configure the Participants client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Dialogflow::V2::Participants::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Dialogflow::V2::Participants::Client.new do |config| config.timeout = 10.0 end
#list_participants
def list_participants(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::V2::Participant>
def list_participants(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::V2::Participant>
Returns the list of all participants in the specified conversation.
def list_participants(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::V2::Participant>
list_participants
via a request object, either of type
ListParticipantsRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::V2::ListParticipantsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_participants(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::V2::Participant>
list_participants
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The conversation to list all participants from.
Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>
. - page_size (::Integer) — Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.
- page_token (::String) — Optional. The next_page_token value returned from a previous list request.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::V2::Participant>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::V2::Participant>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/dialogflow/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dialogflow::V2::Participants::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::V2::ListParticipantsRequest.new # Call the list_participants method. result = client.list_participants request # The returned object is of type Gapic::PagedEnumerable. You can # iterate over all elements by calling #each, and the enumerable # will lazily make API calls to fetch subsequent pages. Other # methods are also available for managing paging directly. result.each do |response| # Each element is of type ::Google::Cloud::Dialogflow::V2::Participant. p response end
#suggest_articles
def suggest_articles(request, options = nil) -> ::Google::Cloud::Dialogflow::V2::SuggestArticlesResponse
def suggest_articles(parent: nil, latest_message: nil, context_size: nil, assist_query_params: nil) -> ::Google::Cloud::Dialogflow::V2::SuggestArticlesResponse
Gets suggested articles for a participant based on specific historical messages.
def suggest_articles(request, options = nil) -> ::Google::Cloud::Dialogflow::V2::SuggestArticlesResponse
suggest_articles
via a request object, either of type
SuggestArticlesRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::V2::SuggestArticlesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def suggest_articles(parent: nil, latest_message: nil, context_size: nil, assist_query_params: nil) -> ::Google::Cloud::Dialogflow::V2::SuggestArticlesResponse
suggest_articles
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The name of the participant to fetch suggestion for.
Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>
. -
latest_message (::String) — The name of the latest conversation message to compile suggestion
for. If empty, it will be the latest message of the conversation.
Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/messages/<Message ID>
. - context_size (::Integer) — Max number of messages prior to and including latest_message to use as context when compiling the suggestion. By default 20 and at most 50.
- assist_query_params (::Google::Cloud::Dialogflow::V2::AssistQueryParameters, ::Hash) — Parameters for a human assist query.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Dialogflow::V2::SuggestArticlesResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/dialogflow/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dialogflow::V2::Participants::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::V2::SuggestArticlesRequest.new # Call the suggest_articles method. result = client.suggest_articles request # The returned object is of type Google::Cloud::Dialogflow::V2::SuggestArticlesResponse. p result
#suggest_faq_answers
def suggest_faq_answers(request, options = nil) -> ::Google::Cloud::Dialogflow::V2::SuggestFaqAnswersResponse
def suggest_faq_answers(parent: nil, latest_message: nil, context_size: nil, assist_query_params: nil) -> ::Google::Cloud::Dialogflow::V2::SuggestFaqAnswersResponse
Gets suggested faq answers for a participant based on specific historical messages.
def suggest_faq_answers(request, options = nil) -> ::Google::Cloud::Dialogflow::V2::SuggestFaqAnswersResponse
suggest_faq_answers
via a request object, either of type
SuggestFaqAnswersRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::V2::SuggestFaqAnswersRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def suggest_faq_answers(parent: nil, latest_message: nil, context_size: nil, assist_query_params: nil) -> ::Google::Cloud::Dialogflow::V2::SuggestFaqAnswersResponse
suggest_faq_answers
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The name of the participant to fetch suggestion for.
Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>
. -
latest_message (::String) — The name of the latest conversation message to compile suggestion
for. If empty, it will be the latest message of the conversation.
Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/messages/<Message ID>
. - context_size (::Integer) — Max number of messages prior to and including [latest_message] to use as context when compiling the suggestion. By default 20 and at most 50.
- assist_query_params (::Google::Cloud::Dialogflow::V2::AssistQueryParameters, ::Hash) — Parameters for a human assist query.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Dialogflow::V2::SuggestFaqAnswersResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/dialogflow/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dialogflow::V2::Participants::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::V2::SuggestFaqAnswersRequest.new # Call the suggest_faq_answers method. result = client.suggest_faq_answers request # The returned object is of type Google::Cloud::Dialogflow::V2::SuggestFaqAnswersResponse. p result
#update_participant
def update_participant(request, options = nil) -> ::Google::Cloud::Dialogflow::V2::Participant
def update_participant(participant: nil, update_mask: nil) -> ::Google::Cloud::Dialogflow::V2::Participant
Updates the specified participant.
def update_participant(request, options = nil) -> ::Google::Cloud::Dialogflow::V2::Participant
update_participant
via a request object, either of type
UpdateParticipantRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::V2::UpdateParticipantRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_participant(participant: nil, update_mask: nil) -> ::Google::Cloud::Dialogflow::V2::Participant
update_participant
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- participant (::Google::Cloud::Dialogflow::V2::Participant, ::Hash) — Required. The participant to update.
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. The mask to specify which fields to update.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Dialogflow::V2::Participant)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/dialogflow/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dialogflow::V2::Participants::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::V2::UpdateParticipantRequest.new # Call the update_participant method. result = client.update_participant request # The returned object is of type Google::Cloud::Dialogflow::V2::Participant. p result