Reference documentation and code samples for the Discovery Engine V1BETA API class Google::Cloud::DiscoveryEngine::V1beta::ConversationalSearchService::Rest::Client.
REST client for the ConversationalSearchService service.
Service for conversational search.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the ConversationalSearchService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all ConversationalSearchService clients ::Google::Cloud::DiscoveryEngine::V1beta::ConversationalSearchService::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the ConversationalSearchService 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)
#converse_conversation
def converse_conversation(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::ConverseConversationResponse
def converse_conversation(name: nil, query: nil, serving_config: nil, conversation: nil, safe_search: nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::ConverseConversationResponse
Converses a conversation.
def converse_conversation(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::ConverseConversationResponse
converse_conversation
via a request object, either of type
Google::Cloud::DiscoveryEngine::V1beta::ConverseConversationRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1beta::ConverseConversationRequest, ::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 converse_conversation(name: nil, query: nil, serving_config: nil, conversation: nil, safe_search: nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::ConverseConversationResponse
converse_conversation
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 resource name of the Conversation to get. Format:
projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}
. Useprojects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-
to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session. - query (::Google::Cloud::DiscoveryEngine::V1beta::TextInput, ::Hash) — Required. Current user input.
-
serving_config (::String) — The resource name of the Serving Config to use. Format:
projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}
If this is not set, the default serving config will be used. - conversation (::Google::Cloud::DiscoveryEngine::V1beta::Conversation, ::Hash) — The conversation to be used by auto session only. The name field will be ignored as we automatically assign new name for the conversation in auto session.
- safe_search (::Boolean) — Whether to turn on safe search.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DiscoveryEngine::V1beta::ConverseConversationResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#create_conversation
def create_conversation(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::Conversation
def create_conversation(parent: nil, conversation: nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::Conversation
Creates a Conversation.
If the Conversation to create already exists, an ALREADY_EXISTS error is returned.
def create_conversation(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::Conversation
create_conversation
via a request object, either of type
Google::Cloud::DiscoveryEngine::V1beta::CreateConversationRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1beta::CreateConversationRequest, ::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_conversation(parent: nil, conversation: nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::Conversation
create_conversation
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. Full resource name of parent data store. Format:
projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}
- conversation (::Google::Cloud::DiscoveryEngine::V1beta::Conversation, ::Hash) — Required. The conversation to create.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DiscoveryEngine::V1beta::Conversation)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#delete_conversation
def delete_conversation(request, options = nil) -> ::Google::Protobuf::Empty
def delete_conversation(name: nil) -> ::Google::Protobuf::Empty
Deletes a Conversation.
If the Conversation to delete does not exist, a NOT_FOUND error is returned.
def delete_conversation(request, options = nil) -> ::Google::Protobuf::Empty
delete_conversation
via a request object, either of type
DeleteConversationRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1beta::DeleteConversationRequest, ::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 delete_conversation(name: nil) -> ::Google::Protobuf::Empty
delete_conversation
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 resource name of the Conversation to delete. Format:
projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#get_conversation
def get_conversation(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::Conversation
def get_conversation(name: nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::Conversation
Gets a Conversation.
def get_conversation(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::Conversation
get_conversation
via a request object, either of type
GetConversationRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1beta::GetConversationRequest, ::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_conversation(name: nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::Conversation
get_conversation
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 resource name of the Conversation to get. Format:
projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DiscoveryEngine::V1beta::Conversation)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#initialize
def initialize() { |config| ... } -> Client
Create a new ConversationalSearchService REST client object.
- (config) — Configure the ConversationalSearchService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::DiscoveryEngine::V1beta::ConversationalSearchService::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::DiscoveryEngine::V1beta::ConversationalSearchService::Rest::Client.new do |config| config.timeout = 10.0 end
#list_conversations
def list_conversations(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::Conversation>
def list_conversations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::Conversation>
Lists all Conversations by their parent [DataStore][google.cloud.discoveryengine.v1beta.DataStore].
def list_conversations(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::Conversation>
list_conversations
via a request object, either of type
ListConversationsRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1beta::ListConversationsRequest, ::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_conversations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::Conversation>
list_conversations
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 data store resource name. Format:
projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}
- page_size (::Integer) — Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.
-
page_token (::String) — A page token, received from a previous
ListConversations
call. Provide this to retrieve the subsequent page. -
filter (::String) — A filter to apply on the list results. The supported features are:
user_pseudo_id, state.
Example: "user_pseudo_id = some_id"
-
order_by (::String) — A comma-separated list of fields to order by, sorted in ascending order.
Use "desc" after a field name for descending.
Supported fields:
update_time
create_time
conversation_name
Example: "update_time desc" "create_time"
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::Conversation>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::Conversation>)
- (::Google::Cloud::Error) — if the REST call is aborted.
#update_conversation
def update_conversation(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::Conversation
def update_conversation(conversation: nil, update_mask: nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::Conversation
Updates a Conversation.
Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned.
def update_conversation(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::Conversation
update_conversation
via a request object, either of type
UpdateConversationRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1beta::UpdateConversationRequest, ::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_conversation(conversation: nil, update_mask: nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::Conversation
update_conversation
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).
- conversation (::Google::Cloud::DiscoveryEngine::V1beta::Conversation, ::Hash) — Required. The Conversation to update.
-
update_mask (::Google::Protobuf::FieldMask, ::Hash) — Indicates which fields in the provided
Conversation to update.
The following are NOT supported:
- [conversation.name][]
If not set or empty, all supported fields are updated.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DiscoveryEngine::V1beta::Conversation)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.