Service Client: Google::Cloud::Discoveryengine::V1::ConversationalSearchService::ConversationalSearchServiceClient

Client stub representing the remote ConversationalSearchService gRPC service. Delegates call dispatching to Google::gRPC::Client.

target

The endpoint target address. Defaults to discoveryengine.googleapis.com:443.

credentials

The authentication credentials provider. Defaults to application default credentials via Google::Auth.

NAME

Google::Cloud::Discoveryengine::V1::ConversationalSearchService - Compiled Protocol Buffers messages for google/cloud/discoveryengine/v1/conversational_search_service.proto

SYNOPSIS

use Google::Cloud::Discoveryengine::V1::ConversationalSearchService;

my $msg = Google::Cloud::Discoveryengine::V1::ConversationalSearchService::ConverseConversationRequest->new({
    name => $name,
    query => $query,
    serving_config => $serving_config,
    conversation => $conversation,
});

# Read or update a field
my $val = $msg->name();

# Binary wire-format roundtrip
my $bytes   = $msg->serialize();
my $decoded = Google::Cloud::Discoveryengine::V1::ConversationalSearchService::ConverseConversationRequest->parse($bytes);

# Canonical ProtoJSON
my $json = $msg->to_json();

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/cloud/discoveryengine/v1/conversational_search_service.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().

MESSAGES

Google::Cloud::Discoveryengine::V1::ConversationalSearchService::ConverseConversationRequest

Request message for [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1.ConversationalSearchService.ConverseConversation] method.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The resource name of the Conversation to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.

  • $msg->query() / $msg->query($value)

    Type: Message (Google::Cloud::Discoveryengine::V1::Conversation::TextInput)

    Required. Current user input.

  • $msg->serving_config() / $msg->serving_config($value)

    Type: String

    The resource name of the Serving Config to use. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}` If this is not set, the default serving config will be used.

  • $msg->conversation() / $msg->conversation($value)

    Type: Message (Google::Cloud::Discoveryengine::V1::Conversation::Conversation)

    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.

  • $msg->safe_search() / $msg->safe_search($value)

    Type: Bool

    Whether to turn on safe search.

  • $msg->user_labels() / $msg->user_labels($value)

    Type: Message (Google::Cloud::Discoveryengine::V1::ConversationalSearchService::ConverseConversationRequest::UserLabelsEntry)

    The user labels applied to a resource must meet the following requirements:

    * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character.

    See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.

  • $msg->summary_spec() / $msg->summary_spec($value)

    Type: Message (Google::Cloud::Discoveryengine::V1::SearchService::SearchRequest::ContentSearchSpec::SummarySpec)

    A specification for configuring the summary returned in the response.

  • $msg->filter() / $msg->filter($value)

    Type: String

    The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. This will be used to filter search results which may affect the summary response.

    If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.

    Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customer might have a field 'name' in their schema. In this case the filter would look like this: filter --> name:'ANY("king kong")'

    For more information about filtering including syntax and filter operators, see [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)

  • $msg->boost_spec() / $msg->boost_spec($value)

    Type: Message (Google::Cloud::Discoveryengine::V1::SearchService::SearchRequest::BoostSpec)

    Boost specification to boost certain documents in search results which may affect the converse response. For more information on boosting, see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)

Google::Cloud::Discoveryengine::V1::ConversationalSearchService::ConverseConversationResponse

Response message for [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1.ConversationalSearchService.ConverseConversation] method.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Discoveryengine::V1::ConversationalSearchService::CreateConversationRequest

Request for CreateConversation method.

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`

  • $msg->conversation() / $msg->conversation($value)

    Type: Message (Google::Cloud::Discoveryengine::V1::Conversation::Conversation)

    Required. The conversation to create.

Google::Cloud::Discoveryengine::V1::ConversationalSearchService::UpdateConversationRequest

Request for UpdateConversation method.

Inherits from Protobuf::Message.

Accessors

  • $msg->conversation() / $msg->conversation($value)

    Type: Message (Google::Cloud::Discoveryengine::V1::Conversation::Conversation)

    Required. The Conversation to update.

  • $msg->update_mask() / $msg->update_mask($value)

    Type: Message (Google::Protobuf::FieldMask::FieldMask)

    Indicates which fields in the provided [Conversation][google.cloud.discoveryengine.v1.Conversation] to update. The following are NOT supported:

    * [Conversation.name][google.cloud.discoveryengine.v1.Conversation.name]

    If not set or empty, all supported fields are updated.

Google::Cloud::Discoveryengine::V1::ConversationalSearchService::DeleteConversationRequest

Request for DeleteConversation method.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The resource name of the Conversation to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`

Google::Cloud::Discoveryengine::V1::ConversationalSearchService::GetConversationRequest

Request for GetConversation method.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The resource name of the Conversation to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`

