Discovery Engine v1 API - Class AnswerQueryRequest (1.5.0)

public sealed class AnswerQueryRequest : IMessage<AnswerQueryRequest>, IEquatable<AnswerQueryRequest>, IDeepCloneable<AnswerQueryRequest>, IBufferMessage, IMessage

Reference documentation and code samples for the Discovery Engine v1 API class AnswerQueryRequest.

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

Inheritance

object > AnswerQueryRequest

Namespace

Google.Cloud.DiscoveryEngine.V1

Assembly

Google.Cloud.DiscoveryEngine.V1.dll

Constructors

AnswerQueryRequest()

public AnswerQueryRequest()

AnswerQueryRequest(AnswerQueryRequest)

public AnswerQueryRequest(AnswerQueryRequest other)
Parameter
Name Description
other AnswerQueryRequest

Properties

AnswerGenerationSpec

public AnswerQueryRequest.Types.AnswerGenerationSpec AnswerGenerationSpec { get; set; }

Answer generation specification.

Property Value
Type Description
AnswerQueryRequestTypesAnswerGenerationSpec

AsynchronousMode

[Obsolete]
public bool AsynchronousMode { get; set; }

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.

Property Value
Type Description
bool

Query

public Query Query { get; set; }

Required. Current user query.

Property Value
Type Description
Query

QueryUnderstandingSpec

public AnswerQueryRequest.Types.QueryUnderstandingSpec QueryUnderstandingSpec { get; set; }

Query understanding specification.

Property Value
Type Description
AnswerQueryRequestTypesQueryUnderstandingSpec

RelatedQuestionsSpec

public AnswerQueryRequest.Types.RelatedQuestionsSpec RelatedQuestionsSpec { get; set; }

Related questions specification.

Property Value
Type Description
AnswerQueryRequestTypesRelatedQuestionsSpec

SafetySpec

public AnswerQueryRequest.Types.SafetySpec SafetySpec { get; set; }

Model specification.

Property Value
Type Description
AnswerQueryRequestTypesSafetySpec

SearchSpec

public AnswerQueryRequest.Types.SearchSpec SearchSpec { get; set; }

Search specification.

Property Value
Type Description
AnswerQueryRequestTypesSearchSpec

ServingConfig

public string ServingConfig { get; set; }

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. This field is used to identify the serving configuration name, set of models used to make the search.

Property Value
Type Description
string

ServingConfigAsServingConfigName

public ServingConfigName ServingConfigAsServingConfigName { get; set; }

ServingConfigName-typed view over the ServingConfig resource name property.

Property Value
Type Description
ServingConfigName

Session

public string Session { get; set; }

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.

Property Value
Type Description
string

SessionAsSessionName

public SessionName SessionAsSessionName { get; set; }

SessionName-typed view over the Session resource name property.

Property Value
Type Description
SessionName

UserLabels

public MapField<string, string> UserLabels { get; }

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 for more details.

Property Value
Type Description
MapFieldstringstring

UserPseudoId

public string UserPseudoId { get; set; }

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.

Property Value
Type Description
string