Response for InteractionService.CreateInteraction.
idstring
Required. Output only. A unique identifier for the interaction completion.
Required. Output only. The status of the interaction.
createdstring
Required. Output only. The time at which the response was created in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).
updatedstring
Required. Output only. The time at which the response was last updated in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).
role
(deprecated)string
Output only. The role of the interaction.
Output only. Responses from the model.
systemInstructionstring
System instruction for the interaction.
A list of tool declarations the model may call during interaction.
Output only. Statistics on the interaction request's token usage.
The requested modalities of the response (TEXT, IMAGE, AUDIO).
responseMimeType
(deprecated)string
The mime type of the response. This is required if responseFormat is set.
previousInteractionIdstring
The id of the previous interaction, if any.
environmentIdstring
Output only. The environment id for the interaction. Only populated if environment config is set in the request.
Required. Output only. The steps that make up the interaction.
Safety settings for the interaction.
labelsmap (key: string, value: string)
Optional. The labels with user-defined metadata for the request. It is used for billing and reporting only.
label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. International characters are allowed. label values are optional. label keys must start with a letter.
inputUnion type
input can be only one of the following:The inputs for the interaction.
stringContentstring
A string input for the interaction, it will be processed as a single text input.
The turns for the interaction.
Input only. The steps for the interaction.
The content for the interaction.
response_format_configUnion type
response_format_config can be only one of the following:Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field.
request_typeUnion type
request_type can be only one of the following:Interaction for generating the completion using models.
Interaction for generating the completion using agents.
environmentUnion type
environment can be only one of the following:envIdstring
The environment id for the interaction. Can be 'remote' for default environment.
The agent's environment lives on the client connection: its built-in environment operations (filesystem ops and running commands) are yielded to the client to execute, instead of running in a server-managed sandbox. Mutually exclusive with remoteEnvironment. (Independent of any client-declared function tools, which are always executed on the client regardless of this field.)
| JSON representation |
|---|
{ "id": string, "status": enum ( |
TurnList
| JSON representation |
|---|
{
"turns": [
{
object ( |
Turn
rolestring
The originator of this turn. Must be user for input or model for model output.
contentUnion type
content can be only one of the following:The content of the turn. An array of Content objects.
contentStringstring
The content of the turn. A single string.
| JSON representation |
|---|
{
"role": string,
// content
"contentList": {
object ( |
StepList
A list of Steps.
The steps of the list.
| JSON representation |
|---|
{
"steps": [
{
object ( |
ResponseFormatList
| JSON representation |
|---|
{
"responseFormats": [
{
object ( |
ResponseFormat
typeUnion type
type can be only one of the following:Multi-discriminator values is already enabled in GAOS
| JSON representation |
|---|
{ // type "audio": { object ( |
AudioResponseFormat
Configuration for audio output format.
The MIME type of the audio output.
The delivery mode for the audio output.
sampleRateinteger
Sample rate in Hz.
bitRateinteger
Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
MimeType
Supported MIME types for audio output.
| Enums | |
|---|---|
TYPE_UNSPECIFIED |
Default value. This value is unused. |
TYPE_MP3 |
MP3 audio format. |
TYPE_OGG_OPUS |
OGG Opus audio format. |
TYPE_L16 |
Raw PCM (L16) audio format. |
TYPE_WAV |
WAV audio format. |
TYPE_ALAW |
A-law audio format. |
TYPE_MULAW |
Mu-law audio format. |
Delivery
Delivery mode for audio output.
| Enums | |
|---|---|
DELIVERY_UNSPECIFIED |
Default value. This value is unused. |
INLINE |
Audio data is returned inline in the response. |
URI |
Audio data is returned as a URI. |
TextResponseFormat
Configuration for text output format.
The MIME type of the text output.
The JSON schema that the output should conform to. Only applicable when mimeType is application/json.
MimeType
Supported MIME types for text output.
| Enums | |
|---|---|
TYPE_UNSPECIFIED |
Default value. This value is unused. |
TYPE_APPLICATION_JSON |
JSON output format. |
TYPE_TEXT_PLAIN |
Plain text output format. |
ImageResponseFormat
Configuration for image output format.
The MIME type of the image output.
The delivery mode for the image output.
The aspect ratio for the image output.
The size of the image output.
| JSON representation |
|---|
{ "mimeType": enum ( |
MimeType
Supported MIME types for image output.
| Enums | |
|---|---|
TYPE_UNSPECIFIED |
Default value. This value is unused. |
TYPE_JPEG |
JPEG image format. |
Delivery
Delivery mode for image output.
| Enums | |
|---|---|
DELIVERY_UNSPECIFIED |
Default value. This value is unused. |
INLINE |
Image data is returned inline in the response. |
URI |
Image data is returned as a URI. |
AspectRatio
Supported aspect ratios for image output.
| Enums | |
|---|---|
ASPECT_RATIO_UNSPECIFIED |
Default value. This value is unused. |
ASPECT_RATIO_ONE_BY_ONE |
1:1 aspect ratio. |
ASPECT_RATIO_TWO_BY_THREE |
2:3 aspect ratio. |
ASPECT_RATIO_THREE_BY_TWO |
3:2 aspect ratio. |
ASPECT_RATIO_THREE_BY_FOUR |
3:4 aspect ratio. |
ASPECT_RATIO_FOUR_BY_THREE |
4:3 aspect ratio. |
ASPECT_RATIO_FOUR_BY_FIVE |
4:5 aspect ratio. |
ASPECT_RATIO_FIVE_BY_FOUR |
5:4 aspect ratio. |
ASPECT_RATIO_NINE_BY_SIXTEEN |
9:16 aspect ratio. |
ASPECT_RATIO_SIXTEEN_BY_NINE |
16:9 aspect ratio. |
ASPECT_RATIO_TWENTY_ONE_BY_NINE |
21:9 aspect ratio. |
ASPECT_RATIO_ONE_BY_EIGHT |
1:8 aspect ratio. |
ASPECT_RATIO_EIGHT_BY_ONE |
8:1 aspect ratio. |
ASPECT_RATIO_ONE_BY_FOUR |
1:4 aspect ratio. |
ASPECT_RATIO_FOUR_BY_ONE |
4:1 aspect ratio. |
ImageSize
Supported image sizes for image output.
| Enums | |
|---|---|
IMAGE_SIZE_UNSPECIFIED |
Default value. This value is unused. |
IMAGE_SIZE_FIVE_TWELVE |
512px image size. |
IMAGE_SIZE_ONE_K |
1K image size. |
IMAGE_SIZE_TWO_K |
2K image size. |
IMAGE_SIZE_FOUR_K |
4K image size. |
VideoResponseFormat
Configuration for video output format.
The delivery mode for the video output.
gcsUristring
The Cloud Storage URI to store the video output. Required for Vertex if delivery mode is URI.
The aspect ratio for the video output.
The duration for the video output.
A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
| JSON representation |
|---|
{ "delivery": enum ( |
Delivery
Delivery mode for video output.
| Enums | |
|---|---|
DELIVERY_UNSPECIFIED |
Default value. This value is unused. |
INLINE |
Video data is returned inline in the response. |
URI |
Video data is returned as a URI. |
AspectRatio
Supported aspect ratios for video output.
| Enums | |
|---|---|
ASPECT_RATIO_UNSPECIFIED |
Default value. This value is unused. |
ASPECT_RATIO_SIXTEEN_BY_NINE |
16:9 aspect ratio. |
ASPECT_RATIO_NINE_BY_SIXTEEN |
9:16 aspect ratio. |
ModelInteraction
Interaction for generating the completion using models.
modelstring
The name of the Model used for generating the completion.
Input only. Configuration parameters for the model interaction.
| JSON representation |
|---|
{
"model": string,
"generationConfig": {
object ( |
GenerationConfig
Configuration parameters for model interactions.
temperaturenumber
Controls the randomness of the output.
topPnumber
The maximum cumulative probability of tokens to consider when sampling.
seedinteger
Seed used in decoding for reproducibility.
stopSequences[]string
A list of character sequences that will stop output interaction.
The level of thought tokens that the model should generate.
Whether to include thought summaries in the response.
maxOutputTokensinteger
The maximum number of tokens to include in the response.
Configuration for speech interaction.
Configuration for image interaction.
Configuration for video generation.
Optional. Configuration for speech recognition (transcription). If present, ASR is enabled.
tool_choiceUnion type
tool_choice can be only one of the following:The mode of the tool choice.
The config for the tool choice.
| JSON representation |
|---|
{ "temperature": number, "topP": number, "seed": integer, "stopSequences": [ string ], "thinkingLevel": enum ( |
ToolChoiceType
The type of tool choice.
| Enums | |
|---|---|
TOOL_CHOICE_TYPE_UNSPECIFIED |
Default value. This value is unused. |
AUTO |
Auto tool choice. |
ANY |
Any tool choice. |
NONE |
No tool choice. |
VALIDATED |
Validated tool choice. |
ToolChoiceConfig
The tool choice configuration containing allowed tools.
The allowed tools.
| JSON representation |
|---|
{
"allowedTools": {
object ( |
AllowedTools
The configuration for allowed tools.
The mode of the tool choice.
tools[]string
The names of the allowed tools.
| JSON representation |
|---|
{
"mode": enum ( |
ThinkingLevel
The level of thought tokens that the model should generate.
| Enums | |
|---|---|
THINKING_LEVEL_UNSPECIFIED |
Default value. This value is unused. |
THINKING_LEVEL_MINIMAL |
Little to no thinking. |
THINKING_LEVEL_LOW |
Low thinking level. |
THINKING_LEVEL_MEDIUM |
Medium thinking level. |
THINKING_LEVEL_HIGH |
High thinking level. |
ThinkingSummaries
Whether to include thought summaries in the response.
| Enums | |
|---|---|
THINKING_SUMMARIES_UNSPECIFIED |
Default value. This value is unused. |
THINKING_SUMMARIES_AUTO |
Auto thinking summaries. |
THINKING_SUMMARIES_NONE |
No thinking summaries. |
SpeechConfig
The configuration for speech interaction.
voicestring
The voice of the speaker.
languagestring
The language of the speech.
speakerstring
The speaker's name, it should match the speaker name given in the prompt.
| JSON representation |
|---|
{ "voice": string, "language": string, "speaker": string } |
ImageConfig
The configuration for image interaction.
aspectRatiostring
The aspect ratio of the image to generate. Supported aspect ratios: 1:1, 2:3, 3:2, 3:4, 4:3, 9:16, 16:9, 21:9.
If not specified, the model will choose a default aspect ratio based on any reference images provided.
imageSizestring
Specifies the size of generated images. Supported values are 1K, 2K, 4K. If not specified, the model will use default value 1K.
| JSON representation |
|---|
{ "aspectRatio": string, "imageSize": string } |
VideoConfig
Configuration options for video generation.
Optional task mode for video generation. If not specified, the model automatically determines the appropriate mode based on the provided text prompt and input media.
| JSON representation |
|---|
{
"task": enum ( |
Task
Supported video generation tasks.
| Enums | |
|---|---|
TASK_UNSPECIFIED |
Unspecified task. The task is inferred from the input prompt and media. |
TEXT_TO_VIDEO |
Generates video solely from a text prompt. |
IMAGE_TO_VIDEO |
Generates video from one or two source images. The first image defines the starting frame, and the optional second image defines the ending frame. |
REFERENCE_TO_VIDEO |
Generates video using reference media (such as images, audio, or video). |
EDIT |
Modifies an existing input video. |
TranscriptionConfig
Configuration for speech recognition (transcription).
timestampGranularities[]string
Optional. The granularity of timestamps to include in the transcription output. Supported values: "word". If empty, no timestamps are generated.
diarizationModestring
Optional. Configures speaker diarization. Supported values: "speaker".
languageCodes[]string
Optional. BCP-47 language codes providing hints about the languages present in the audio. If omitted or empty, defaults to automatic language detection.
adaptationPhrases[]
(deprecated)string
Optional. A list of phrases to bias the ASR model towards.
customVocabulary[]string
Optional. A list of custom vocabulary phrases to bias the speech recognition model toward recognizing specific terms.
| JSON representation |
|---|
{ "timestampGranularities": [ string ], "diarizationMode": string, "languageCodes": [ string ], "adaptationPhrases": [ string ], "customVocabulary": [ string ] } |
AgentInteraction
Interaction for generating the completion using agents.
agentstring
The name of the Agent used for generating the completion.
agent_configUnion type
agent_config can be only one of the following:Antigravity agent configuration. This configuration is session-level settings that are passed to the agent runtime on a per-request basis.
| JSON representation |
|---|
{ "agent": string, // agent_config "dynamicConfig": { object ( |
DynamicAgentConfig
Configuration for dynamic agents.
For agents that are not supported statically in the API definition.
| JSON representation |
|---|
{
"config": {
object ( |
DeepResearchAgentConfig
Configuration for the Deep Research agent.
Whether to include thought summaries in the response.
Whether to include visualizations in the response.
collaborativePlanningboolean
Enables human-in-the-loop planning for the Deep Research agent. If set to true, the Deep Research agent will provide a research plan in its response. The agent will then proceed only if the user confirms the plan in the next turn.
enableBigqueryToolboolean
Enables bigquery tool for the Deep Research agent.
| JSON representation |
|---|
{ "thinkingSummaries": enum ( |
VisualizationMode
Enum for visualization mode. Eventually we will support an interactive mode where the user can choose whether to include HTML visualizations in the response.
| Enums | |
|---|---|
UNSPECIFIED |
The default visualization mode. Will default to AUTO. |
OFF |
Do not include visualizations. |
AUTO |
Automatically include visualizations. |
CodeMenderAgentConfig
Configuration for the CodeMender agent.
session_idstring
Parameter for grouping multiple interactions that belong to the same CodeMender session.
Optional session-specific configurations to override default agent behavior.
modelstring
The name of the model to use for the CodeMender agent. One CodeMender session will only use one model.
requestUnion type
request can be only one of the following:Parameters for finding vulnerabilities.
Parameters for fixing vulnerabilities.
| JSON representation |
|---|
{ "session_id": string, "session_config": { object ( |
FindRequest
Request parameters specific to FIND sessions, used for discovering vulnerabilities in a codebase.
A list of source files to provide as context for the scan.
finding_idstring
The identifier of a specific finding to verify. This is primarily used in VERIFY mode to focus the agent's execution-based validation on a single vulnerability.
descriptionstring
Additional context or custom instructions provided by the user to guide the vulnerability analysis.
The mode of the find session.
| JSON representation |
|---|
{ "source_files": [ { object ( |
FileContent
Content of a single file in the codebase.
pathstring
The relative path of the file from the project root.
contentstring
The UTF-8 encoded text content of the file.
| JSON representation |
|---|
{ "path": string, "content": string } |
Mode
Defines the depth and thoroughness of the find session.
| Enums | |
|---|---|
MODE_UNSPECIFIED |
Default value. This value is unused. |
MODE_SCAN |
Fast scan using only the initial classifier. |
MODE_VERIFY |
Performs classification followed by detailed investigation. |
FixRequest
Request parameters specific to FIX sessions, used for generating and validating security patches.
A list of source files providing context for the remediation. These files are typically the ones containing the identified vulnerability.
finding_idstring
The identifier of the specific security finding to be remediated. This id maps to a previously discovered vulnerability.
descriptionstring
Additional context or custom instructions provided by the user to guide the patch generation process.
| JSON representation |
|---|
{
"source_files": [
{
object ( |
SessionConfig
The configuration of CodeMender sessions.
max_roundsinteger
The maximum number of interaction rounds the agent is allowed to perform before reaching a timeout.
| JSON representation |
|---|
{ "max_rounds": integer } |
AntigravityAgentConfig
Configuration for the Antigravity agent runtime. Provides server-side control over the agent's execution environment and tool configuration.
modelstring
The model to use for agent reasoning.
Max total tokens for the agent run.
| JSON representation |
|---|
{ "model": string, "maxTotalTokens": string } |
EnvironmentConfig
Configuration for a custom environment.
environmentIdstring
Optional. The environment id for the interaction. If specified, the request will update the existing environment instead of creating a new one.
networkUnion type
network can be only one of the following:Allow only specific domains.
Network egress mode.
| JSON representation |
|---|
{ "sources": [ { object ( |
EnvironmentNetworkEgressAllowlist
Network egress configuration for the environment.
List of allowed domains and their configurations.
| JSON representation |
|---|
{
"allowlist": [
{
object ( |
EgressRule
A network egress rule that controls which external domains the environment is allowed to reach. Each rule identifies a target domain and, optionally, a set of HTTP headers to inject into every matching outbound request.
domainstring
The domain pattern to match for this rule. Use an exact hostname (e.g., github.com), a wildcard prefix (e.g., *.googleapis.com), or * to match all domains.
transformmap (key: string, value: string)
headers to inject into requests matching this rule. Key: header name (e.g., "Authorization"). value: header value (e.g., "Bearer your-token").
| JSON representation |
|---|
{ "domain": string, "transform": { string: string, ... } } |
NetworkMode
Network egress mode for non-allowlist configurations.
| Enums | |
|---|---|
NETWORK_MODE_UNSPECIFIED |
Default value. Unused. |
DISABLED |
All network egress is blocked. |
Source
A source to be mounted into the environment.
sourcestring
The source of the environment. For Cloud Storage, this is the Cloud Storage path. For GitHub, this is the GitHub path.
targetstring
Where the source should appear in the environment.
contentstring
The inline content if type is INLINE.
encodingstring
Optional encoding for inline content (e.g. base64).
| JSON representation |
|---|
{
"type": enum ( |
Type
| Enums | |
|---|---|
TYPE_UNSPECIFIED |
|
GCS |
A Cloud Storage bucket. |
INLINE |
Inline content. |
REPOSITORY |
A generic repository. The protocol prefix in the source URL identifies the provider (e.g., github://, gcs://). |
SKILL_REGISTRY |
A skill resource from the Skill Registry service. Skill: projects/{project}/locations/{location}/skills/{skill} SkillRevision: projects/{project}/locations/{location}/skills/{skill}/revisions/{revision} Support mounting all skills under a project: projects/{project}/locations/{location}/skills. |
LocalEnvironmentConfig
This type has no fields.
Configuration for an environment that lives on the client connection rather than in a server-managed sandbox.
When set (via Interaction.local_environment), the agent's filesystem and shell are treated as living on the client: the agent's built-in environment operations (e.g. reading/listing/editing files and running commands) are suspended on the server and yielded back to the client to execute, with their results returned on a subsequent turn. This is mutually exclusive with a server-managed EnvironmentConfig (remoteEnvironment), since the environment is either on the client or in a server sandbox, never both.
This governs only the agent's built-in environment. client-declared function tools are always executed on the client regardless of this field.
Tool
A tool that can be used by the model.
typeUnion type
type can be only one of the following:A function that can be used by the model.
A tool that can be used by the model to execute code.
A tool that can be used by the model to fetch URL context.
Tool to support the model interacting directly with the computer.
A MCPServer is a server that can be called by the model to perform actions.
A tool that can be used by the model to search Google.
A tool that can be used by the model to search files.
A tool that can be used by the model to search Google Maps.
A tool that can be used by the model to retrieve files.
| JSON representation |
|---|
{ // type "function": { object ( |
Function
A tool that can be used by the model.
namestring
The name of the function.
descriptionstring
A description of the function.
The JSON Schema for the function's parameters.
| JSON representation |
|---|
{
"name": string,
"description": string,
"parameters": {
object ( |
CodeExecution
This type has no fields.
A tool that can be used by the model to execute code.
UrlContext
This type has no fields.
A tool that can be used by the model to fetch URL context.
ComputerUse
A tool that can be used by the model to interact with the computer.
The environment being operated.
excludedPredefinedFunctions[]string
The list of predefined functions that are excluded from the model call.
enablePromptInjectionDetectionboolean
Whether enable the prompt injection detection check on computer-use request.
Optional. disabled safety policies for computer use.
| JSON representation |
|---|
{ "environment": enum ( |
Environment
Represents the environment being operated, such as a web browser.
| Enums | |
|---|---|
ENVIRONMENT_UNSPECIFIED |
Defaults to browser. |
BROWSER |
Operates in a web browser. |
MOBILE |
Operates in a mobile environment. |
DESKTOP |
Operates in a desktop environment. |
SafetyPolicy
| Enums | |
|---|---|
SAFETY_POLICY_UNSPECIFIED |
Unspecified safety policy. |
FINANCIAL_TRANSACTIONS |
Safety policy for financial transactions. |
SENSITIVE_DATA_MODIFICATION |
Safety policy for sensitive data modification. |
COMMUNICATION_TOOL |
Safety policy for communication tools (e.g. Gmail, Chat, Meet). |
ACCOUNT_CREATION |
Safety policy for account creation. |
DATA_MODIFICATION |
Safety policy for data modification. |
USER_CONSENT_MANAGEMENT |
Safety policy for user consent management. |
LEGAL_TERMS_AND_AGREEMENTS |
Safety policy for legal terms and agreements. |
McpServer
A MCPServer is a server that can be called by the model to perform actions.
namestring
The name of the MCPServer.
urlstring
The full URL for the MCPServer endpoint. Example: "https://api.example.com/mcp"
headersmap (key: string, value: string)
Optional: Fields for authentication headers, timeouts, etc., if needed.
The allowed tools.
| JSON representation |
|---|
{
"name": string,
"url": string,
"headers": {
string: string,
...
},
"allowedTools": [
{
object ( |
GoogleSearch
A tool that can be used by the model to search Google.
The types of search grounding to enable.
| JSON representation |
|---|
{
"searchTypes": [
enum ( |
FileSearch
A tool that can be used by the model to search files.
fileSearchStoreNames[]string
The file search store names to search.
topKinteger
The number of semantic retrieval chunks to retrieve.
metadataFilterstring
metadata filter to apply to the semantic retrieval documents and chunks.
| JSON representation |
|---|
{ "fileSearchStoreNames": [ string ], "topK": integer, "metadataFilter": string } |
GoogleMaps
A tool that can be used by the model to call Google Maps.
enableWidgetboolean
Whether to return a widget context token in the tool call result of the response.
latitudenumber
The latitude of the user's location.
longitudenumber
The longitude of the user's location.
| JSON representation |
|---|
{ "enableWidget": boolean, "latitude": number, "longitude": number } |
Retrieval
A tool that can be used by the model to retrieve files.
The types of file retrieval to enable.
Used to specify configuration for VertexAISearch.
Used to specify configuration for ExaAISearch.
Used to specify configuration for ParallelAISearch.
Used to specify configuration for RagStore.
| JSON representation |
|---|
{ "retrievalTypes": [ enum ( |
VertexAISearchConfig
Used to specify configuration for VertexAISearch.
enginestring
Optional. Used to specify Agent Platform Search engine.
datastores[]string
Optional. Used to specify Agent Platform Search datastores.
| JSON representation |
|---|
{ "engine": string, "datastores": [ string ] } |
ExaAISearchConfig
Used to specify configuration for ExaAISearch.
api_keystring
Required. The API key for ExaAiSearch.
Optional. This field can be used to pass any parameter from the Exa.ai Search API.
| JSON representation |
|---|
{ "api_key": string, "custom_config": { object } } |
ParallelAISearchConfig
Used to specify configuration for ParallelAISearch.
api_keystring
Optional. The API key for ParallelAiSearch.
Optional. Custom configs for ParallelAiSearch.
| JSON representation |
|---|
{ "api_key": string, "custom_config": { object } } |
RagStoreConfig
Use to specify configuration for RAG Store.
Optional. The representation of the rag source.
similarity_top_k
(deprecated)integer
Optional. Number of top k results to return from the selected corpora.
vector_distance_threshold
(deprecated)number
Optional. Only return results with vector distance smaller than the threshold.
Optional. The retrieval config for the Rag query.
| JSON representation |
|---|
{ "rag_resources": [ { object ( |
RagResource
The definition of the Rag resource.
rag_corpusstring
Optional. RagCorpora resource name.
rag_file_ids[]string
Optional. ragFileId. The files should be in the same ragCorpus set in ragCorpus field.
| JSON representation |
|---|
{ "rag_corpus": string, "rag_file_ids": [ string ] } |
RagRetrievalConfig
Specifies the context retrieval config.
top_kinteger
Optional. The number of contexts to retrieve.
Optional. Config for Hybrid Search.
Optional. Config for filters.
Optional. Config for ranking and reranking.
| JSON representation |
|---|
{ "top_k": integer, "hybrid_search": { object ( |
HybridSearch
Config for Hybrid Search.
alphanumber
Optional. Alpha value controls the weight between dense and sparse vector search results.
| JSON representation |
|---|
{ "alpha": number } |
Filter
Config for filters.
metadata_filterstring
Optional. String for metadata filtering.
vector_db_thresholdUnion type
vector_db_threshold can be only one of the following:vector_distance_thresholdnumber
Optional. Only returns contexts with vector distance smaller than the threshold.
vector_similarity_thresholdnumber
Optional. Only returns contexts with vector similarity larger than the threshold.
| JSON representation |
|---|
{ "metadata_filter": string, // vector_db_threshold "vector_distance_threshold": number, "vector_similarity_threshold": number // Union type } |
Ranking
Config for ranking and reranking.
ranking_configUnion type
ranking_config can be only one of the following:Optional. Config for Rank service.
| JSON representation |
|---|
{
// ranking_config
"rank_service": {
object ( |
RankService
Config for Rank service.
model_namestring
Optional. The model name of the rank service.
| JSON representation |
|---|
{ "model_name": string } |
SafetySetting
A safety setting that affects the safety-blocking behavior.
A SafetySetting consists of a harm category and a threshold for that category.
Required. The type of harm category to be blocked.
Required. The threshold for blocking content. If the harm probability exceeds this threshold, the content will be blocked.
Optional. The method for blocking content. If not specified, the default behavior is to use the probability score.
| JSON representation |
|---|
{ "type": enum ( |
HarmCategory
Harm categories that can be detected in user input and model responses.
| Enums | |
|---|---|
HARM_CATEGORY_UNSPECIFIED |
Default value. This value is unused. |
HARM_CATEGORY_HATE_SPEECH |
Content that promotes violence or incites hatred against individuals or groups based on certain attributes. |
HARM_CATEGORY_DANGEROUS_CONTENT |
Content that promotes, facilitates, or enables dangerous activities. |
HARM_CATEGORY_HARASSMENT |
Abusive, threatening, or content intended to bully, torment, or ridicule. |
HARM_CATEGORY_SEXUALLY_EXPLICIT |
Content that contains sexually explicit material. |
HARM_CATEGORY_CIVIC_INTEGRITY |
Deprecated: Election filter is not longer supported. The harm category is civic integrity. |
HARM_CATEGORY_IMAGE_HATE |
Images that contain hate speech. |
HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT |
Images that contain dangerous content. |
HARM_CATEGORY_IMAGE_HARASSMENT |
Images that contain harassment. |
HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT |
Images that contain sexually explicit content. |
HARM_CATEGORY_JAILBREAK |
Prompts designed to bypass safety filters. |
HarmBlockThreshold
Thresholds for blocking content based on harm probability.
| Enums | |
|---|---|
HARM_BLOCK_THRESHOLD_UNSPECIFIED |
The harm block threshold is unspecified. |
BLOCK_LOW_AND_ABOVE |
Block content with a low harm probability or higher. |
BLOCK_MEDIUM_AND_ABOVE |
Block content with a medium harm probability or higher. |
BLOCK_ONLY_HIGH |
Block content with a high harm probability. |
BLOCK_NONE |
Do not block any content, regardless of its harm probability. |
OFF |
Turn off the safety filter entirely. |
HarmBlockMethod
The method for blocking content.
| Enums | |
|---|---|
HARM_BLOCK_METHOD_UNSPECIFIED |
The harm block method is unspecified. |
SEVERITY |
The harm block method uses both probability and severity scores. |
PROBABILITY |
The harm block method uses the probability score. |