Google::Cloud::Discoveryengine::V1::ConversationalSearchService::ListConversationsRequest

Request for ListConversations method.

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`

  • $msg->page_size() / $msg->page_size($value)

    Type: Int32

    Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.

  • $msg->page_token() / $msg->page_token($value)

    Type: String

    A page token, received from a previous `ListConversations` call. Provide this to retrieve the subsequent page.

  • $msg->filter() / $msg->filter($value)

    Type: String

    A filter to apply on the list results. The supported features are: user_pseudo_id, state.

    Example: "user_pseudo_id = some_id"

  • $msg->order_by() / $msg->order_by($value)

    Type: 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"

Google::Cloud::Discoveryengine::V1::ConversationalSearchService::ListConversationsResponse

Response for ListConversations method.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Discoveryengine::V1::ConversationalSearchService::AnswerQueryRequest

Request message for [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1.ConversationalSearchService.AnswerQuery] method.

Inherits from Protobuf::Message.

Accessors

  • $msg->serving_config() / $msg->serving_config($value)

    Type: String

    Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`.

    Or the resource name of the agent engine serving config, such as: `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_agent_answer`. (use when `enable_agent_invocation` set to true, and you have custom `AI_MODE` agent engine configured)

    This field is used to identify the serving configuration name, set of models used to make the search.

  • $msg->query() / $msg->query($value)

    Type: Message (Google::Cloud::Discoveryengine::V1::Session::Query)

    Required. Current user query.

  • $msg->session() / $msg->session($value)

    Type: String

    The session resource name. Not required.

    When session field is not set, the API is in sessionless mode.

    We support auto session mode: users can use the wildcard symbol `-` as session ID. A new ID will be automatically generated and assigned.

  • $msg->safety_spec() / $msg->safety_spec($value)

    Type: Message (Google::Cloud::Discoveryengine::V1::ConversationalSearchService::AnswerQueryRequest::SafetySpec)

    Model specification.

  • $msg->related_questions_spec() / $msg->related_questions_spec($value)

    Type: Message (Google::Cloud::Discoveryengine::V1::ConversationalSearchService::AnswerQueryRequest::RelatedQuestionsSpec)

    Related questions specification.

  • $msg->grounding_spec() / $msg->grounding_spec($value)

    Type: Message (Google::Cloud::Discoveryengine::V1::ConversationalSearchService::AnswerQueryRequest::GroundingSpec)

    Optional. Grounding specification.

  • $msg->answer_generation_spec() / $msg->answer_generation_spec($value)

    Type: Message (Google::Cloud::Discoveryengine::V1::ConversationalSearchService::AnswerQueryRequest::AnswerGenerationSpec)

    Answer generation specification.

  • $msg->search_spec() / $msg->search_spec($value)

    Type: Message (Google::Cloud::Discoveryengine::V1::ConversationalSearchService::AnswerQueryRequest::SearchSpec)

    Search specification.

  • $msg->query_understanding_spec() / $msg->query_understanding_spec($value)

    Type: Message (Google::Cloud::Discoveryengine::V1::ConversationalSearchService::AnswerQueryRequest::QueryUnderstandingSpec)

    Query understanding specification.

  • $msg->asynchronous_mode() / $msg->asynchronous_mode($value)

    Type: Bool

    Deprecated: This field is deprecated. Streaming Answer API will be supported.

    Asynchronous mode control.

    If enabled, the response will be returned with answer/session resource name without final answer. The API users need to do the polling to get the latest status of answer/session by calling [ConversationalSearchService.GetAnswer][google.cloud.discoveryengine.v1.ConversationalSearchService.GetAnswer] or [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1.ConversationalSearchService.GetSession] method.

  • $msg->user_pseudo_id() / $msg->user_pseudo_id($value)

    Type: String

    A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website.

    This field should NOT have a fixed value such as `unknown_visitor`.

    The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.

  • $msg->user_labels() / $msg->user_labels($value)

    Type: Message (Google::Cloud::Discoveryengine::V1::ConversationalSearchService::AnswerQueryRequest::UserLabelsEntry)

    The user labels applied to a resource must meet the following requirements:

    * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character.

    See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.

  • $msg->end_user_spec() / $msg->end_user_spec($value)

    Type: Message (Google::Cloud::Discoveryengine::V1::ConversationalSearchService::AnswerQueryRequest::EndUserSpec)

    Optional. End user specification.

Google::Cloud::Discoveryengine::V1::ConversationalSearchService::AnswerQueryResponse

Response message for [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1.ConversationalSearchService.AnswerQuery] method.

Inherits from Protobuf::Message.

