REST Resource: projects.locations.collections.engines.assistants

Resource: Assistant

Discovery Engine Assistant resource.

JSON representation
{
  "name": string,
  "displayName": string,
  "description": string,
  "generationConfig": {
    object (GenerationConfig)
  },
  "googleSearchGroundingEnabled": boolean,
  "webGroundingType": enum (WebGroundingType),
  "defaultWebGroundingToggleOff": boolean,
  "vertexAiAgentConfigs": [
    {
      object (VertexAiAgentConfig)
    }
  ],
  "enabledActions": {
    string: {
      object (ActionList)
    },
    ...
  },
  "enabledTools": {
    string: {
      object (ToolList)
    },
    ...
  },
  "customerPolicy": {
    object (CustomerPolicy)
  },
  "vertexAiSearchToolConfig": {
    object (VertexAiSearchToolConfig)
  },
  "styleAndFormattingInstructions": string,
  "disableLocationContext": boolean
}
Fields
name

string

Immutable. Resource name of the assistant. Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}

It must be a UTF-8 encoded string with a length limit of 1024 characters.

displayName

string

Required. The assistant display name.

It must be a UTF-8 encoded string with a length limit of 128 characters.

description

string

Optional. Description for additional information. Expected to be shown on the configuration UI, not to the users of the assistant.

generationConfig

object (GenerationConfig)

Optional. Configuration for the generation of the assistant response.

googleSearchGroundingEnabled
(deprecated)

boolean

Optional. Deprecated. Use webGroundingType instead.

webGroundingType

enum (WebGroundingType)

Optional. The type of web grounding to use.

defaultWebGroundingToggleOff

boolean

Optional. This field controls the default web grounding toggle for end users if webGroundingType is set to WEB_GROUNDING_TYPE_GOOGLE_SEARCH or WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH. By default, this field is set to false. If webGroundingType is WEB_GROUNDING_TYPE_GOOGLE_SEARCH or WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH, end users will have web grounding enabled by default on UI. If true, grounding toggle will be disabled by default on UI. End users can still enable web grounding in the UI if web grounding is enabled.

vertexAiAgentConfigs[]
(deprecated)

object (VertexAiAgentConfig)

Optional. Deprecated: Will be replaced by Dialogflow agents in AgentService. List of Vertex AI Agents that can be reached through the assistant.

enabledActions
(deprecated)

map (key: string, value: object (ActionList))

Optional. Deprecated: will be replaced by enabledTools instead. The enabled actions on this assistant. The keys are connector name, for example "projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector The values consist of admin enabled actions towards the connector instance. Admin can selectively enable multiple actions on any of the connector instances that they created in the project. For example {"jira1ConnectorName": [(actionId1, "createTicket"), (actionId2, "transferTicket")], "gmail1ConnectorName": [(actionId3, "sendEmail"),..] }

enabledTools

map (key: string, value: object (ToolList))

Optional. Note: not implemented yet. Use enabledActions instead. The enabled tools on this assistant. The keys are connector name, for example "projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector The values consist of admin enabled tools towards the connector instance. Admin can selectively enable multiple tools on any of the connector instances that they created in the project. For example {"jira1ConnectorName": [(toolId1, "createTicket"), (toolId2, "transferTicket")], "gmail1ConnectorName": [(toolId3, "sendEmail"),..] }

customerPolicy

object (CustomerPolicy)

Optional. Customer policy for the assistant.

vertexAiSearchToolConfig

object (VertexAiSearchToolConfig)

Optional. Configuration options for the Vertex AI Search tool.

styleAndFormattingInstructions
(deprecated)

string

Optional. Deprecated. Please use [addtional_system_instructions][GenerationConfig.SystemInstruction.additional_system_instructions] instead. Common system instruction snippet for setting conversation style, tone and formatting. Added to all LLM prompts via the placeholder [STYLE_AND_FORMATTING_INSTRUCTIONS].

disableLocationContext

boolean

Optional. Indicates whether to disable user location context. By default, user location context is enabled.

GenerationConfig

Configuration for the generation of the assistant response.

JSON representation
{
  "systemInstruction": {
    object (SystemInstruction)
  },
  "defaultLanguage": string
}
Fields
systemInstruction

object (SystemInstruction)

System instruction, also known as the prompt preamble for LLM calls. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions

defaultLanguage

string

The default language to use for the generation of the assistant response. Use an ISO 639-1 language code such as en. If not specified, the language will be automatically detected.

SystemInstruction

System instruction, also known as the prompt preamble for LLM calls.

JSON representation
{
  "additionalSystemInstruction": string
}
Fields
additionalSystemInstruction

string

Optional. Additional system instruction that will be added to the default system instruction.

WebGroundingType

The type of web grounding to use.

Enums
WEB_GROUNDING_TYPE_UNSPECIFIED Default, unspecified setting. This is the same as disabled.
WEB_GROUNDING_TYPE_DISABLED Web grounding is disabled.

VertexAiAgentConfig

Deprecated: Use Dialogflow agents in AgentService instead. Represents an external Vertex AI Agent that can be reached through the assistant.

JSON representation
{
  "displayName": string,
  "name": string,
  "toolDescription": string
}
Fields
displayName

