AssistRequest

Request for the AssistantService.Assist method.

JSON representation
{
  "name": string,
  "query": {
    object (Query)
  },
  "session": string,
  "assistSkippingMode": enum (AssistSkippingMode),
  "fileIds": [
    string
  ],
  "userMetadata": {
    object (UserMetadata)
  },
  "languageCode": string,
  "webGroundingEnabled": boolean,
  "dataStoreSpecs": [
    {
      object (DataStoreSpec)
    }
  ],
  "googleSearchGroundingEnabled": boolean
}
Fields
name

string

Required. The resource name of the Assistant. Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}

query

object (Query)

Optional. Current user query.

Empty query is only supported if fileIds are provided. In this case, the answer will be generated based on those context files.

session

string

Optional. The session to use for the request. If specified, the assistant has access to the session history, and the query and the answer are stored there.

If - is specified as the session ID, or it is left empty, then a new session is created with an automatically generated ID.

Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}

assistSkippingMode

enum (AssistSkippingMode)

Optional. Determines the cases in which the assistant will not answer the query. If the answer is skipped, the reasons will be listed in AssistAnswer.assist_skipped_reasons within AssistResponse.answer.

fileIds[]

string

Optional. The IDs of the files to be used for answering the request. When uploading a file, its ID is returned in AddContextFileResponse.file_id.

userMetadata

object (UserMetadata)

Optional. Information about the user initiating the query.

languageCode

string

Optional. Language to be used for answering if language detection fails. Also used as the language of error messages created by actions, regardless of language detection results.

webGroundingEnabled

boolean

Optional. If set to true, enables grounding with web search. Works only if Assistant.web_grounding_type is [WEB_GROUNDING_TYPE_GOOGLE_SEARCH][] or [WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH][].

dataStoreSpecs[]

object (DataStoreSpec)

Optional. Specs defining DataStores to filter on in a search call and configurations for those data stores. This is only considered for Engines with multiple data stores.

Not setting this field will result in using all data stores in the engine, except when ignoreDataStores is set to true.

googleSearchGroundingEnabled
(deprecated)

boolean

Optional. Deprecated. Use webGroundingEnabled instead.