Accessors

  • $msg->answer() / $msg->answer($value)

    Type: Message (Google::Cloud::Discoveryengine::V1::Answer::Answer)

    Answer resource object. If [AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.max_rephrase_steps][google.cloud.discoveryengine.v1.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.max_rephrase_steps] is greater than 1, use [Answer.name][google.cloud.discoveryengine.v1.Answer.name] to fetch answer information using [ConversationalSearchService.GetAnswer][google.cloud.discoveryengine.v1.ConversationalSearchService.GetAnswer] API.

  • $msg->session() / $msg->session($value)

    Type: Message (Google::Cloud::Discoveryengine::V1::Session::Session)

    Session resource object. It will be only available when session field is set and valid in the [AnswerQueryRequest][google.cloud.discoveryengine.v1.AnswerQueryRequest] request.

  • $msg->answer_query_token() / $msg->answer_query_token($value)

    Type: String

    A global unique ID used for logging.

Google::Cloud::Discoveryengine::V1::ConversationalSearchService::GetAnswerRequest

Request for GetAnswer method.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The resource name of the Answer to get. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`

Google::Cloud::Discoveryengine::V1::ConversationalSearchService::CreateSessionRequest

Request for CreateSession method.

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`

  • $msg->session() / $msg->session($value)

    Type: Message (Google::Cloud::Discoveryengine::V1::Session::Session)

    Required. The session to create.

  • $msg->session_id() / $msg->session_id($value)

    Type: String

    Optional. The ID to use for the session, which will become the final component of the session's resource name.

    This value should be 1-63 characters, and valid characters are /[a-z0-9][a-z0-9-]{0,61}[a-z0-9]/. If not specified, a unique ID will be generated.

Google::Cloud::Discoveryengine::V1::ConversationalSearchService::UpdateSessionRequest

Request for UpdateSession method.

Inherits from Protobuf::Message.

Accessors

  • $msg->session() / $msg->session($value)

    Type: Message (Google::Cloud::Discoveryengine::V1::Session::Session)

    Required. The Session to update.

  • $msg->update_mask() / $msg->update_mask($value)

    Type: Message (Google::Protobuf::FieldMask::FieldMask)

    Indicates which fields in the provided [Session][google.cloud.discoveryengine.v1.Session] to update. The following are NOT supported:

    * [Session.name][google.cloud.discoveryengine.v1.Session.name]

    If not set or empty, all supported fields are updated.

Google::Cloud::Discoveryengine::V1::ConversationalSearchService::DeleteSessionRequest

Request for DeleteSession method.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The resource name of the Session to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`

Google::Cloud::Discoveryengine::V1::ConversationalSearchService::GetSessionRequest

Request for GetSession method.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`

  • $msg->include_answer_details() / $msg->include_answer_details($value)

    Type: Bool

    Optional. If set to true, the full session including all answer details will be returned.

Google::Cloud::Discoveryengine::V1::ConversationalSearchService::ListSessionsRequest

Request for ListSessions method.

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`

  • $msg->page_size() / $msg->page_size($value)

    Type: Int32

    Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.

  • $msg->page_token() / $msg->page_token($value)

    Type: String

    A page token, received from a previous `ListSessions` call. Provide this to retrieve the subsequent page.

  • $msg->filter() / $msg->filter($value)

    Type: String

    A comma-separated list of fields to filter by, in EBNF grammar.

    The supported fields are:

    * `user_pseudo_id` * `state` * `display_name` * `starred` * `is_pinned` * `labels` * `create_time` * `update_time` * `collaborative_project`

    Examples:

    * `user_pseudo_id = some_id` * `display_name = "some_name"` * `starred = true` * `is_pinned=true AND (NOT labels:hidden)` * `create_time > "1970-01-01T12:00:00Z"` * `collaborative_project = "projects/123/locations/global/collections/default_collection/engines/" "default_engine/collaborative_projects/cp1"`

  • $msg->order_by() / $msg->order_by($value)

    Type: 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`
    * `session_name`
    * `is_pinned`
    * `display_name`

    Example:

    * `update_time desc` * `create_time` * `is_pinned desc,update_time desc`: list sessions by is_pinned first, then by update_time.

Google::Cloud::Discoveryengine::V1::ConversationalSearchService::ListSessionsResponse

Response for ListSessions method.

Inherits from Protobuf::Message.

Accessors

  • $msg->sessions() / $msg->sessions($value)

    Type: Message (Google::Cloud::Discoveryengine::V1::Session::Session)

    All the Sessions for a given data store.

  • $msg->next_page_token() / $msg->next_page_token($value)

    Type: String

    Pagination token, if not returned indicates the last page.

SEE ALSO

Protobuf, Protobuf::Message, Google::Cloud::Discoveryengine::V1::ConversationalSearchService::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.