string

Required. Display name of the Vertex AI Agent used for reference in the assistant.

name

string

Required. Resource name of the Vertex AI Agent. Format: projects/{project}/locations/{location}/agents/{agent}

toolDescription

string

Required. The tool description of the Vertex AI Agent. This description will be used by the LLM to decide whether the agent is relevant to the user question and the question should be routed to the agent.

ActionList

Deprecated: Will be replaced by ToolList instead. The enabled actions on a connector

JSON representation
{
  "actionInfo": [
    {
      object (ActionInfo)
    }
  ]
}
Fields
actionInfo[]

object (ActionInfo)

The list of actions with corresponding action information.

ActionInfo

Deprecated: Will be replaced by ToolInfo instead. Information to identify an action.

JSON representation
{
  "actionName": string,
  "actionDisplayName": string
}
Fields
actionName

string

The name of the action as defined by DataConnectorService.QueryAvailableActions.

actionDisplayName

string

The display name of the action.

ToolList

The enabled tools on a connector

JSON representation
{
  "toolInfo": [
    {
      object (ToolInfo)
    }
  ]
}
Fields
toolInfo[]

object (ToolInfo)

The list of tools with corresponding tool information.

ToolInfo

Information to identify a tool.

JSON representation
{
  "toolName": string,
  "toolDisplayName": string
}
Fields
toolName

string

The name of the tool as defined by DataConnectorService.QueryAvailableActions. Note: it's using action in the DataConnectorService apis, but they are the same as the tool here.

toolDisplayName

string

The display name of the tool.

CustomerPolicy

Customer-defined policy for the assistant.

JSON representation
{
  "bannedPhrases": [
    {
      object (BannedPhrase)
    }
  ],
  "modelArmorConfig": {
    object (ModelArmorConfig)
  }
}
Fields
bannedPhrases[]

object (BannedPhrase)

Optional. List of banned phrases.

modelArmorConfig

object (ModelArmorConfig)

Optional. Model Armor configuration to be used for sanitizing user prompts and assistant responses.

BannedPhrase

Definition of a customer-defined banned phrase. A banned phrase is not allowed to appear in the user query or the LLM response, or else the answer will be refused.

JSON representation
{
  "phrase": string,
  "matchType": enum (BannedPhraseMatchType),
  "ignoreDiacritics": boolean
}
Fields
phrase

string

Required. The raw string content to be banned.

matchType

enum (BannedPhraseMatchType)

Optional. Match type for the banned phrase.

ignoreDiacritics

boolean

Optional. If true, diacritical marks (e.g., accents, umlauts) are ignored when matching banned phrases. For example, "cafe" would match "café".

BannedPhraseMatchType

The matching method for the banned phrase.

Enums
BANNED_PHRASE_MATCH_TYPE_UNSPECIFIED Defaults to SIMPLE_STRING_MATCH.
SIMPLE_STRING_MATCH The banned phrase matches if it is found anywhere in the text as an exact substring.
WORD_BOUNDARY_STRING_MATCH Banned phrase only matches if the pattern found in the text is surrounded by word delimiters. The phrase itself may still contain word delimiters.

ModelArmorConfig

Configuration for customer defined Model Armor templates to be used for sanitizing user prompts and assistant responses.

JSON representation
{
  "userPromptTemplate": string,
  "responseTemplate": string,
  "failureMode": enum (FailureMode)
}
Fields
userPromptTemplate

string

Optional. The resource name of the Model Armor template for sanitizing user prompts. Format: projects/{project}/locations/{location}/templates/{templateId}

If not specified, no sanitization will be applied to the user prompt.

responseTemplate

string

Optional. The resource name of the Model Armor template for sanitizing assistant responses. Format: projects/{project}/locations/{location}/templates/{templateId}

If not specified, no sanitization will be applied to the assistant response.

failureMode

enum (FailureMode)

Optional. Defines the failure mode for Model Armor sanitization.

FailureMode

Determines the behavior when Model Armor fails to process a request.

Enums
FAILURE_MODE_UNSPECIFIED Unspecified failure mode, default behavior is FAIL_CLOSED.
FAIL_OPEN In case of a Model Armor processing failure, the request is allowed to proceed without any changes.
FAIL_CLOSED In case of a Model Armor processing failure, the request is rejected.

VertexAiSearchToolConfig

Configuration options for the Vertex AI Search tool that the assistant may use when processing queries.

JSON representation
{
  "llmSystemInstructions": string
}
Fields
llmSystemInstructions
(deprecated)

string

Deprecated. Please refrain from using this field. System instructions for answering based on the search results of Vertex AI Search. Note that the answer produced by the search tool may differ from the final answer of the assistant.

In general, system instructions are a set of natural language instructions that the model processes before it processes prompts. It tells the model how it should behave and respond to prompts. See https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions

Example: "Use information only from the sources to answer. Also, make sure to nicely format the answer with Markdown."

If not specified, the internal default will be used.

Methods

assist

Assists the user with a query.

create

Creates an Assistant.

delete

Deletes an Assistant.

get

Gets an Assistant.

list

Lists all Assistants under an Engine.

patch

Updates an Assistant

streamAssist

Assists the user with a query in a streaming fashion.