From c1381b220f9ef8933198401c6bf7f0be957ef75c Mon Sep 17 00:00:00 2001
From: Yoshi Automation Method Details
"datastore": "A String", # Required. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
},
"vertexRagStore": { # Retrieve from Vertex RAG Store for grounding. # Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService.
- "ragCorpora": [ # Optional. Deprecated. Please use rag_resources instead.
- "A String",
- ],
"ragResources": [ # Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support.
{ # The definition of the Rag resource.
"ragCorpus": "A String", # Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
@@ -406,6 +403,14 @@ Method Details
],
},
],
+ "ragRetrievalConfig": { # Specifies the context retrieval config. # Optional. The retrieval config for the Rag query.
+ "filter": { # Config for filters. # Optional. Config for filters.
+ "metadataFilter": "A String", # Optional. String for metadata filtering.
+ "vectorDistanceThreshold": 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold.
+ "vectorSimilarityThreshold": 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold.
+ },
+ "topK": 42, # Optional. The number of contexts to retrieve.
+ },
"similarityTopK": 42, # Optional. Number of top k results to return from the selected corpora.
"vectorDistanceThreshold": 3.14, # Optional. Only return results with vector distance smaller than the threshold.
},
@@ -438,6 +443,7 @@ Method Details
The object takes the form of:
{ # Request message for [PredictionService.GenerateContent].
+ "cachedContent": "A String", # Optional. The name of the cached content used as context to serve the prediction. Note: only used in explicit caching, where users can have control over caching (e.g. what content to cache) and enjoy guaranteed cost savings. Format: `projects/{project}/locations/{location}/cachedContents/{cachedContent}`
"contents": [ # Required. The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request.
{ # The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn.
"parts": [ # Required. Ordered `Parts` that constitute a single message. Parts may have different IANA MIME types.
@@ -669,9 +675,6 @@ Method Details
"datastore": "A String", # Required. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
},
"vertexRagStore": { # Retrieve from Vertex RAG Store for grounding. # Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService.
- "ragCorpora": [ # Optional. Deprecated. Please use rag_resources instead.
- "A String",
- ],
"ragResources": [ # Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support.
{ # The definition of the Rag resource.
"ragCorpus": "A String", # Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
@@ -680,6 +683,14 @@ Method Details
],
},
],
+ "ragRetrievalConfig": { # Specifies the context retrieval config. # Optional. The retrieval config for the Rag query.
+ "filter": { # Config for filters. # Optional. Config for filters.
+ "metadataFilter": "A String", # Optional. String for metadata filtering.
+ "vectorDistanceThreshold": 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold.
+ "vectorSimilarityThreshold": 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold.
+ },
+ "topK": 42, # Optional. The number of contexts to retrieve.
+ },
"similarityTopK": 42, # Optional. Number of top k results to return from the selected corpora.
"vectorDistanceThreshold": 3.14, # Optional. Only return results with vector distance smaller than the threshold.
},
@@ -840,6 +851,7 @@ Method Details
],
},
"usageMetadata": { # Usage metadata about response(s). # Usage metadata about the response(s).
+ "cachedContentTokenCount": 42, # Output only. Number of tokens in the cached part in the input (the cached content).
"candidatesTokenCount": 42, # Number of tokens in the response(s).
"promptTokenCount": 42, # Number of tokens in the request. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content.
"totalTokenCount": 42, # Total token count for prompt and response candidates.
@@ -857,6 +869,7 @@ Method Details
The object takes the form of:
{ # Request message for [PredictionService.GenerateContent].
+ "cachedContent": "A String", # Optional. The name of the cached content used as context to serve the prediction. Note: only used in explicit caching, where users can have control over caching (e.g. what content to cache) and enjoy guaranteed cost savings. Format: `projects/{project}/locations/{location}/cachedContents/{cachedContent}`
"contents": [ # Required. The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request.
{ # The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn.
"parts": [ # Required. Ordered `Parts` that constitute a single message. Parts may have different IANA MIME types.
@@ -1088,9 +1101,6 @@ Method Details
"datastore": "A String", # Required. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
},
"vertexRagStore": { # Retrieve from Vertex RAG Store for grounding. # Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService.
- "ragCorpora": [ # Optional. Deprecated. Please use rag_resources instead.
- "A String",
- ],
"ragResources": [ # Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support.
{ # The definition of the Rag resource.
"ragCorpus": "A String", # Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
@@ -1099,6 +1109,14 @@ Method Details
],
},
],
+ "ragRetrievalConfig": { # Specifies the context retrieval config. # Optional. The retrieval config for the Rag query.
+ "filter": { # Config for filters. # Optional. Config for filters.
+ "metadataFilter": "A String", # Optional. String for metadata filtering.
+ "vectorDistanceThreshold": 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold.
+ "vectorSimilarityThreshold": 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold.
+ },
+ "topK": 42, # Optional. The number of contexts to retrieve.
+ },
"similarityTopK": 42, # Optional. Number of top k results to return from the selected corpora.
"vectorDistanceThreshold": 3.14, # Optional. Only return results with vector distance smaller than the threshold.
},
@@ -1259,6 +1277,7 @@ Method Details
],
},
"usageMetadata": { # Usage metadata about response(s). # Usage metadata about the response(s).
+ "cachedContentTokenCount": 42, # Output only. Number of tokens in the cached part in the input (the cached content).
"candidatesTokenCount": 42, # Number of tokens in the response(s).
"promptTokenCount": 42, # Number of tokens in the request. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content.
"totalTokenCount": 42, # Total token count for prompt and response candidates.
diff --git a/docs/dyn/aiplatform_v1.html b/docs/dyn/aiplatform_v1.html
index ab37fba9b8..3e7e70f1c4 100644
--- a/docs/dyn/aiplatform_v1.html
+++ b/docs/dyn/aiplatform_v1.html
@@ -84,6 +84,11 @@ Instance Methods
Returns the endpoints Resource.
+
+ media()
+
Returns the media Resource.
+ diff --git a/docs/dyn/aiplatform_v1.media.html b/docs/dyn/aiplatform_v1.media.html new file mode 100644 index 0000000000..029ba8a16a --- /dev/null +++ b/docs/dyn/aiplatform_v1.media.html @@ -0,0 +1,252 @@ + + + +
+ close()
Close httplib2 connections.
+
+ upload(parent, body=None, media_body=None, media_mime_type=None, x__xgafv=None)
Upload a file into a RagCorpus.
+close()
+ Close httplib2 connections.+
upload(parent, body=None, media_body=None, media_mime_type=None, x__xgafv=None)
+ Upload a file into a RagCorpus. + +Args: + parent: string, Required. The name of the RagCorpus resource into which to upload the file. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for VertexRagDataService.UploadRagFile. + "ragFile": { # A RagFile contains user data for chunking, embedding and indexing. # Required. The RagFile to upload. + "createTime": "A String", # Output only. Timestamp when this RagFile was created. + "description": "A String", # Optional. The description of the RagFile. + "directUploadSource": { # The input content is encapsulated and uploaded in the request. # Output only. The RagFile is encapsulated and uploaded in the UploadRagFile request. + }, + "displayName": "A String", # Required. The display name of the RagFile. The name can be up to 128 characters long and can consist of any UTF-8 characters. + "fileStatus": { # RagFile status. # Output only. State of the RagFile. + "errorStatus": "A String", # Output only. Only when the `state` field is ERROR. + "state": "A String", # Output only. RagFile state. + }, + "gcsSource": { # The Google Cloud Storage location for the input content. # Output only. Google Cloud Storage location of the RagFile. It does not support wildcards in the Cloud Storage uri for now. + "uris": [ # Required. Google Cloud Storage URI(-s) to the input file(s). May contain wildcards. For more information on wildcards, see https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames. + "A String", + ], + }, + "googleDriveSource": { # The Google Drive location for the input content. # Output only. Google Drive location. Supports importing individual files as well as Google Drive folders. + "resourceIds": [ # Required. Google Drive resource IDs. + { # The type and ID of the Google Drive resource. + "resourceId": "A String", # Required. The ID of the Google Drive resource. + "resourceType": "A String", # Required. The type of the Google Drive resource. + }, + ], + }, + "jiraSource": { # The Jira source for the ImportRagFilesRequest. # The RagFile is imported from a Jira query. + "jiraQueries": [ # Required. The Jira queries. + { # JiraQueries contains the Jira queries and corresponding authentication. + "apiKeyConfig": { # The API secret. # Required. The SecretManager secret version resource name (e.g. projects/{project}/secrets/{secret}/versions/{version}) storing the Jira API key. See [Manage API tokens for your Atlassian account](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/). + "apiKeySecretVersion": "A String", # Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version} + }, + "customQueries": [ # A list of custom Jira queries to import. For information about JQL (Jira Query Language), see https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/ + "A String", + ], + "email": "A String", # Required. The Jira email address. + "projects": [ # A list of Jira projects to import in their entirety. + "A String", + ], + "serverUri": "A String", # Required. The Jira server URI. + }, + ], + }, + "name": "A String", # Output only. The resource name of the RagFile. + "slackSource": { # The Slack source for the ImportRagFilesRequest. # The RagFile is imported from a Slack channel. + "channels": [ # Required. The Slack channels. + { # SlackChannels contains the Slack channels and corresponding access token. + "apiKeyConfig": { # The API secret. # Required. The SecretManager secret version resource name (e.g. projects/{project}/secrets/{secret}/versions/{version}) storing the Slack channel access token that has access to the slack channel IDs. See: https://api.slack.com/tutorials/tracks/getting-a-token. + "apiKeySecretVersion": "A String", # Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version} + }, + "channels": [ # Required. The Slack channel IDs. + { # SlackChannel contains the Slack channel ID and the time range to import. + "channelId": "A String", # Required. The Slack channel ID. + "endTime": "A String", # Optional. The ending timestamp for messages to import. + "startTime": "A String", # Optional. The starting timestamp for messages to import. + }, + ], + }, + ], + }, + "updateTime": "A String", # Output only. Timestamp when this RagFile was last updated. + }, + "uploadRagFileConfig": { # Config for uploading RagFile. # Required. The config for the RagFiles to be uploaded into the RagCorpus. VertexRagDataService.UploadRagFile. + "ragFileTransformationConfig": { # Specifies the transformation config for RagFiles. # Specifies the transformation config for RagFiles. + "ragFileChunkingConfig": { # Specifies the size and overlap of chunks for RagFiles. # Specifies the chunking config for RagFiles. + "fixedLengthChunking": { # Specifies the fixed length chunking config. # Specifies the fixed length chunking config. + "chunkOverlap": 42, # The overlap between chunks. + "chunkSize": 42, # The size of the chunks. + }, + }, + }, + }, +} + + media_body: string, The filename of the media request body, or an instance of a MediaUpload object. + media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response message for VertexRagDataService.UploadRagFile. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error that occurred while processing the RagFile. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "ragFile": { # A RagFile contains user data for chunking, embedding and indexing. # The RagFile that had been uploaded into the RagCorpus. + "createTime": "A String", # Output only. Timestamp when this RagFile was created. + "description": "A String", # Optional. The description of the RagFile. + "directUploadSource": { # The input content is encapsulated and uploaded in the request. # Output only. The RagFile is encapsulated and uploaded in the UploadRagFile request. + }, + "displayName": "A String", # Required. The display name of the RagFile. The name can be up to 128 characters long and can consist of any UTF-8 characters. + "fileStatus": { # RagFile status. # Output only. State of the RagFile. + "errorStatus": "A String", # Output only. Only when the `state` field is ERROR. + "state": "A String", # Output only. RagFile state. + }, + "gcsSource": { # The Google Cloud Storage location for the input content. # Output only. Google Cloud Storage location of the RagFile. It does not support wildcards in the Cloud Storage uri for now. + "uris": [ # Required. Google Cloud Storage URI(-s) to the input file(s). May contain wildcards. For more information on wildcards, see https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames. + "A String", + ], + }, + "googleDriveSource": { # The Google Drive location for the input content. # Output only. Google Drive location. Supports importing individual files as well as Google Drive folders. + "resourceIds": [ # Required. Google Drive resource IDs. + { # The type and ID of the Google Drive resource. + "resourceId": "A String", # Required. The ID of the Google Drive resource. + "resourceType": "A String", # Required. The type of the Google Drive resource. + }, + ], + }, + "jiraSource": { # The Jira source for the ImportRagFilesRequest. # The RagFile is imported from a Jira query. + "jiraQueries": [ # Required. The Jira queries. + { # JiraQueries contains the Jira queries and corresponding authentication. + "apiKeyConfig": { # The API secret. # Required. The SecretManager secret version resource name (e.g. projects/{project}/secrets/{secret}/versions/{version}) storing the Jira API key. See [Manage API tokens for your Atlassian account](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/). + "apiKeySecretVersion": "A String", # Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version} + }, + "customQueries": [ # A list of custom Jira queries to import. For information about JQL (Jira Query Language), see https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/ + "A String", + ], + "email": "A String", # Required. The Jira email address. + "projects": [ # A list of Jira projects to import in their entirety. + "A String", + ], + "serverUri": "A String", # Required. The Jira server URI. + }, + ], + }, + "name": "A String", # Output only. The resource name of the RagFile. + "slackSource": { # The Slack source for the ImportRagFilesRequest. # The RagFile is imported from a Slack channel. + "channels": [ # Required. The Slack channels. + { # SlackChannels contains the Slack channels and corresponding access token. + "apiKeyConfig": { # The API secret. # Required. The SecretManager secret version resource name (e.g. projects/{project}/secrets/{secret}/versions/{version}) storing the Slack channel access token that has access to the slack channel IDs. See: https://api.slack.com/tutorials/tracks/getting-a-token. + "apiKeySecretVersion": "A String", # Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version} + }, + "channels": [ # Required. The Slack channel IDs. + { # SlackChannel contains the Slack channel ID and the time range to import. + "channelId": "A String", # Required. The Slack channel ID. + "endTime": "A String", # Optional. The ending timestamp for messages to import. + "startTime": "A String", # Optional. The starting timestamp for messages to import. + }, + ], + }, + ], + }, + "updateTime": "A String", # Output only. Timestamp when this RagFile was last updated. + }, +}+
+ close()
Close httplib2 connections.
+
+ create(parent, body=None, x__xgafv=None)
Creates cached content, this call will initialize the cached content in the data storage, and users need to pay for the cache data storage.
+ +Deletes cached content
+ +Gets cached content configurations
+
+ list(parent, pageSize=None, pageToken=None, x__xgafv=None)
Lists cached contents in a project
+ +Retrieves the next page of results.
+
+ patch(name, body=None, updateMask=None, x__xgafv=None)
Updates cached content configurations
+close()
+ Close httplib2 connections.+
create(parent, body=None, x__xgafv=None)
+ Creates cached content, this call will initialize the cached content in the data storage, and users need to pay for the cache data storage. + +Args: + parent: string, Required. The parent resource where the cached content will be created (required) + body: object, The request body. + The object takes the form of: + +{ # A resource used in LLM queries for users to explicitly specify what to cache and how to cache. + "contents": [ # Optional. Input only. Immutable. The content to cache + { # The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. + "parts": [ # Required. Ordered `Parts` that constitute a single message. Parts may have different IANA MIME types. + { # A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes. + "fileData": { # URI based data. # Optional. URI based data. + "fileUri": "A String", # Required. URI. + "mimeType": "A String", # Required. The IANA standard MIME type of the source data. + }, + "functionCall": { # A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing the parameters and their values. # Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. + "args": { # Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. + "a_key": "", # Properties of the object. + }, + "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name]. + }, + "functionResponse": { # The result output from a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a [FunctionCall] made based on model prediction. # Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. + "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. + "response": { # Required. The function response in JSON object format. Use "output" key to specify function output and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as function output. + "a_key": "", # Properties of the object. + }, + }, + "inlineData": { # Content blob. It's preferred to send as text directly rather than raw bytes. # Optional. Inlined bytes data. + "data": "A String", # Required. Raw bytes. + "mimeType": "A String", # Required. The IANA standard MIME type of the source data. + }, + "text": "A String", # Optional. Text part (can be code). + "videoMetadata": { # Metadata describes the input video content. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data. + "endOffset": "A String", # Optional. The end offset of the video. + "startOffset": "A String", # Optional. The start offset of the video. + }, + }, + ], + "role": "A String", # Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset. + }, + ], + "createTime": "A String", # Output only. Creatation time of the cache entry. + "displayName": "A String", # Optional. Immutable. The user-generated meaningful display name of the cached content. + "expireTime": "A String", # Timestamp of when this resource is considered expired. This is *always* provided on output, regardless of what was sent on input. + "model": "A String", # Immutable. The name of the publisher model to use for cached content. Format: projects/{project}/locations/{location}/publishers/{publisher}/models/{model} + "name": "A String", # Immutable. Identifier. The server-generated resource name of the cached content Format: projects/{project}/locations/{location}/cachedContents/{cached_content} + "systemInstruction": { # The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. # Optional. Input only. Immutable. Developer set system instruction. Currently, text only + "parts": [ # Required. Ordered `Parts` that constitute a single message. Parts may have different IANA MIME types. + { # A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes. + "fileData": { # URI based data. # Optional. URI based data. + "fileUri": "A String", # Required. URI. + "mimeType": "A String", # Required. The IANA standard MIME type of the source data. + }, + "functionCall": { # A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing the parameters and their values. # Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. + "args": { # Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. + "a_key": "", # Properties of the object. + }, + "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name]. + }, + "functionResponse": { # The result output from a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a [FunctionCall] made based on model prediction. # Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. + "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. + "response": { # Required. The function response in JSON object format. Use "output" key to specify function output and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as function output. + "a_key": "", # Properties of the object. + }, + }, + "inlineData": { # Content blob. It's preferred to send as text directly rather than raw bytes. # Optional. Inlined bytes data. + "data": "A String", # Required. Raw bytes. + "mimeType": "A String", # Required. The IANA standard MIME type of the source data. + }, + "text": "A String", # Optional. Text part (can be code). + "videoMetadata": { # Metadata describes the input video content. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data. + "endOffset": "A String", # Optional. The end offset of the video. + "startOffset": "A String", # Optional. The start offset of the video. + }, + }, + ], + "role": "A String", # Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset. + }, + "toolConfig": { # Tool config. This config is shared for all tools provided in the request. # Optional. Input only. Immutable. Tool config. This config is shared for all tools + "functionCallingConfig": { # Function calling config. # Optional. Function calling config. + "allowedFunctionNames": [ # Optional. Function names to call. Only set when the Mode is ANY. Function names should match [FunctionDeclaration.name]. With mode set to ANY, model will predict a function call from the set of function names provided. + "A String", + ], + "mode": "A String", # Optional. Function calling mode. + }, + }, + "tools": [ # Optional. Input only. Immutable. A list of `Tools` the model may use to generate the next response + { # Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool (e.g FunctionDeclaration, Retrieval or GoogleSearchRetrieval). + "functionDeclarations": [ # Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 128 function declarations can be provided. + { # Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client. + "description": "A String", # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. + "name": "A String", # Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64. + "parameters": { # Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may be added in the future as needed. # Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1 + "anyOf": [ # Optional. The value should be validated against any (one or more) of the subschemas in the list. + # Object with schema name: GoogleCloudAiplatformV1Schema + ], + "default": "", # Optional. Default value of the data. + "description": "A String", # Optional. The description of the data. + "enum": [ # Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]} + "A String", + ], + "example": "", # Optional. Example of the object. Will only populated when the object is the root. + "format": "A String", # Optional. The format of the data. Supported formats: for NUMBER type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: "email", "byte", etc + "items": # Object with schema name: GoogleCloudAiplatformV1Schema # Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. + "maxItems": "A String", # Optional. Maximum number of the elements for Type.ARRAY. + "maxLength": "A String", # Optional. Maximum length of the Type.STRING + "maxProperties": "A String", # Optional. Maximum number of the properties for Type.OBJECT. + "maximum": 3.14, # Optional. Maximum value of the Type.INTEGER and Type.NUMBER + "minItems": "A String", # Optional. Minimum number of the elements for Type.ARRAY. + "minLength": "A String", # Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING + "minProperties": "A String", # Optional. Minimum number of the properties for Type.OBJECT. + "minimum": 3.14, # Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER + "nullable": True or False, # Optional. Indicates if the value may be null. + "pattern": "A String", # Optional. Pattern of the Type.STRING to restrict a string to a regular expression. + "properties": { # Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. + "a_key": # Object with schema name: GoogleCloudAiplatformV1Schema + }, + "propertyOrdering": [ # Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. + "A String", + ], + "required": [ # Optional. Required properties of Type.OBJECT. + "A String", + ], + "title": "A String", # Optional. The title of the Schema. + "type": "A String", # Optional. The type of the data. + }, + "response": { # Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may be added in the future as needed. # Optional. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function. + "anyOf": [ # Optional. The value should be validated against any (one or more) of the subschemas in the list. + # Object with schema name: GoogleCloudAiplatformV1Schema + ], + "default": "", # Optional. Default value of the data. + "description": "A String", # Optional. The description of the data. + "enum": [ # Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]} + "A String", + ], + "example": "", # Optional. Example of the object. Will only populated when the object is the root. + "format": "A String", # Optional. The format of the data. Supported formats: for NUMBER type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: "email", "byte", etc + "items": # Object with schema name: GoogleCloudAiplatformV1Schema # Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. + "maxItems": "A String", # Optional. Maximum number of the elements for Type.ARRAY. + "maxLength": "A String", # Optional. Maximum length of the Type.STRING + "maxProperties": "A String", # Optional. Maximum number of the properties for Type.OBJECT. + "maximum": 3.14, # Optional. Maximum value of the Type.INTEGER and Type.NUMBER + "minItems": "A String", # Optional. Minimum number of the elements for Type.ARRAY. + "minLength": "A String", # Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING + "minProperties": "A String", # Optional. Minimum number of the properties for Type.OBJECT. + "minimum": 3.14, # Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER + "nullable": True or False, # Optional. Indicates if the value may be null. + "pattern": "A String", # Optional. Pattern of the Type.STRING to restrict a string to a regular expression. + "properties": { # Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. + "a_key": # Object with schema name: GoogleCloudAiplatformV1Schema + }, + "propertyOrdering": [ # Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. + "A String", + ], + "required": [ # Optional. Required properties of Type.OBJECT. + "A String", + ], + "title": "A String", # Optional. The title of the Schema. + "type": "A String", # Optional. The type of the data. + }, + }, + ], + "googleSearchRetrieval": { # Tool to retrieve public web data for grounding, powered by Google. # Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search. + "dynamicRetrievalConfig": { # Describes the options to customize dynamic retrieval. # Specifies the dynamic retrieval configuration for the given source. + "dynamicThreshold": 3.14, # Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used. + "mode": "A String", # The mode of the predictor to be used in dynamic retrieval. + }, + }, + "retrieval": { # Defines a retrieval tool that model can call to access external knowledge. # Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation. + "disableAttribution": True or False, # Optional. Deprecated. This option is no longer supported. + "vertexAiSearch": { # Retrieve from Vertex AI Search datastore for grounding. See https://cloud.google.com/products/agent-builder # Set to use data source powered by Vertex AI Search. + "datastore": "A String", # Required. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` + }, + "vertexRagStore": { # Retrieve from Vertex RAG Store for grounding. # Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService. + "ragResources": [ # Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support. + { # The definition of the Rag resource. + "ragCorpus": "A String", # Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + "ragFileIds": [ # Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field. + "A String", + ], + }, + ], + "ragRetrievalConfig": { # Specifies the context retrieval config. # Optional. The retrieval config for the Rag query. + "filter": { # Config for filters. # Optional. Config for filters. + "metadataFilter": "A String", # Optional. String for metadata filtering. + "vectorDistanceThreshold": 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold. + "vectorSimilarityThreshold": 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold. + }, + "topK": 42, # Optional. The number of contexts to retrieve. + }, + "similarityTopK": 42, # Optional. Number of top k results to return from the selected corpora. + "vectorDistanceThreshold": 3.14, # Optional. Only return results with vector distance smaller than the threshold. + }, + }, + }, + ], + "ttl": "A String", # Input only. The TTL for this resource. The expiration time is computed: now + TTL. + "updateTime": "A String", # Output only. When the cache entry was last updated in UTC time. + "usageMetadata": { # Metadata on the usage of the cached content. # Output only. Metadata on the usage of the cached content. + "audioDurationSeconds": 42, # Duration of audio in seconds. + "imageCount": 42, # Number of images. + "textCount": 42, # Number of text characters. + "totalTokenCount": 42, # Total number of tokens that the cached content consumes. + "videoDurationSeconds": 42, # Duration of video in seconds. + }, +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # A resource used in LLM queries for users to explicitly specify what to cache and how to cache. + "contents": [ # Optional. Input only. Immutable. The content to cache + { # The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. + "parts": [ # Required. Ordered `Parts` that constitute a single message. Parts may have different IANA MIME types. + { # A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes. + "fileData": { # URI based data. # Optional. URI based data. + "fileUri": "A String", # Required. URI. + "mimeType": "A String", # Required. The IANA standard MIME type of the source data. + }, + "functionCall": { # A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing the parameters and their values. # Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. + "args": { # Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. + "a_key": "", # Properties of the object. + }, + "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name]. + }, + "functionResponse": { # The result output from a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a [FunctionCall] made based on model prediction. # Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. + "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. + "response": { # Required. The function response in JSON object format. Use "output" key to specify function output and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as function output. + "a_key": "", # Properties of the object. + }, + }, + "inlineData": { # Content blob. It's preferred to send as text directly rather than raw bytes. # Optional. Inlined bytes data. + "data": "A String", # Required. Raw bytes. + "mimeType": "A String", # Required. The IANA standard MIME type of the source data. + }, + "text": "A String", # Optional. Text part (can be code). + "videoMetadata": { # Metadata describes the input video content. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data. + "endOffset": "A String", # Optional. The end offset of the video. + "startOffset": "A String", # Optional. The start offset of the video. + }, + }, + ], + "role": "A String", # Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset. + }, + ], + "createTime": "A String", # Output only. Creatation time of the cache entry. + "displayName": "A String", # Optional. Immutable. The user-generated meaningful display name of the cached content. + "expireTime": "A String", # Timestamp of when this resource is considered expired. This is *always* provided on output, regardless of what was sent on input. + "model": "A String", # Immutable. The name of the publisher model to use for cached content. Format: projects/{project}/locations/{location}/publishers/{publisher}/models/{model} + "name": "A String", # Immutable. Identifier. The server-generated resource name of the cached content Format: projects/{project}/locations/{location}/cachedContents/{cached_content} + "systemInstruction": { # The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. # Optional. Input only. Immutable. Developer set system instruction. Currently, text only + "parts": [ # Required. Ordered `Parts` that constitute a single message. Parts may have different IANA MIME types. + { # A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes. + "fileData": { # URI based data. # Optional. URI based data. + "fileUri": "A String", # Required. URI. + "mimeType": "A String", # Required. The IANA standard MIME type of the source data. + }, + "functionCall": { # A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing the parameters and their values. # Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. + "args": { # Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. + "a_key": "", # Properties of the object. + }, + "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name]. + }, + "functionResponse": { # The result output from a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a [FunctionCall] made based on model prediction. # Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. + "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. + "response": { # Required. The function response in JSON object format. Use "output" key to specify function output and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as function output. + "a_key": "", # Properties of the object. + }, + }, + "inlineData": { # Content blob. It's preferred to send as text directly rather than raw bytes. # Optional. Inlined bytes data. + "data": "A String", # Required. Raw bytes. + "mimeType": "A String", # Required. The IANA standard MIME type of the source data. + }, + "text": "A String", # Optional. Text part (can be code). + "videoMetadata": { # Metadata describes the input video content. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data. + "endOffset": "A String", # Optional. The end offset of the video. + "startOffset": "A String", # Optional. The start offset of the video. + }, + }, + ], + "role": "A String", # Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset. + }, + "toolConfig": { # Tool config. This config is shared for all tools provided in the request. # Optional. Input only. Immutable. Tool config. This config is shared for all tools + "functionCallingConfig": { # Function calling config. # Optional. Function calling config. + "allowedFunctionNames": [ # Optional. Function names to call. Only set when the Mode is ANY. Function names should match [FunctionDeclaration.name]. With mode set to ANY, model will predict a function call from the set of function names provided. + "A String", + ], + "mode": "A String", # Optional. Function calling mode. + }, + }, + "tools": [ # Optional. Input only. Immutable. A list of `Tools` the model may use to generate the next response + { # Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool (e.g FunctionDeclaration, Retrieval or GoogleSearchRetrieval). + "functionDeclarations": [ # Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 128 function declarations can be provided. + { # Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client. + "description": "A String", # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. + "name": "A String", # Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64. + "parameters": { # Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may be added in the future as needed. # Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1 + "anyOf": [ # Optional. The value should be validated against any (one or more) of the subschemas in the list. + # Object with schema name: GoogleCloudAiplatformV1Schema + ], + "default": "", # Optional. Default value of the data. + "description": "A String", # Optional. The description of the data. + "enum": [ # Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]} + "A String", + ], + "example": "", # Optional. Example of the object. Will only populated when the object is the root. + "format": "A String", # Optional. The format of the data. Supported formats: for NUMBER type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: "email", "byte", etc + "items": # Object with schema name: GoogleCloudAiplatformV1Schema # Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. + "maxItems": "A String", # Optional. Maximum number of the elements for Type.ARRAY. + "maxLength": "A String", # Optional. Maximum length of the Type.STRING + "maxProperties": "A String", # Optional. Maximum number of the properties for Type.OBJECT. + "maximum": 3.14, # Optional. Maximum value of the Type.INTEGER and Type.NUMBER + "minItems": "A String", # Optional. Minimum number of the elements for Type.ARRAY. + "minLength": "A String", # Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING + "minProperties": "A String", # Optional. Minimum number of the properties for Type.OBJECT. + "minimum": 3.14, # Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER + "nullable": True or False, # Optional. Indicates if the value may be null. + "pattern": "A String", # Optional. Pattern of the Type.STRING to restrict a string to a regular expression. + "properties": { # Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. + "a_key": # Object with schema name: GoogleCloudAiplatformV1Schema + }, + "propertyOrdering": [ # Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. + "A String", + ], + "required": [ # Optional. Required properties of Type.OBJECT. + "A String", + ], + "title": "A String", # Optional. The title of the Schema. + "type": "A String", # Optional. The type of the data. + }, + "response": { # Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may be added in the future as needed. # Optional. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function. + "anyOf": [ # Optional. The value should be validated against any (one or more) of the subschemas in the list. + # Object with schema name: GoogleCloudAiplatformV1Schema + ], + "default": "", # Optional. Default value of the data. + "description": "A String", # Optional. The description of the data. + "enum": [ # Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]} + "A String", + ], + "example": "", # Optional. Example of the object. Will only populated when the object is the root. + "format": "A String", # Optional. The format of the data. Supported formats: for NUMBER type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: "email", "byte", etc + "items": # Object with schema name: GoogleCloudAiplatformV1Schema # Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. + "maxItems": "A String", # Optional. Maximum number of the elements for Type.ARRAY. + "maxLength": "A String", # Optional. Maximum length of the Type.STRING + "maxProperties": "A String", # Optional. Maximum number of the properties for Type.OBJECT. + "maximum": 3.14, # Optional. Maximum value of the Type.INTEGER and Type.NUMBER + "minItems": "A String", # Optional. Minimum number of the elements for Type.ARRAY. + "minLength": "A String", # Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING + "minProperties": "A String", # Optional. Minimum number of the properties for Type.OBJECT. + "minimum": 3.14, # Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER + "nullable": True or False, # Optional. Indicates if the value may be null. + "pattern": "A String", # Optional. Pattern of the Type.STRING to restrict a string to a regular expression. + "properties": { # Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. + "a_key": # Object with schema name: GoogleCloudAiplatformV1Schema + }, + "propertyOrdering": [ # Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. + "A String", + ], + "required": [ # Optional. Required properties of Type.OBJECT. + "A String", + ], + "title": "A String", # Optional. The title of the Schema. + "type": "A String", # Optional. The type of the data. + }, + }, + ], + "googleSearchRetrieval": { # Tool to retrieve public web data for grounding, powered by Google. # Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search. + "dynamicRetrievalConfig": { # Describes the options to customize dynamic retrieval. # Specifies the dynamic retrieval configuration for the given source. + "dynamicThreshold": 3.14, # Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used. + "mode": "A String", # The mode of the predictor to be used in dynamic retrieval. + }, + }, + "retrieval": { # Defines a retrieval tool that model can call to access external knowledge. # Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation. + "disableAttribution": True or False, # Optional. Deprecated. This option is no longer supported. + "vertexAiSearch": { # Retrieve from Vertex AI Search datastore for grounding. See https://cloud.google.com/products/agent-builder # Set to use data source powered by Vertex AI Search. + "datastore": "A String", # Required. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` + }, + "vertexRagStore": { # Retrieve from Vertex RAG Store for grounding. # Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService. + "ragResources": [ # Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support. + { # The definition of the Rag resource. + "ragCorpus": "A String", # Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + "ragFileIds": [ # Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field. + "A String", + ], + }, + ], + "ragRetrievalConfig": { # Specifies the context retrieval config. # Optional. The retrieval config for the Rag query. + "filter": { # Config for filters. # Optional. Config for filters. + "metadataFilter": "A String", # Optional. String for metadata filtering. + "vectorDistanceThreshold": 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold. + "vectorSimilarityThreshold": 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold. + }, + "topK": 42, # Optional. The number of contexts to retrieve. + }, + "similarityTopK": 42, # Optional. Number of top k results to return from the selected corpora. + "vectorDistanceThreshold": 3.14, # Optional. Only return results with vector distance smaller than the threshold. + }, + }, + }, + ], + "ttl": "A String", # Input only. The TTL for this resource. The expiration time is computed: now + TTL. + "updateTime": "A String", # Output only. When the cache entry was last updated in UTC time. + "usageMetadata": { # Metadata on the usage of the cached content. # Output only. Metadata on the usage of the cached content. + "audioDurationSeconds": 42, # Duration of audio in seconds. + "imageCount": 42, # Number of images. + "textCount": 42, # Number of text characters. + "totalTokenCount": 42, # Total number of tokens that the cached content consumes. + "videoDurationSeconds": 42, # Duration of video in seconds. + }, +}+
delete(name, x__xgafv=None)
+ Deletes cached content + +Args: + name: string, Required. The resource name referring to the cached content (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } +}+
get(name, x__xgafv=None)
+ Gets cached content configurations + +Args: + name: string, Required. The resource name referring to the cached content (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # A resource used in LLM queries for users to explicitly specify what to cache and how to cache. + "contents": [ # Optional. Input only. Immutable. The content to cache + { # The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. + "parts": [ # Required. Ordered `Parts` that constitute a single message. Parts may have different IANA MIME types. + { # A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes. + "fileData": { # URI based data. # Optional. URI based data. + "fileUri": "A String", # Required. URI. + "mimeType": "A String", # Required. The IANA standard MIME type of the source data. + }, + "functionCall": { # A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing the parameters and their values. # Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. + "args": { # Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. + "a_key": "", # Properties of the object. + }, + "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name]. + }, + "functionResponse": { # The result output from a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a [FunctionCall] made based on model prediction. # Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. + "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. + "response": { # Required. The function response in JSON object format. Use "output" key to specify function output and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as function output. + "a_key": "", # Properties of the object. + }, + }, + "inlineData": { # Content blob. It's preferred to send as text directly rather than raw bytes. # Optional. Inlined bytes data. + "data": "A String", # Required. Raw bytes. + "mimeType": "A String", # Required. The IANA standard MIME type of the source data. + }, + "text": "A String", # Optional. Text part (can be code). + "videoMetadata": { # Metadata describes the input video content. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data. + "endOffset": "A String", # Optional. The end offset of the video. + "startOffset": "A String", # Optional. The start offset of the video. + }, + }, + ], + "role": "A String", # Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset. + }, + ], + "createTime": "A String", # Output only. Creatation time of the cache entry. + "displayName": "A String", # Optional. Immutable. The user-generated meaningful display name of the cached content. + "expireTime": "A String", # Timestamp of when this resource is considered expired. This is *always* provided on output, regardless of what was sent on input. + "model": "A String", # Immutable. The name of the publisher model to use for cached content. Format: projects/{project}/locations/{location}/publishers/{publisher}/models/{model} + "name": "A String", # Immutable. Identifier. The server-generated resource name of the cached content Format: projects/{project}/locations/{location}/cachedContents/{cached_content} + "systemInstruction": { # The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. # Optional. Input only. Immutable. Developer set system instruction. Currently, text only + "parts": [ # Required. Ordered `Parts` that constitute a single message. Parts may have different IANA MIME types. + { # A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes. + "fileData": { # URI based data. # Optional. URI based data. + "fileUri": "A String", # Required. URI. + "mimeType": "A String", # Required. The IANA standard MIME type of the source data. + }, + "functionCall": { # A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing the parameters and their values. # Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. + "args": { # Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. + "a_key": "", # Properties of the object. + }, + "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name]. + }, + "functionResponse": { # The result output from a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a [FunctionCall] made based on model prediction. # Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. + "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. + "response": { # Required. The function response in JSON object format. Use "output" key to specify function output and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as function output. + "a_key": "", # Properties of the object. + }, + }, + "inlineData": { # Content blob. It's preferred to send as text directly rather than raw bytes. # Optional. Inlined bytes data. + "data": "A String", # Required. Raw bytes. + "mimeType": "A String", # Required. The IANA standard MIME type of the source data. + }, + "text": "A String", # Optional. Text part (can be code). + "videoMetadata": { # Metadata describes the input video content. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data. + "endOffset": "A String", # Optional. The end offset of the video. + "startOffset": "A String", # Optional. The start offset of the video. + }, + }, + ], + "role": "A String", # Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset. + }, + "toolConfig": { # Tool config. This config is shared for all tools provided in the request. # Optional. Input only. Immutable. Tool config. This config is shared for all tools + "functionCallingConfig": { # Function calling config. # Optional. Function calling config. + "allowedFunctionNames": [ # Optional. Function names to call. Only set when the Mode is ANY. Function names should match [FunctionDeclaration.name]. With mode set to ANY, model will predict a function call from the set of function names provided. + "A String", + ], + "mode": "A String", # Optional. Function calling mode. + }, + }, + "tools": [ # Optional. Input only. Immutable. A list of `Tools` the model may use to generate the next response + { # Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool (e.g FunctionDeclaration, Retrieval or GoogleSearchRetrieval). + "functionDeclarations": [ # Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 128 function declarations can be provided. + { # Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client. + "description": "A String", # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. + "name": "A String", # Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64. + "parameters": { # Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may be added in the future as needed. # Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1 + "anyOf": [ # Optional. The value should be validated against any (one or more) of the subschemas in the list. + # Object with schema name: GoogleCloudAiplatformV1Schema + ], + "default": "", # Optional. Default value of the data. + "description": "A String", # Optional. The description of the data. + "enum": [ # Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]} + "A String", + ], + "example": "", # Optional. Example of the object. Will only populated when the object is the root. + "format": "A String", # Optional. The format of the data. Supported formats: for NUMBER type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: "email", "byte", etc + "items": # Object with schema name: GoogleCloudAiplatformV1Schema # Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. + "maxItems": "A String", # Optional. Maximum number of the elements for Type.ARRAY. + "maxLength": "A String", # Optional. Maximum length of the Type.STRING + "maxProperties": "A String", # Optional. Maximum number of the properties for Type.OBJECT. + "maximum": 3.14, # Optional. Maximum value of the Type.INTEGER and Type.NUMBER + "minItems": "A String", # Optional. Minimum number of the elements for Type.ARRAY. + "minLength": "A String", # Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING + "minProperties": "A String", # Optional. Minimum number of the properties for Type.OBJECT. + "minimum": 3.14, # Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER + "nullable": True or False, # Optional. Indicates if the value may be null. + "pattern": "A String", # Optional. Pattern of the Type.STRING to restrict a string to a regular expression. + "properties": { # Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. + "a_key": # Object with schema name: GoogleCloudAiplatformV1Schema + }, + "propertyOrdering": [ # Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. + "A String", + ], + "required": [ # Optional. Required properties of Type.OBJECT. + "A String", + ], + "title": "A String", # Optional. The title of the Schema. + "type": "A String", # Optional. The type of the data. + }, + "response": { # Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may be added in the future as needed. # Optional. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function. + "anyOf": [ # Optional. The value should be validated against any (one or more) of the subschemas in the list. + # Object with schema name: GoogleCloudAiplatformV1Schema + ], + "default": "", # Optional. Default value of the data. + "description": "A String", # Optional. The description of the data. + "enum": [ # Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]} + "A String", + ], + "example": "", # Optional. Example of the object. Will only populated when the object is the root. + "format": "A String", # Optional. The format of the data. Supported formats: for NUMBER type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: "email", "byte", etc + "items": # Object with schema name: GoogleCloudAiplatformV1Schema # Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. + "maxItems": "A String", # Optional. Maximum number of the elements for Type.ARRAY. + "maxLength": "A String", # Optional. Maximum length of the Type.STRING + "maxProperties": "A String", # Optional. Maximum number of the properties for Type.OBJECT. + "maximum": 3.14, # Optional. Maximum value of the Type.INTEGER and Type.NUMBER + "minItems": "A String", # Optional. Minimum number of the elements for Type.ARRAY. + "minLength": "A String", # Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING + "minProperties": "A String", # Optional. Minimum number of the properties for Type.OBJECT. + "minimum": 3.14, # Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER + "nullable": True or False, # Optional. Indicates if the value may be null. + "pattern": "A String", # Optional. Pattern of the Type.STRING to restrict a string to a regular expression. + "properties": { # Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. + "a_key": # Object with schema name: GoogleCloudAiplatformV1Schema + }, + "propertyOrdering": [ # Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. + "A String", + ], + "required": [ # Optional. Required properties of Type.OBJECT. + "A String", + ], + "title": "A String", # Optional. The title of the Schema. + "type": "A String", # Optional. The type of the data. + }, + }, + ], + "googleSearchRetrieval": { # Tool to retrieve public web data for grounding, powered by Google. # Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search. + "dynamicRetrievalConfig": { # Describes the options to customize dynamic retrieval. # Specifies the dynamic retrieval configuration for the given source. + "dynamicThreshold": 3.14, # Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used. + "mode": "A String", # The mode of the predictor to be used in dynamic retrieval. + }, + }, + "retrieval": { # Defines a retrieval tool that model can call to access external knowledge. # Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation. + "disableAttribution": True or False, # Optional. Deprecated. This option is no longer supported. + "vertexAiSearch": { # Retrieve from Vertex AI Search datastore for grounding. See https://cloud.google.com/products/agent-builder # Set to use data source powered by Vertex AI Search. + "datastore": "A String", # Required. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` + }, + "vertexRagStore": { # Retrieve from Vertex RAG Store for grounding. # Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService. + "ragResources": [ # Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support. + { # The definition of the Rag resource. + "ragCorpus": "A String", # Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + "ragFileIds": [ # Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field. + "A String", + ], + }, + ], + "ragRetrievalConfig": { # Specifies the context retrieval config. # Optional. The retrieval config for the Rag query. + "filter": { # Config for filters. # Optional. Config for filters. + "metadataFilter": "A String", # Optional. String for metadata filtering. + "vectorDistanceThreshold": 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold. + "vectorSimilarityThreshold": 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold. + }, + "topK": 42, # Optional. The number of contexts to retrieve. + }, + "similarityTopK": 42, # Optional. Number of top k results to return from the selected corpora. + "vectorDistanceThreshold": 3.14, # Optional. Only return results with vector distance smaller than the threshold. + }, + }, + }, + ], + "ttl": "A String", # Input only. The TTL for this resource. The expiration time is computed: now + TTL. + "updateTime": "A String", # Output only. When the cache entry was last updated in UTC time. + "usageMetadata": { # Metadata on the usage of the cached content. # Output only. Metadata on the usage of the cached content. + "audioDurationSeconds": 42, # Duration of audio in seconds. + "imageCount": 42, # Number of images. + "textCount": 42, # Number of text characters. + "totalTokenCount": 42, # Total number of tokens that the cached content consumes. + "videoDurationSeconds": 42, # Duration of video in seconds. + }, +}+
list(parent, pageSize=None, pageToken=None, x__xgafv=None)
+ Lists cached contents in a project + +Args: + parent: string, Required. The parent, which owns this collection of cached contents. (required) + pageSize: integer, Optional. The maximum number of cached contents to return. The service may return fewer than this value. If unspecified, some default (under maximum) number of items will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + pageToken: string, Optional. A page token, received from a previous `ListCachedContents` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListCachedContents` must match the call that provided the page token. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response with a list of CachedContents. + "cachedContents": [ # List of cached contents. + { # A resource used in LLM queries for users to explicitly specify what to cache and how to cache. + "contents": [ # Optional. Input only. Immutable. The content to cache + { # The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. + "parts": [ # Required. Ordered `Parts` that constitute a single message. Parts may have different IANA MIME types. + { # A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes. + "fileData": { # URI based data. # Optional. URI based data. + "fileUri": "A String", # Required. URI. + "mimeType": "A String", # Required. The IANA standard MIME type of the source data. + }, + "functionCall": { # A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing the parameters and their values. # Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. + "args": { # Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. + "a_key": "", # Properties of the object. + }, + "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name]. + }, + "functionResponse": { # The result output from a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a [FunctionCall] made based on model prediction. # Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. + "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. + "response": { # Required. The function response in JSON object format. Use "output" key to specify function output and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as function output. + "a_key": "", # Properties of the object. + }, + }, + "inlineData": { # Content blob. It's preferred to send as text directly rather than raw bytes. # Optional. Inlined bytes data. + "data": "A String", # Required. Raw bytes. + "mimeType": "A String", # Required. The IANA standard MIME type of the source data. + }, + "text": "A String", # Optional. Text part (can be code). + "videoMetadata": { # Metadata describes the input video content. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data. + "endOffset": "A String", # Optional. The end offset of the video. + "startOffset": "A String", # Optional. The start offset of the video. + }, + }, + ], + "role": "A String", # Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset. + }, + ], + "createTime": "A String", # Output only. Creatation time of the cache entry. + "displayName": "A String", # Optional. Immutable. The user-generated meaningful display name of the cached content. + "expireTime": "A String", # Timestamp of when this resource is considered expired. This is *always* provided on output, regardless of what was sent on input. + "model": "A String", # Immutable. The name of the publisher model to use for cached content. Format: projects/{project}/locations/{location}/publishers/{publisher}/models/{model} + "name": "A String", # Immutable. Identifier. The server-generated resource name of the cached content Format: projects/{project}/locations/{location}/cachedContents/{cached_content} + "systemInstruction": { # The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. # Optional. Input only. Immutable. Developer set system instruction. Currently, text only + "parts": [ # Required. Ordered `Parts` that constitute a single message. Parts may have different IANA MIME types. + { # A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes. + "fileData": { # URI based data. # Optional. URI based data. + "fileUri": "A String", # Required. URI. + "mimeType": "A String", # Required. The IANA standard MIME type of the source data. + }, + "functionCall": { # A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing the parameters and their values. # Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. + "args": { # Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. + "a_key": "", # Properties of the object. + }, + "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name]. + }, + "functionResponse": { # The result output from a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a [FunctionCall] made based on model prediction. # Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. + "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. + "response": { # Required. The function response in JSON object format. Use "output" key to specify function output and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as function output. + "a_key": "", # Properties of the object. + }, + }, + "inlineData": { # Content blob. It's preferred to send as text directly rather than raw bytes. # Optional. Inlined bytes data. + "data": "A String", # Required. Raw bytes. + "mimeType": "A String", # Required. The IANA standard MIME type of the source data. + }, + "text": "A String", # Optional. Text part (can be code). + "videoMetadata": { # Metadata describes the input video content. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data. + "endOffset": "A String", # Optional. The end offset of the video. + "startOffset": "A String", # Optional. The start offset of the video. + }, + }, + ], + "role": "A String", # Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset. + }, + "toolConfig": { # Tool config. This config is shared for all tools provided in the request. # Optional. Input only. Immutable. Tool config. This config is shared for all tools + "functionCallingConfig": { # Function calling config. # Optional. Function calling config. + "allowedFunctionNames": [ # Optional. Function names to call. Only set when the Mode is ANY. Function names should match [FunctionDeclaration.name]. With mode set to ANY, model will predict a function call from the set of function names provided. + "A String", + ], + "mode": "A String", # Optional. Function calling mode. + }, + }, + "tools": [ # Optional. Input only. Immutable. A list of `Tools` the model may use to generate the next response + { # Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool (e.g FunctionDeclaration, Retrieval or GoogleSearchRetrieval). + "functionDeclarations": [ # Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 128 function declarations can be provided. + { # Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client. + "description": "A String", # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. + "name": "A String", # Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64. + "parameters": { # Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may be added in the future as needed. # Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1 + "anyOf": [ # Optional. The value should be validated against any (one or more) of the subschemas in the list. + # Object with schema name: GoogleCloudAiplatformV1Schema + ], + "default": "", # Optional. Default value of the data. + "description": "A String", # Optional. The description of the data. + "enum": [ # Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]} + "A String", + ], + "example": "", # Optional. Example of the object. Will only populated when the object is the root. + "format": "A String", # Optional. The format of the data. Supported formats: for NUMBER type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: "email", "byte", etc + "items": # Object with schema name: GoogleCloudAiplatformV1Schema # Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. + "maxItems": "A String", # Optional. Maximum number of the elements for Type.ARRAY. + "maxLength": "A String", # Optional. Maximum length of the Type.STRING + "maxProperties": "A String", # Optional. Maximum number of the properties for Type.OBJECT. + "maximum": 3.14, # Optional. Maximum value of the Type.INTEGER and Type.NUMBER + "minItems": "A String", # Optional. Minimum number of the elements for Type.ARRAY. + "minLength": "A String", # Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING + "minProperties": "A String", # Optional. Minimum number of the properties for Type.OBJECT. + "minimum": 3.14, # Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER + "nullable": True or False, # Optional. Indicates if the value may be null. + "pattern": "A String", # Optional. Pattern of the Type.STRING to restrict a string to a regular expression. + "properties": { # Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. + "a_key": # Object with schema name: GoogleCloudAiplatformV1Schema + }, + "propertyOrdering": [ # Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. + "A String", + ], + "required": [ # Optional. Required properties of Type.OBJECT. + "A String", + ], + "title": "A String", # Optional. The title of the Schema. + "type": "A String", # Optional. The type of the data. + }, + "response": { # Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may be added in the future as needed. # Optional. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function. + "anyOf": [ # Optional. The value should be validated against any (one or more) of the subschemas in the list. + # Object with schema name: GoogleCloudAiplatformV1Schema + ], + "default": "", # Optional. Default value of the data. + "description": "A String", # Optional. The description of the data. + "enum": [ # Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]} + "A String", + ], + "example": "", # Optional. Example of the object. Will only populated when the object is the root. + "format": "A String", # Optional. The format of the data. Supported formats: for NUMBER type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: "email", "byte", etc + "items": # Object with schema name: GoogleCloudAiplatformV1Schema # Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. + "maxItems": "A String", # Optional. Maximum number of the elements for Type.ARRAY. + "maxLength": "A String", # Optional. Maximum length of the Type.STRING + "maxProperties": "A String", # Optional. Maximum number of the properties for Type.OBJECT. + "maximum": 3.14, # Optional. Maximum value of the Type.INTEGER and Type.NUMBER + "minItems": "A String", # Optional. Minimum number of the elements for Type.ARRAY. + "minLength": "A String", # Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING + "minProperties": "A String", # Optional. Minimum number of the properties for Type.OBJECT. + "minimum": 3.14, # Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER + "nullable": True or False, # Optional. Indicates if the value may be null. + "pattern": "A String", # Optional. Pattern of the Type.STRING to restrict a string to a regular expression. + "properties": { # Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. + "a_key": # Object with schema name: GoogleCloudAiplatformV1Schema + }, + "propertyOrdering": [ # Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. + "A String", + ], + "required": [ # Optional. Required properties of Type.OBJECT. + "A String", + ], + "title": "A String", # Optional. The title of the Schema. + "type": "A String", # Optional. The type of the data. + }, + }, + ], + "googleSearchRetrieval": { # Tool to retrieve public web data for grounding, powered by Google. # Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search. + "dynamicRetrievalConfig": { # Describes the options to customize dynamic retrieval. # Specifies the dynamic retrieval configuration for the given source. + "dynamicThreshold": 3.14, # Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used. + "mode": "A String", # The mode of the predictor to be used in dynamic retrieval. + }, + }, + "retrieval": { # Defines a retrieval tool that model can call to access external knowledge. # Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation. + "disableAttribution": True or False, # Optional. Deprecated. This option is no longer supported. + "vertexAiSearch": { # Retrieve from Vertex AI Search datastore for grounding. See https://cloud.google.com/products/agent-builder # Set to use data source powered by Vertex AI Search. + "datastore": "A String", # Required. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` + }, + "vertexRagStore": { # Retrieve from Vertex RAG Store for grounding. # Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService. + "ragResources": [ # Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support. + { # The definition of the Rag resource. + "ragCorpus": "A String", # Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + "ragFileIds": [ # Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field. + "A String", + ], + }, + ], + "ragRetrievalConfig": { # Specifies the context retrieval config. # Optional. The retrieval config for the Rag query. + "filter": { # Config for filters. # Optional. Config for filters. + "metadataFilter": "A String", # Optional. String for metadata filtering. + "vectorDistanceThreshold": 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold. + "vectorSimilarityThreshold": 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold. + }, + "topK": 42, # Optional. The number of contexts to retrieve. + }, + "similarityTopK": 42, # Optional. Number of top k results to return from the selected corpora. + "vectorDistanceThreshold": 3.14, # Optional. Only return results with vector distance smaller than the threshold. + }, + }, + }, + ], + "ttl": "A String", # Input only. The TTL for this resource. The expiration time is computed: now + TTL. + "updateTime": "A String", # Output only. When the cache entry was last updated in UTC time. + "usageMetadata": { # Metadata on the usage of the cached content. # Output only. Metadata on the usage of the cached content. + "audioDurationSeconds": 42, # Duration of audio in seconds. + "imageCount": 42, # Number of images. + "textCount": 42, # Number of text characters. + "totalTokenCount": 42, # Total number of tokens that the cached content consumes. + "videoDurationSeconds": 42, # Duration of video in seconds. + }, + }, + ], + "nextPageToken": "A String", # A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. +}+
list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
patch(name, body=None, updateMask=None, x__xgafv=None)
+ Updates cached content configurations + +Args: + name: string, Immutable. Identifier. The server-generated resource name of the cached content Format: projects/{project}/locations/{location}/cachedContents/{cached_content} (required) + body: object, The request body. + The object takes the form of: + +{ # A resource used in LLM queries for users to explicitly specify what to cache and how to cache. + "contents": [ # Optional. Input only. Immutable. The content to cache + { # The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. + "parts": [ # Required. Ordered `Parts` that constitute a single message. Parts may have different IANA MIME types. + { # A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes. + "fileData": { # URI based data. # Optional. URI based data. + "fileUri": "A String", # Required. URI. + "mimeType": "A String", # Required. The IANA standard MIME type of the source data. + }, + "functionCall": { # A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing the parameters and their values. # Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. + "args": { # Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. + "a_key": "", # Properties of the object. + }, + "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name]. + }, + "functionResponse": { # The result output from a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a [FunctionCall] made based on model prediction. # Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. + "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. + "response": { # Required. The function response in JSON object format. Use "output" key to specify function output and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as function output. + "a_key": "", # Properties of the object. + }, + }, + "inlineData": { # Content blob. It's preferred to send as text directly rather than raw bytes. # Optional. Inlined bytes data. + "data": "A String", # Required. Raw bytes. + "mimeType": "A String", # Required. The IANA standard MIME type of the source data. + }, + "text": "A String", # Optional. Text part (can be code). + "videoMetadata": { # Metadata describes the input video content. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data. + "endOffset": "A String", # Optional. The end offset of the video. + "startOffset": "A String", # Optional. The start offset of the video. + }, + }, + ], + "role": "A String", # Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset. + }, + ], + "createTime": "A String", # Output only. Creatation time of the cache entry. + "displayName": "A String", # Optional. Immutable. The user-generated meaningful display name of the cached content. + "expireTime": "A String", # Timestamp of when this resource is considered expired. This is *always* provided on output, regardless of what was sent on input. + "model": "A String", # Immutable. The name of the publisher model to use for cached content. Format: projects/{project}/locations/{location}/publishers/{publisher}/models/{model} + "name": "A String", # Immutable. Identifier. The server-generated resource name of the cached content Format: projects/{project}/locations/{location}/cachedContents/{cached_content} + "systemInstruction": { # The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. # Optional. Input only. Immutable. Developer set system instruction. Currently, text only + "parts": [ # Required. Ordered `Parts` that constitute a single message. Parts may have different IANA MIME types. + { # A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes. + "fileData": { # URI based data. # Optional. URI based data. + "fileUri": "A String", # Required. URI. + "mimeType": "A String", # Required. The IANA standard MIME type of the source data. + }, + "functionCall": { # A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing the parameters and their values. # Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. + "args": { # Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. + "a_key": "", # Properties of the object. + }, + "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name]. + }, + "functionResponse": { # The result output from a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a [FunctionCall] made based on model prediction. # Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. + "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. + "response": { # Required. The function response in JSON object format. Use "output" key to specify function output and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as function output. + "a_key": "", # Properties of the object. + }, + }, + "inlineData": { # Content blob. It's preferred to send as text directly rather than raw bytes. # Optional. Inlined bytes data. + "data": "A String", # Required. Raw bytes. + "mimeType": "A String", # Required. The IANA standard MIME type of the source data. + }, + "text": "A String", # Optional. Text part (can be code). + "videoMetadata": { # Metadata describes the input video content. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data. + "endOffset": "A String", # Optional. The end offset of the video. + "startOffset": "A String", # Optional. The start offset of the video. + }, + }, + ], + "role": "A String", # Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset. + }, + "toolConfig": { # Tool config. This config is shared for all tools provided in the request. # Optional. Input only. Immutable. Tool config. This config is shared for all tools + "functionCallingConfig": { # Function calling config. # Optional. Function calling config. + "allowedFunctionNames": [ # Optional. Function names to call. Only set when the Mode is ANY. Function names should match [FunctionDeclaration.name]. With mode set to ANY, model will predict a function call from the set of function names provided. + "A String", + ], + "mode": "A String", # Optional. Function calling mode. + }, + }, + "tools": [ # Optional. Input only. Immutable. A list of `Tools` the model may use to generate the next response + { # Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool (e.g FunctionDeclaration, Retrieval or GoogleSearchRetrieval). + "functionDeclarations": [ # Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 128 function declarations can be provided. + { # Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client. + "description": "A String", # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. + "name": "A String", # Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64. + "parameters": { # Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may be added in the future as needed. # Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1 + "anyOf": [ # Optional. The value should be validated against any (one or more) of the subschemas in the list. + # Object with schema name: GoogleCloudAiplatformV1Schema + ], + "default": "", # Optional. Default value of the data. + "description": "A String", # Optional. The description of the data. + "enum": [ # Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]} + "A String", + ], + "example": "", # Optional. Example of the object. Will only populated when the object is the root. + "format": "A String", # Optional. The format of the data. Supported formats: for NUMBER type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: "email", "byte", etc + "items": # Object with schema name: GoogleCloudAiplatformV1Schema # Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. + "maxItems": "A String", # Optional. Maximum number of the elements for Type.ARRAY. + "maxLength": "A String", # Optional. Maximum length of the Type.STRING + "maxProperties": "A String", # Optional. Maximum number of the properties for Type.OBJECT. + "maximum": 3.14, # Optional. Maximum value of the Type.INTEGER and Type.NUMBER + "minItems": "A String", # Optional. Minimum number of the elements for Type.ARRAY. + "minLength": "A String", # Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING + "minProperties": "A String", # Optional. Minimum number of the properties for Type.OBJECT. + "minimum": 3.14, # Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER + "nullable": True or False, # Optional. Indicates if the value may be null. + "pattern": "A String", # Optional. Pattern of the Type.STRING to restrict a string to a regular expression. + "properties": { # Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. + "a_key": # Object with schema name: GoogleCloudAiplatformV1Schema + }, + "propertyOrdering": [ # Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. + "A String", + ], + "required": [ # Optional. Required properties of Type.OBJECT. + "A String", + ], + "title": "A String", # Optional. The title of the Schema. + "type": "A String", # Optional. The type of the data. + }, + "response": { # Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may be added in the future as needed. # Optional. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function. + "anyOf": [ # Optional. The value should be validated against any (one or more) of the subschemas in the list. + # Object with schema name: GoogleCloudAiplatformV1Schema + ], + "default": "", # Optional. Default value of the data. + "description": "A String", # Optional. The description of the data. + "enum": [ # Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]} + "A String", + ], + "example": "", # Optional. Example of the object. Will only populated when the object is the root. + "format": "A String", # Optional. The format of the data. Supported formats: for NUMBER type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: "email", "byte", etc + "items": # Object with schema name: GoogleCloudAiplatformV1Schema # Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. + "maxItems": "A String", # Optional. Maximum number of the elements for Type.ARRAY. + "maxLength": "A String", # Optional. Maximum length of the Type.STRING + "maxProperties": "A String", # Optional. Maximum number of the properties for Type.OBJECT. + "maximum": 3.14, # Optional. Maximum value of the Type.INTEGER and Type.NUMBER + "minItems": "A String", # Optional. Minimum number of the elements for Type.ARRAY. + "minLength": "A String", # Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING + "minProperties": "A String", # Optional. Minimum number of the properties for Type.OBJECT. + "minimum": 3.14, # Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER + "nullable": True or False, # Optional. Indicates if the value may be null. + "pattern": "A String", # Optional. Pattern of the Type.STRING to restrict a string to a regular expression. + "properties": { # Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. + "a_key": # Object with schema name: GoogleCloudAiplatformV1Schema + }, + "propertyOrdering": [ # Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. + "A String", + ], + "required": [ # Optional. Required properties of Type.OBJECT. + "A String", + ], + "title": "A String", # Optional. The title of the Schema. + "type": "A String", # Optional. The type of the data. + }, + }, + ], + "googleSearchRetrieval": { # Tool to retrieve public web data for grounding, powered by Google. # Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search. + "dynamicRetrievalConfig": { # Describes the options to customize dynamic retrieval. # Specifies the dynamic retrieval configuration for the given source. + "dynamicThreshold": 3.14, # Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used. + "mode": "A String", # The mode of the predictor to be used in dynamic retrieval. + }, + }, + "retrieval": { # Defines a retrieval tool that model can call to access external knowledge. # Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation. + "disableAttribution": True or False, # Optional. Deprecated. This option is no longer supported. + "vertexAiSearch": { # Retrieve from Vertex AI Search datastore for grounding. See https://cloud.google.com/products/agent-builder # Set to use data source powered by Vertex AI Search. + "datastore": "A String", # Required. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` + }, + "vertexRagStore": { # Retrieve from Vertex RAG Store for grounding. # Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService. + "ragResources": [ # Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support. + { # The definition of the Rag resource. + "ragCorpus": "A String", # Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + "ragFileIds": [ # Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field. + "A String", + ], + }, + ], + "ragRetrievalConfig": { # Specifies the context retrieval config. # Optional. The retrieval config for the Rag query. + "filter": { # Config for filters. # Optional. Config for filters. + "metadataFilter": "A String", # Optional. String for metadata filtering. + "vectorDistanceThreshold": 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold. + "vectorSimilarityThreshold": 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold. + }, + "topK": 42, # Optional. The number of contexts to retrieve. + }, + "similarityTopK": 42, # Optional. Number of top k results to return from the selected corpora. + "vectorDistanceThreshold": 3.14, # Optional. Only return results with vector distance smaller than the threshold. + }, + }, + }, + ], + "ttl": "A String", # Input only. The TTL for this resource. The expiration time is computed: now + TTL. + "updateTime": "A String", # Output only. When the cache entry was last updated in UTC time. + "usageMetadata": { # Metadata on the usage of the cached content. # Output only. Metadata on the usage of the cached content. + "audioDurationSeconds": 42, # Duration of audio in seconds. + "imageCount": 42, # Number of images. + "textCount": 42, # Number of text characters. + "totalTokenCount": 42, # Total number of tokens that the cached content consumes. + "videoDurationSeconds": 42, # Duration of video in seconds. + }, +} + + updateMask: string, Required. The list of fields to update. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # A resource used in LLM queries for users to explicitly specify what to cache and how to cache. + "contents": [ # Optional. Input only. Immutable. The content to cache + { # The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. + "parts": [ # Required. Ordered `Parts` that constitute a single message. Parts may have different IANA MIME types. + { # A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes. + "fileData": { # URI based data. # Optional. URI based data. + "fileUri": "A String", # Required. URI. + "mimeType": "A String", # Required. The IANA standard MIME type of the source data. + }, + "functionCall": { # A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing the parameters and their values. # Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. + "args": { # Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. + "a_key": "", # Properties of the object. + }, + "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name]. + }, + "functionResponse": { # The result output from a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a [FunctionCall] made based on model prediction. # Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. + "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. + "response": { # Required. The function response in JSON object format. Use "output" key to specify function output and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as function output. + "a_key": "", # Properties of the object. + }, + }, + "inlineData": { # Content blob. It's preferred to send as text directly rather than raw bytes. # Optional. Inlined bytes data. + "data": "A String", # Required. Raw bytes. + "mimeType": "A String", # Required. The IANA standard MIME type of the source data. + }, + "text": "A String", # Optional. Text part (can be code). + "videoMetadata": { # Metadata describes the input video content. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data. + "endOffset": "A String", # Optional. The end offset of the video. + "startOffset": "A String", # Optional. The start offset of the video. + }, + }, + ], + "role": "A String", # Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset. + }, + ], + "createTime": "A String", # Output only. Creatation time of the cache entry. + "displayName": "A String", # Optional. Immutable. The user-generated meaningful display name of the cached content. + "expireTime": "A String", # Timestamp of when this resource is considered expired. This is *always* provided on output, regardless of what was sent on input. + "model": "A String", # Immutable. The name of the publisher model to use for cached content. Format: projects/{project}/locations/{location}/publishers/{publisher}/models/{model} + "name": "A String", # Immutable. Identifier. The server-generated resource name of the cached content Format: projects/{project}/locations/{location}/cachedContents/{cached_content} + "systemInstruction": { # The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. # Optional. Input only. Immutable. Developer set system instruction. Currently, text only + "parts": [ # Required. Ordered `Parts` that constitute a single message. Parts may have different IANA MIME types. + { # A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes. + "fileData": { # URI based data. # Optional. URI based data. + "fileUri": "A String", # Required. URI. + "mimeType": "A String", # Required. The IANA standard MIME type of the source data. + }, + "functionCall": { # A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing the parameters and their values. # Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. + "args": { # Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. + "a_key": "", # Properties of the object. + }, + "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name]. + }, + "functionResponse": { # The result output from a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a [FunctionCall] made based on model prediction. # Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. + "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. + "response": { # Required. The function response in JSON object format. Use "output" key to specify function output and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as function output. + "a_key": "", # Properties of the object. + }, + }, + "inlineData": { # Content blob. It's preferred to send as text directly rather than raw bytes. # Optional. Inlined bytes data. + "data": "A String", # Required. Raw bytes. + "mimeType": "A String", # Required. The IANA standard MIME type of the source data. + }, + "text": "A String", # Optional. Text part (can be code). + "videoMetadata": { # Metadata describes the input video content. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data. + "endOffset": "A String", # Optional. The end offset of the video. + "startOffset": "A String", # Optional. The start offset of the video. + }, + }, + ], + "role": "A String", # Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset. + }, + "toolConfig": { # Tool config. This config is shared for all tools provided in the request. # Optional. Input only. Immutable. Tool config. This config is shared for all tools + "functionCallingConfig": { # Function calling config. # Optional. Function calling config. + "allowedFunctionNames": [ # Optional. Function names to call. Only set when the Mode is ANY. Function names should match [FunctionDeclaration.name]. With mode set to ANY, model will predict a function call from the set of function names provided. + "A String", + ], + "mode": "A String", # Optional. Function calling mode. + }, + }, + "tools": [ # Optional. Input only. Immutable. A list of `Tools` the model may use to generate the next response + { # Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool (e.g FunctionDeclaration, Retrieval or GoogleSearchRetrieval). + "functionDeclarations": [ # Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 128 function declarations can be provided. + { # Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client. + "description": "A String", # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. + "name": "A String", # Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64. + "parameters": { # Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may be added in the future as needed. # Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1 + "anyOf": [ # Optional. The value should be validated against any (one or more) of the subschemas in the list. + # Object with schema name: GoogleCloudAiplatformV1Schema + ], + "default": "", # Optional. Default value of the data. + "description": "A String", # Optional. The description of the data. + "enum": [ # Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]} + "A String", + ], + "example": "", # Optional. Example of the object. Will only populated when the object is the root. + "format": "A String", # Optional. The format of the data. Supported formats: for NUMBER type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: "email", "byte", etc + "items": # Object with schema name: GoogleCloudAiplatformV1Schema # Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. + "maxItems": "A String", # Optional. Maximum number of the elements for Type.ARRAY. + "maxLength": "A String", # Optional. Maximum length of the Type.STRING + "maxProperties": "A String", # Optional. Maximum number of the properties for Type.OBJECT. + "maximum": 3.14, # Optional. Maximum value of the Type.INTEGER and Type.NUMBER + "minItems": "A String", # Optional. Minimum number of the elements for Type.ARRAY. + "minLength": "A String", # Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING + "minProperties": "A String", # Optional. Minimum number of the properties for Type.OBJECT. + "minimum": 3.14, # Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER + "nullable": True or False, # Optional. Indicates if the value may be null. + "pattern": "A String", # Optional. Pattern of the Type.STRING to restrict a string to a regular expression. + "properties": { # Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. + "a_key": # Object with schema name: GoogleCloudAiplatformV1Schema + }, + "propertyOrdering": [ # Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. + "A String", + ], + "required": [ # Optional. Required properties of Type.OBJECT. + "A String", + ], + "title": "A String", # Optional. The title of the Schema. + "type": "A String", # Optional. The type of the data. + }, + "response": { # Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may be added in the future as needed. # Optional. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function. + "anyOf": [ # Optional. The value should be validated against any (one or more) of the subschemas in the list. + # Object with schema name: GoogleCloudAiplatformV1Schema + ], + "default": "", # Optional. Default value of the data. + "description": "A String", # Optional. The description of the data. + "enum": [ # Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]} + "A String", + ], + "example": "", # Optional. Example of the object. Will only populated when the object is the root. + "format": "A String", # Optional. The format of the data. Supported formats: for NUMBER type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: "email", "byte", etc + "items": # Object with schema name: GoogleCloudAiplatformV1Schema # Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. + "maxItems": "A String", # Optional. Maximum number of the elements for Type.ARRAY. + "maxLength": "A String", # Optional. Maximum length of the Type.STRING + "maxProperties": "A String", # Optional. Maximum number of the properties for Type.OBJECT. + "maximum": 3.14, # Optional. Maximum value of the Type.INTEGER and Type.NUMBER + "minItems": "A String", # Optional. Minimum number of the elements for Type.ARRAY. + "minLength": "A String", # Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING + "minProperties": "A String", # Optional. Minimum number of the properties for Type.OBJECT. + "minimum": 3.14, # Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER + "nullable": True or False, # Optional. Indicates if the value may be null. + "pattern": "A String", # Optional. Pattern of the Type.STRING to restrict a string to a regular expression. + "properties": { # Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. + "a_key": # Object with schema name: GoogleCloudAiplatformV1Schema + }, + "propertyOrdering": [ # Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. + "A String", + ], + "required": [ # Optional. Required properties of Type.OBJECT. + "A String", + ], + "title": "A String", # Optional. The title of the Schema. + "type": "A String", # Optional. The type of the data. + }, + }, + ], + "googleSearchRetrieval": { # Tool to retrieve public web data for grounding, powered by Google. # Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search. + "dynamicRetrievalConfig": { # Describes the options to customize dynamic retrieval. # Specifies the dynamic retrieval configuration for the given source. + "dynamicThreshold": 3.14, # Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used. + "mode": "A String", # The mode of the predictor to be used in dynamic retrieval. + }, + }, + "retrieval": { # Defines a retrieval tool that model can call to access external knowledge. # Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation. + "disableAttribution": True or False, # Optional. Deprecated. This option is no longer supported. + "vertexAiSearch": { # Retrieve from Vertex AI Search datastore for grounding. See https://cloud.google.com/products/agent-builder # Set to use data source powered by Vertex AI Search. + "datastore": "A String", # Required. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` + }, + "vertexRagStore": { # Retrieve from Vertex RAG Store for grounding. # Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService. + "ragResources": [ # Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support. + { # The definition of the Rag resource. + "ragCorpus": "A String", # Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + "ragFileIds": [ # Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field. + "A String", + ], + }, + ], + "ragRetrievalConfig": { # Specifies the context retrieval config. # Optional. The retrieval config for the Rag query. + "filter": { # Config for filters. # Optional. Config for filters. + "metadataFilter": "A String", # Optional. String for metadata filtering. + "vectorDistanceThreshold": 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold. + "vectorSimilarityThreshold": 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold. + }, + "topK": 42, # Optional. The number of contexts to retrieve. + }, + "similarityTopK": 42, # Optional. Number of top k results to return from the selected corpora. + "vectorDistanceThreshold": 3.14, # Optional. Only return results with vector distance smaller than the threshold. + }, + }, + }, + ], + "ttl": "A String", # Input only. The TTL for this resource. The expiration time is computed: now + TTL. + "updateTime": "A String", # Output only. When the cache entry was last updated in UTC time. + "usageMetadata": { # Metadata on the usage of the cached content. # Output only. Metadata on the usage of the cached content. + "audioDurationSeconds": 42, # Duration of audio in seconds. + "imageCount": 42, # Number of images. + "textCount": 42, # Number of text characters. + "totalTokenCount": 42, # Total number of tokens that the cached content consumes. + "videoDurationSeconds": 42, # Duration of video in seconds. + }, +}+
cancel(name, x__xgafv=None)
-Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
+Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.
Close httplib2 connections.
@@ -98,7 +98,7 @@cancel(name, x__xgafv=None)
- Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. +Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`. Args: name: string, The name of the operation resource to be cancelled. (required) diff --git a/docs/dyn/aiplatform_v1.projects.locations.dataLabelingJobs.operations.html b/docs/dyn/aiplatform_v1.projects.locations.dataLabelingJobs.operations.html index 178463af7e..4ed33ac286 100644 --- a/docs/dyn/aiplatform_v1.projects.locations.dataLabelingJobs.operations.html +++ b/docs/dyn/aiplatform_v1.projects.locations.dataLabelingJobs.operations.html @@ -76,7 +76,7 @@Vertex AI API .
cancel(name, x__xgafv=None)
-Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
+Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.
Close httplib2 connections.
@@ -98,7 +98,7 @@Instance Methods
Method Details
cancel(name, x__xgafv=None)
-Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. +Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`. Args: name: string, The name of the operation resource to be cancelled. (required) diff --git a/docs/dyn/aiplatform_v1.projects.locations.datasets.annotationSpecs.operations.html b/docs/dyn/aiplatform_v1.projects.locations.datasets.annotationSpecs.operations.html index 2420c0be72..8f41adecc4 100644 --- a/docs/dyn/aiplatform_v1.projects.locations.datasets.annotationSpecs.operations.html +++ b/docs/dyn/aiplatform_v1.projects.locations.datasets.annotationSpecs.operations.html @@ -76,7 +76,7 @@Vertex AI API .
cancel(name, x__xgafv=None)
-Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
+Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.
Close httplib2 connections.
@@ -98,7 +98,7 @@Instance Methods
Method Details
cancel(name, x__xgafv=None)
-Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. +Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`. Args: name: string, The name of the operation resource to be cancelled. (required) diff --git a/docs/dyn/aiplatform_v1.projects.locations.datasets.dataItems.annotations.operations.html b/docs/dyn/aiplatform_v1.projects.locations.datasets.dataItems.annotations.operations.html index 0c36b16c1a..1af2fb663e 100644 --- a/docs/dyn/aiplatform_v1.projects.locations.datasets.dataItems.annotations.operations.html +++ b/docs/dyn/aiplatform_v1.projects.locations.datasets.dataItems.annotations.operations.html @@ -76,7 +76,7 @@Vertex AI API .
cancel(name, x__xgafv=None)
-Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
+Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.
Close httplib2 connections.
@@ -98,7 +98,7 @@Instance Methods
Method Details
cancel(name, x__xgafv=None)
-Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. +Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`. Args: name: string, The name of the operation resource to be cancelled. (required) diff --git a/docs/dyn/aiplatform_v1.projects.locations.datasets.dataItems.operations.html b/docs/dyn/aiplatform_v1.projects.locations.datasets.dataItems.operations.html index 4c54067a6f..6775b267a9 100644 --- a/docs/dyn/aiplatform_v1.projects.locations.datasets.dataItems.operations.html +++ b/docs/dyn/aiplatform_v1.projects.locations.datasets.dataItems.operations.html @@ -76,7 +76,7 @@Vertex AI API .
cancel(name, x__xgafv=None)
-Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
+Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.
Close httplib2 connections.
@@ -98,7 +98,7 @@Instance Methods
Method Details
cancel(name, x__xgafv=None)
-Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. +Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`. Args: name: string, The name of the operation resource to be cancelled. (required) diff --git a/docs/dyn/aiplatform_v1.projects.locations.datasets.operations.html b/docs/dyn/aiplatform_v1.projects.locations.datasets.operations.html index df9251ba71..ba9ef16b92 100644 --- a/docs/dyn/aiplatform_v1.projects.locations.datasets.operations.html +++ b/docs/dyn/aiplatform_v1.projects.locations.datasets.operations.html @@ -76,7 +76,7 @@Vertex AI API .
cancel(name, x__xgafv=None)
-Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
+Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.
Close httplib2 connections.
@@ -98,7 +98,7 @@Instance Methods
Method Details
cancel(name, x__xgafv=None)
-Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. +Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`. Args: name: string, The name of the operation resource to be cancelled. (required) diff --git a/docs/dyn/aiplatform_v1.projects.locations.datasets.savedQueries.operations.html b/docs/dyn/aiplatform_v1.projects.locations.datasets.savedQueries.operations.html index 0f3ee85c15..e8b49b60df 100644 --- a/docs/dyn/aiplatform_v1.projects.locations.datasets.savedQueries.operations.html +++ b/docs/dyn/aiplatform_v1.projects.locations.datasets.savedQueries.operations.html @@ -76,7 +76,7 @@Vertex AI API .
cancel(name, x__xgafv=None)
-Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
+Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.
Close httplib2 connections.
@@ -98,7 +98,7 @@Instance Methods
Method Details
cancel(name, x__xgafv=None)
-Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. +Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`. Args: name: string, The name of the operation resource to be cancelled. (required) diff --git a/docs/dyn/aiplatform_v1.projects.locations.deploymentResourcePools.html b/docs/dyn/aiplatform_v1.projects.locations.deploymentResourcePools.html index 3707b034d6..b783df35aa 100644 --- a/docs/dyn/aiplatform_v1.projects.locations.deploymentResourcePools.html +++ b/docs/dyn/aiplatform_v1.projects.locations.deploymentResourcePools.html @@ -146,6 +146,7 @@Method Details
}, "maxReplicaCount": 42, # Immutable. The maximum number of replicas this DeployedModel may be deployed on when the traffic against it increases. If the requested value is too large, the deployment will error, but if deployment succeeds then the ability to scale the model to that many replicas is guaranteed (barring service outages). If traffic against the DeployedModel increases beyond what its replicas at maximum may handle, a portion of the traffic will be dropped. If this value is not provided, will use min_replica_count as the default value. The value of this field impacts the charge against Vertex CPU and GPU quotas. Specifically, you will be charged for (max_replica_count * number of cores in the selected machine type) and (max_replica_count * number of GPUs per replica in the selected machine type). "minReplicaCount": 42, # Required. Immutable. The minimum number of machine replicas this DeployedModel will be always deployed on. This value must be greater than or equal to 1. If traffic against the DeployedModel increases, it may dynamically be deployed onto more replicas, and as traffic decreases, some of these extra replicas may be freed. + "requiredReplicaCount": 42, # Optional. Number of required available replicas for the deployment to succeed. This field is only needed when partial model deployment/mutation is desired. If set, the model deploy/mutate operation will succeed once available_replica_count reaches required_replica_count, and the rest of the replicas will be retried. If not set, the default required_replica_count will be min_replica_count. "spot": True or False, # Optional. If true, schedule the deployment workload on [spot VMs](https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms). }, "disableContainerLogging": True or False, # If the DeploymentResourcePool is deployed with custom-trained Models or AutoML Tabular Models, the container(s) of the DeploymentResourcePool will send `stderr` and `stdout` streams to Cloud Logging by default. Please note that the logs incur cost, which are subject to [Cloud Logging pricing](https://cloud.google.com/logging/pricing). User can disable container logging by setting this flag to true. @@ -262,6 +263,7 @@Method Details
}, "maxReplicaCount": 42, # Immutable. The maximum number of replicas this DeployedModel may be deployed on when the traffic against it increases. If the requested value is too large, the deployment will error, but if deployment succeeds then the ability to scale the model to that many replicas is guaranteed (barring service outages). If traffic against the DeployedModel increases beyond what its replicas at maximum may handle, a portion of the traffic will be dropped. If this value is not provided, will use min_replica_count as the default value. The value of this field impacts the charge against Vertex CPU and GPU quotas. Specifically, you will be charged for (max_replica_count * number of cores in the selected machine type) and (max_replica_count * number of GPUs per replica in the selected machine type). "minReplicaCount": 42, # Required. Immutable. The minimum number of machine replicas this DeployedModel will be always deployed on. This value must be greater than or equal to 1. If traffic against the DeployedModel increases, it may dynamically be deployed onto more replicas, and as traffic decreases, some of these extra replicas may be freed. + "requiredReplicaCount": 42, # Optional. Number of required available replicas for the deployment to succeed. This field is only needed when partial model deployment/mutation is desired. If set, the model deploy/mutate operation will succeed once available_replica_count reaches required_replica_count, and the rest of the replicas will be retried. If not set, the default required_replica_count will be min_replica_count. "spot": True or False, # Optional. If true, schedule the deployment workload on [spot VMs](https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms). }, "disableContainerLogging": True or False, # If the DeploymentResourcePool is deployed with custom-trained Models or AutoML Tabular Models, the container(s) of the DeploymentResourcePool will send `stderr` and `stdout` streams to Cloud Logging by default. Please note that the logs incur cost, which are subject to [Cloud Logging pricing](https://cloud.google.com/logging/pricing). User can disable container logging by setting this flag to true. @@ -317,6 +319,7 @@Method Details
}, "maxReplicaCount": 42, # Immutable. The maximum number of replicas this DeployedModel may be deployed on when the traffic against it increases. If the requested value is too large, the deployment will error, but if deployment succeeds then the ability to scale the model to that many replicas is guaranteed (barring service outages). If traffic against the DeployedModel increases beyond what its replicas at maximum may handle, a portion of the traffic will be dropped. If this value is not provided, will use min_replica_count as the default value. The value of this field impacts the charge against Vertex CPU and GPU quotas. Specifically, you will be charged for (max_replica_count * number of cores in the selected machine type) and (max_replica_count * number of GPUs per replica in the selected machine type). "minReplicaCount": 42, # Required. Immutable. The minimum number of machine replicas this DeployedModel will be always deployed on. This value must be greater than or equal to 1. If traffic against the DeployedModel increases, it may dynamically be deployed onto more replicas, and as traffic decreases, some of these extra replicas may be freed. + "requiredReplicaCount": 42, # Optional. Number of required available replicas for the deployment to succeed. This field is only needed when partial model deployment/mutation is desired. If set, the model deploy/mutate operation will succeed once available_replica_count reaches required_replica_count, and the rest of the replicas will be retried. If not set, the default required_replica_count will be min_replica_count. "spot": True or False, # Optional. If true, schedule the deployment workload on [spot VMs](https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms). }, "disableContainerLogging": True or False, # If the DeploymentResourcePool is deployed with custom-trained Models or AutoML Tabular Models, the container(s) of the DeploymentResourcePool will send `stderr` and `stdout` streams to Cloud Logging by default. Please note that the logs incur cost, which are subject to [Cloud Logging pricing](https://cloud.google.com/logging/pricing). User can disable container logging by setting this flag to true. @@ -380,6 +383,7 @@Method Details
}, "maxReplicaCount": 42, # Immutable. The maximum number of replicas this DeployedModel may be deployed on when the traffic against it increases. If the requested value is too large, the deployment will error, but if deployment succeeds then the ability to scale the model to that many replicas is guaranteed (barring service outages). If traffic against the DeployedModel increases beyond what its replicas at maximum may handle, a portion of the traffic will be dropped. If this value is not provided, will use min_replica_count as the default value. The value of this field impacts the charge against Vertex CPU and GPU quotas. Specifically, you will be charged for (max_replica_count * number of cores in the selected machine type) and (max_replica_count * number of GPUs per replica in the selected machine type). "minReplicaCount": 42, # Required. Immutable. The minimum number of machine replicas this DeployedModel will be always deployed on. This value must be greater than or equal to 1. If traffic against the DeployedModel increases, it may dynamically be deployed onto more replicas, and as traffic decreases, some of these extra replicas may be freed. + "requiredReplicaCount": 42, # Optional. Number of required available replicas for the deployment to succeed. This field is only needed when partial model deployment/mutation is desired. If set, the model deploy/mutate operation will succeed once available_replica_count reaches required_replica_count, and the rest of the replicas will be retried. If not set, the default required_replica_count will be min_replica_count. "spot": True or False, # Optional. If true, schedule the deployment workload on [spot VMs](https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms). }, "disableContainerLogging": True or False, # If the DeploymentResourcePool is deployed with custom-trained Models or AutoML Tabular Models, the container(s) of the DeploymentResourcePool will send `stderr` and `stdout` streams to Cloud Logging by default. Please note that the logs incur cost, which are subject to [Cloud Logging pricing](https://cloud.google.com/logging/pricing). User can disable container logging by setting this flag to true. @@ -474,6 +478,7 @@Method Details
}, "maxReplicaCount": 42, # Immutable. The maximum number of replicas this DeployedModel may be deployed on when the traffic against it increases. If the requested value is too large, the deployment will error, but if deployment succeeds then the ability to scale the model to that many replicas is guaranteed (barring service outages). If traffic against the DeployedModel increases beyond what its replicas at maximum may handle, a portion of the traffic will be dropped. If this value is not provided, will use min_replica_count as the default value. The value of this field impacts the charge against Vertex CPU and GPU quotas. Specifically, you will be charged for (max_replica_count * number of cores in the selected machine type) and (max_replica_count * number of GPUs per replica in the selected machine type). "minReplicaCount": 42, # Required. Immutable. The minimum number of machine replicas this DeployedModel will be always deployed on. This value must be greater than or equal to 1. If traffic against the DeployedModel increases, it may dynamically be deployed onto more replicas, and as traffic decreases, some of these extra replicas may be freed. + "requiredReplicaCount": 42, # Optional. Number of required available replicas for the deployment to succeed. This field is only needed when partial model deployment/mutation is desired. If set, the model deploy/mutate operation will succeed once available_replica_count reaches required_replica_count, and the rest of the replicas will be retried. If not set, the default required_replica_count will be min_replica_count. "spot": True or False, # Optional. If true, schedule the deployment workload on [spot VMs](https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms). }, "disableContainerLogging": True or False, # For custom-trained Models and AutoML Tabular Models, the container of the DeployedModel instances will send `stderr` and `stdout` streams to Cloud Logging by default. Please note that the logs incur cost, which are subject to [Cloud Logging pricing](https://cloud.google.com/logging/pricing). User can disable container logging by setting this flag to true. @@ -602,6 +607,11 @@Method Details
}, "serviceAccount": "A String", # The service account that the DeployedModel's container runs as. Specify the email address of the service account. If this service account is not specified, the container runs as a service account that doesn't have access to the resource project. Users deploying the Model must have the `iam.serviceAccounts.actAs` permission on this service account. "sharedResources": "A String", # The resource name of the shared DeploymentResourcePool to deploy on. Format: `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}` + "status": { # Runtime status of the deployed model. # Output only. Runtime status of the deployed model. + "availableReplicaCount": 42, # Output only. The number of available replicas of the deployed model. + "lastUpdateTime": "A String", # Output only. The time at which the status was last updated. + "message": "A String", # Output only. The latest deployed model's status message (if any). + }, "systemLabels": { # System labels to apply to Model Garden deployments. System labels are managed by Google for internal use only. "a_key": "A String", }, diff --git a/docs/dyn/aiplatform_v1.projects.locations.deploymentResourcePools.operations.html b/docs/dyn/aiplatform_v1.projects.locations.deploymentResourcePools.operations.html index 205a337e4e..b59fe274bf 100644 --- a/docs/dyn/aiplatform_v1.projects.locations.deploymentResourcePools.operations.html +++ b/docs/dyn/aiplatform_v1.projects.locations.deploymentResourcePools.operations.html @@ -76,7 +76,7 @@Vertex AI API .
cancel(name, x__xgafv=None)
-Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
+Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.
Close httplib2 connections.
@@ -98,7 +98,7 @@Instance Methods
Method Details
cancel(name, x__xgafv=None)
-Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. +Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`. Args: name: string, The name of the operation resource to be cancelled. (required) diff --git a/docs/dyn/aiplatform_v1.projects.locations.endpoints.html b/docs/dyn/aiplatform_v1.projects.locations.endpoints.html index 807834446d..3a33595cdb 100644 --- a/docs/dyn/aiplatform_v1.projects.locations.endpoints.html +++ b/docs/dyn/aiplatform_v1.projects.locations.endpoints.html @@ -462,9 +462,6 @@Method Details
"datastore": "A String", # Required. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` }, "vertexRagStore": { # Retrieve from Vertex RAG Store for grounding. # Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService. - "ragCorpora": [ # Optional. Deprecated. Please use rag_resources instead. - "A String", - ], "ragResources": [ # Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support. { # The definition of the Rag resource. "ragCorpus": "A String", # Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` @@ -473,6 +470,14 @@Method Details
], }, ], + "ragRetrievalConfig": { # Specifies the context retrieval config. # Optional. The retrieval config for the Rag query. + "filter": { # Config for filters. # Optional. Config for filters. + "metadataFilter": "A String", # Optional. String for metadata filtering. + "vectorDistanceThreshold": 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold. + "vectorSimilarityThreshold": 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold. + }, + "topK": 42, # Optional. The number of contexts to retrieve. + }, "similarityTopK": 42, # Optional. Number of top k results to return from the selected corpora. "vectorDistanceThreshold": 3.14, # Optional. Only return results with vector distance smaller than the threshold. }, @@ -540,6 +545,7 @@Method Details
}, "maxReplicaCount": 42, # Immutable. The maximum number of replicas this DeployedModel may be deployed on when the traffic against it increases. If the requested value is too large, the deployment will error, but if deployment succeeds then the ability to scale the model to that many replicas is guaranteed (barring service outages). If traffic against the DeployedModel increases beyond what its replicas at maximum may handle, a portion of the traffic will be dropped. If this value is not provided, will use min_replica_count as the default value. The value of this field impacts the charge against Vertex CPU and GPU quotas. Specifically, you will be charged for (max_replica_count * number of cores in the selected machine type) and (max_replica_count * number of GPUs per replica in the selected machine type). "minReplicaCount": 42, # Required. Immutable. The minimum number of machine replicas this DeployedModel will be always deployed on. This value must be greater than or equal to 1. If traffic against the DeployedModel increases, it may dynamically be deployed onto more replicas, and as traffic decreases, some of these extra replicas may be freed. + "requiredReplicaCount": 42, # Optional. Number of required available replicas for the deployment to succeed. This field is only needed when partial model deployment/mutation is desired. If set, the model deploy/mutate operation will succeed once available_replica_count reaches required_replica_count, and the rest of the replicas will be retried. If not set, the default required_replica_count will be min_replica_count. "spot": True or False, # Optional. If true, schedule the deployment workload on [spot VMs](https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms). }, "disableContainerLogging": True or False, # For custom-trained Models and AutoML Tabular Models, the container of the DeployedModel instances will send `stderr` and `stdout` streams to Cloud Logging by default. Please note that the logs incur cost, which are subject to [Cloud Logging pricing](https://cloud.google.com/logging/pricing). User can disable container logging by setting this flag to true. @@ -668,6 +674,11 @@Method Details
}, "serviceAccount": "A String", # The service account that the DeployedModel's container runs as. Specify the email address of the service account. If this service account is not specified, the container runs as a service account that doesn't have access to the resource project. Users deploying the Model must have the `iam.serviceAccounts.actAs` permission on this service account. "sharedResources": "A String", # The resource name of the shared DeploymentResourcePool to deploy on. Format: `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}` + "status": { # Runtime status of the deployed model. # Output only. Runtime status of the deployed model. + "availableReplicaCount": 42, # Output only. The number of available replicas of the deployed model. + "lastUpdateTime": "A String", # Output only. The time at which the status was last updated. + "message": "A String", # Output only. The latest deployed model's status message (if any). + }, "systemLabels": { # System labels to apply to Model Garden deployments. System labels are managed by Google for internal use only. "a_key": "A String", }, @@ -811,6 +822,7 @@Method Details
}, "maxReplicaCount": 42, # Immutable. The maximum number of replicas this DeployedModel may be deployed on when the traffic against it increases. If the requested value is too large, the deployment will error, but if deployment succeeds then the ability to scale the model to that many replicas is guaranteed (barring service outages). If traffic against the DeployedModel increases beyond what its replicas at maximum may handle, a portion of the traffic will be dropped. If this value is not provided, will use min_replica_count as the default value. The value of this field impacts the charge against Vertex CPU and GPU quotas. Specifically, you will be charged for (max_replica_count * number of cores in the selected machine type) and (max_replica_count * number of GPUs per replica in the selected machine type). "minReplicaCount": 42, # Required. Immutable. The minimum number of machine replicas this DeployedModel will be always deployed on. This value must be greater than or equal to 1. If traffic against the DeployedModel increases, it may dynamically be deployed onto more replicas, and as traffic decreases, some of these extra replicas may be freed. + "requiredReplicaCount": 42, # Optional. Number of required available replicas for the deployment to succeed. This field is only needed when partial model deployment/mutation is desired. If set, the model deploy/mutate operation will succeed once available_replica_count reaches required_replica_count, and the rest of the replicas will be retried. If not set, the default required_replica_count will be min_replica_count. "spot": True or False, # Optional. If true, schedule the deployment workload on [spot VMs](https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms). }, "disableContainerLogging": True or False, # For custom-trained Models and AutoML Tabular Models, the container of the DeployedModel instances will send `stderr` and `stdout` streams to Cloud Logging by default. Please note that the logs incur cost, which are subject to [Cloud Logging pricing](https://cloud.google.com/logging/pricing). User can disable container logging by setting this flag to true. @@ -939,6 +951,11 @@Method Details
}, "serviceAccount": "A String", # The service account that the DeployedModel's container runs as. Specify the email address of the service account. If this service account is not specified, the container runs as a service account that doesn't have access to the resource project. Users deploying the Model must have the `iam.serviceAccounts.actAs` permission on this service account. "sharedResources": "A String", # The resource name of the shared DeploymentResourcePool to deploy on. Format: `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}` + "status": { # Runtime status of the deployed model. # Output only. Runtime status of the deployed model. + "availableReplicaCount": 42, # Output only. The number of available replicas of the deployed model. + "lastUpdateTime": "A String", # Output only. The time at which the status was last updated. + "message": "A String", # Output only. The latest deployed model's status message (if any). + }, "systemLabels": { # System labels to apply to Model Garden deployments. System labels are managed by Google for internal use only. "a_key": "A String", }, @@ -1389,6 +1406,7 @@Method Details
The object takes the form of: { # Request message for [PredictionService.GenerateContent]. + "cachedContent": "A String", # Optional. The name of the cached content used as context to serve the prediction. Note: only used in explicit caching, where users can have control over caching (e.g. what content to cache) and enjoy guaranteed cost savings. Format: `projects/{project}/locations/{location}/cachedContents/{cachedContent}` "contents": [ # Required. The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request. { # The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. "parts": [ # Required. Ordered `Parts` that constitute a single message. Parts may have different IANA MIME types. @@ -1620,9 +1638,6 @@Method Details
"datastore": "A String", # Required. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` }, "vertexRagStore": { # Retrieve from Vertex RAG Store for grounding. # Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService. - "ragCorpora": [ # Optional. Deprecated. Please use rag_resources instead. - "A String", - ], "ragResources": [ # Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support. { # The definition of the Rag resource. "ragCorpus": "A String", # Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` @@ -1631,6 +1646,14 @@Method Details
], }, ], + "ragRetrievalConfig": { # Specifies the context retrieval config. # Optional. The retrieval config for the Rag query. + "filter": { # Config for filters. # Optional. Config for filters. + "metadataFilter": "A String", # Optional. String for metadata filtering. + "vectorDistanceThreshold": 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold. + "vectorSimilarityThreshold": 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold. + }, + "topK": 42, # Optional. The number of contexts to retrieve. + }, "similarityTopK": 42, # Optional. Number of top k results to return from the selected corpora. "vectorDistanceThreshold": 3.14, # Optional. Only return results with vector distance smaller than the threshold. }, @@ -1791,6 +1814,7 @@Method Details
], }, "usageMetadata": { # Usage metadata about response(s). # Usage metadata about the response(s). + "cachedContentTokenCount": 42, # Output only. Number of tokens in the cached part in the input (the cached content). "candidatesTokenCount": 42, # Number of tokens in the response(s). "promptTokenCount": 42, # Number of tokens in the request. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content. "totalTokenCount": 42, # Total token count for prompt and response candidates. @@ -1848,6 +1872,7 @@Method Details
}, "maxReplicaCount": 42, # Immutable. The maximum number of replicas this DeployedModel may be deployed on when the traffic against it increases. If the requested value is too large, the deployment will error, but if deployment succeeds then the ability to scale the model to that many replicas is guaranteed (barring service outages). If traffic against the DeployedModel increases beyond what its replicas at maximum may handle, a portion of the traffic will be dropped. If this value is not provided, will use min_replica_count as the default value. The value of this field impacts the charge against Vertex CPU and GPU quotas. Specifically, you will be charged for (max_replica_count * number of cores in the selected machine type) and (max_replica_count * number of GPUs per replica in the selected machine type). "minReplicaCount": 42, # Required. Immutable. The minimum number of machine replicas this DeployedModel will be always deployed on. This value must be greater than or equal to 1. If traffic against the DeployedModel increases, it may dynamically be deployed onto more replicas, and as traffic decreases, some of these extra replicas may be freed. + "requiredReplicaCount": 42, # Optional. Number of required available replicas for the deployment to succeed. This field is only needed when partial model deployment/mutation is desired. If set, the model deploy/mutate operation will succeed once available_replica_count reaches required_replica_count, and the rest of the replicas will be retried. If not set, the default required_replica_count will be min_replica_count. "spot": True or False, # Optional. If true, schedule the deployment workload on [spot VMs](https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms). }, "disableContainerLogging": True or False, # For custom-trained Models and AutoML Tabular Models, the container of the DeployedModel instances will send `stderr` and `stdout` streams to Cloud Logging by default. Please note that the logs incur cost, which are subject to [Cloud Logging pricing](https://cloud.google.com/logging/pricing). User can disable container logging by setting this flag to true. @@ -1976,6 +2001,11 @@Method Details
}, "serviceAccount": "A String", # The service account that the DeployedModel's container runs as. Specify the email address of the service account. If this service account is not specified, the container runs as a service account that doesn't have access to the resource project. Users deploying the Model must have the `iam.serviceAccounts.actAs` permission on this service account. "sharedResources": "A String", # The resource name of the shared DeploymentResourcePool to deploy on. Format: `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}` + "status": { # Runtime status of the deployed model. # Output only. Runtime status of the deployed model. + "availableReplicaCount": 42, # Output only. The number of available replicas of the deployed model. + "lastUpdateTime": "A String", # Output only. The time at which the status was last updated. + "message": "A String", # Output only. The latest deployed model's status message (if any). + }, "systemLabels": { # System labels to apply to Model Garden deployments. System labels are managed by Google for internal use only. "a_key": "A String", }, @@ -2074,6 +2104,7 @@Method Details
}, "maxReplicaCount": 42, # Immutable. The maximum number of replicas this DeployedModel may be deployed on when the traffic against it increases. If the requested value is too large, the deployment will error, but if deployment succeeds then the ability to scale the model to that many replicas is guaranteed (barring service outages). If traffic against the DeployedModel increases beyond what its replicas at maximum may handle, a portion of the traffic will be dropped. If this value is not provided, will use min_replica_count as the default value. The value of this field impacts the charge against Vertex CPU and GPU quotas. Specifically, you will be charged for (max_replica_count * number of cores in the selected machine type) and (max_replica_count * number of GPUs per replica in the selected machine type). "minReplicaCount": 42, # Required. Immutable. The minimum number of machine replicas this DeployedModel will be always deployed on. This value must be greater than or equal to 1. If traffic against the DeployedModel increases, it may dynamically be deployed onto more replicas, and as traffic decreases, some of these extra replicas may be freed. + "requiredReplicaCount": 42, # Optional. Number of required available replicas for the deployment to succeed. This field is only needed when partial model deployment/mutation is desired. If set, the model deploy/mutate operation will succeed once available_replica_count reaches required_replica_count, and the rest of the replicas will be retried. If not set, the default required_replica_count will be min_replica_count. "spot": True or False, # Optional. If true, schedule the deployment workload on [spot VMs](https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms). }, "disableContainerLogging": True or False, # For custom-trained Models and AutoML Tabular Models, the container of the DeployedModel instances will send `stderr` and `stdout` streams to Cloud Logging by default. Please note that the logs incur cost, which are subject to [Cloud Logging pricing](https://cloud.google.com/logging/pricing). User can disable container logging by setting this flag to true. @@ -2202,6 +2233,11 @@Method Details
}, "serviceAccount": "A String", # The service account that the DeployedModel's container runs as. Specify the email address of the service account. If this service account is not specified, the container runs as a service account that doesn't have access to the resource project. Users deploying the Model must have the `iam.serviceAccounts.actAs` permission on this service account. "sharedResources": "A String", # The resource name of the shared DeploymentResourcePool to deploy on. Format: `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}` + "status": { # Runtime status of the deployed model. # Output only. Runtime status of the deployed model. + "availableReplicaCount": 42, # Output only. The number of available replicas of the deployed model. + "lastUpdateTime": "A String", # Output only. The time at which the status was last updated. + "message": "A String", # Output only. The latest deployed model's status message (if any). + }, "systemLabels": { # System labels to apply to Model Garden deployments. System labels are managed by Google for internal use only. "a_key": "A String", }, @@ -2298,6 +2334,7 @@Method Details
}, "maxReplicaCount": 42, # Immutable. The maximum number of replicas this DeployedModel may be deployed on when the traffic against it increases. If the requested value is too large, the deployment will error, but if deployment succeeds then the ability to scale the model to that many replicas is guaranteed (barring service outages). If traffic against the DeployedModel increases beyond what its replicas at maximum may handle, a portion of the traffic will be dropped. If this value is not provided, will use min_replica_count as the default value. The value of this field impacts the charge against Vertex CPU and GPU quotas. Specifically, you will be charged for (max_replica_count * number of cores in the selected machine type) and (max_replica_count * number of GPUs per replica in the selected machine type). "minReplicaCount": 42, # Required. Immutable. The minimum number of machine replicas this DeployedModel will be always deployed on. This value must be greater than or equal to 1. If traffic against the DeployedModel increases, it may dynamically be deployed onto more replicas, and as traffic decreases, some of these extra replicas may be freed. + "requiredReplicaCount": 42, # Optional. Number of required available replicas for the deployment to succeed. This field is only needed when partial model deployment/mutation is desired. If set, the model deploy/mutate operation will succeed once available_replica_count reaches required_replica_count, and the rest of the replicas will be retried. If not set, the default required_replica_count will be min_replica_count. "spot": True or False, # Optional. If true, schedule the deployment workload on [spot VMs](https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms). }, "disableContainerLogging": True or False, # For custom-trained Models and AutoML Tabular Models, the container of the DeployedModel instances will send `stderr` and `stdout` streams to Cloud Logging by default. Please note that the logs incur cost, which are subject to [Cloud Logging pricing](https://cloud.google.com/logging/pricing). User can disable container logging by setting this flag to true. @@ -2426,6 +2463,11 @@Method Details
}, "serviceAccount": "A String", # The service account that the DeployedModel's container runs as. Specify the email address of the service account. If this service account is not specified, the container runs as a service account that doesn't have access to the resource project. Users deploying the Model must have the `iam.serviceAccounts.actAs` permission on this service account. "sharedResources": "A String", # The resource name of the shared DeploymentResourcePool to deploy on. Format: `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}` + "status": { # Runtime status of the deployed model. # Output only. Runtime status of the deployed model. + "availableReplicaCount": 42, # Output only. The number of available replicas of the deployed model. + "lastUpdateTime": "A String", # Output only. The time at which the status was last updated. + "message": "A String", # Output only. The latest deployed model's status message (if any). + }, "systemLabels": { # System labels to apply to Model Garden deployments. System labels are managed by Google for internal use only. "a_key": "A String", }, @@ -2507,6 +2549,7 @@Method Details
}, "maxReplicaCount": 42, # Immutable. The maximum number of replicas this DeployedModel may be deployed on when the traffic against it increases. If the requested value is too large, the deployment will error, but if deployment succeeds then the ability to scale the model to that many replicas is guaranteed (barring service outages). If traffic against the DeployedModel increases beyond what its replicas at maximum may handle, a portion of the traffic will be dropped. If this value is not provided, will use min_replica_count as the default value. The value of this field impacts the charge against Vertex CPU and GPU quotas. Specifically, you will be charged for (max_replica_count * number of cores in the selected machine type) and (max_replica_count * number of GPUs per replica in the selected machine type). "minReplicaCount": 42, # Required. Immutable. The minimum number of machine replicas this DeployedModel will be always deployed on. This value must be greater than or equal to 1. If traffic against the DeployedModel increases, it may dynamically be deployed onto more replicas, and as traffic decreases, some of these extra replicas may be freed. + "requiredReplicaCount": 42, # Optional. Number of required available replicas for the deployment to succeed. This field is only needed when partial model deployment/mutation is desired. If set, the model deploy/mutate operation will succeed once available_replica_count reaches required_replica_count, and the rest of the replicas will be retried. If not set, the default required_replica_count will be min_replica_count. "spot": True or False, # Optional. If true, schedule the deployment workload on [spot VMs](https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms). }, "disableContainerLogging": True or False, # For custom-trained Models and AutoML Tabular Models, the container of the DeployedModel instances will send `stderr` and `stdout` streams to Cloud Logging by default. Please note that the logs incur cost, which are subject to [Cloud Logging pricing](https://cloud.google.com/logging/pricing). User can disable container logging by setting this flag to true. @@ -2635,6 +2678,11 @@Method Details
}, "serviceAccount": "A String", # The service account that the DeployedModel's container runs as. Specify the email address of the service account. If this service account is not specified, the container runs as a service account that doesn't have access to the resource project. Users deploying the Model must have the `iam.serviceAccounts.actAs` permission on this service account. "sharedResources": "A String", # The resource name of the shared DeploymentResourcePool to deploy on. Format: `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}` + "status": { # Runtime status of the deployed model. # Output only. Runtime status of the deployed model. + "availableReplicaCount": 42, # Output only. The number of available replicas of the deployed model. + "lastUpdateTime": "A String", # Output only. The time at which the status was last updated. + "message": "A String", # Output only. The latest deployed model's status message (if any). + }, "systemLabels": { # System labels to apply to Model Garden deployments. System labels are managed by Google for internal use only. "a_key": "A String", }, @@ -2720,6 +2768,7 @@Method Details
}, "maxReplicaCount": 42, # Immutable. The maximum number of replicas this DeployedModel may be deployed on when the traffic against it increases. If the requested value is too large, the deployment will error, but if deployment succeeds then the ability to scale the model to that many replicas is guaranteed (barring service outages). If traffic against the DeployedModel increases beyond what its replicas at maximum may handle, a portion of the traffic will be dropped. If this value is not provided, will use min_replica_count as the default value. The value of this field impacts the charge against Vertex CPU and GPU quotas. Specifically, you will be charged for (max_replica_count * number of cores in the selected machine type) and (max_replica_count * number of GPUs per replica in the selected machine type). "minReplicaCount": 42, # Required. Immutable. The minimum number of machine replicas this DeployedModel will be always deployed on. This value must be greater than or equal to 1. If traffic against the DeployedModel increases, it may dynamically be deployed onto more replicas, and as traffic decreases, some of these extra replicas may be freed. + "requiredReplicaCount": 42, # Optional. Number of required available replicas for the deployment to succeed. This field is only needed when partial model deployment/mutation is desired. If set, the model deploy/mutate operation will succeed once available_replica_count reaches required_replica_count, and the rest of the replicas will be retried. If not set, the default required_replica_count will be min_replica_count. "spot": True or False, # Optional. If true, schedule the deployment workload on [spot VMs](https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms). }, "disableContainerLogging": True or False, # For custom-trained Models and AutoML Tabular Models, the container of the DeployedModel instances will send `stderr` and `stdout` streams to Cloud Logging by default. Please note that the logs incur cost, which are subject to [Cloud Logging pricing](https://cloud.google.com/logging/pricing). User can disable container logging by setting this flag to true. @@ -2848,6 +2897,11 @@Method Details
}, "serviceAccount": "A String", # The service account that the DeployedModel's container runs as. Specify the email address of the service account. If this service account is not specified, the container runs as a service account that doesn't have access to the resource project. Users deploying the Model must have the `iam.serviceAccounts.actAs` permission on this service account. "sharedResources": "A String", # The resource name of the shared DeploymentResourcePool to deploy on. Format: `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}` + "status": { # Runtime status of the deployed model. # Output only. Runtime status of the deployed model. + "availableReplicaCount": 42, # Output only. The number of available replicas of the deployed model. + "lastUpdateTime": "A String", # Output only. The time at which the status was last updated. + "message": "A String", # Output only. The latest deployed model's status message (if any). + }, "systemLabels": { # System labels to apply to Model Garden deployments. System labels are managed by Google for internal use only. "a_key": "A String", }, @@ -3208,6 +3262,7 @@Method Details
The object takes the form of: { # Request message for [PredictionService.GenerateContent]. + "cachedContent": "A String", # Optional. The name of the cached content used as context to serve the prediction. Note: only used in explicit caching, where users can have control over caching (e.g. what content to cache) and enjoy guaranteed cost savings. Format: `projects/{project}/locations/{location}/cachedContents/{cachedContent}` "contents": [ # Required. The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request. { # The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. "parts": [ # Required. Ordered `Parts` that constitute a single message. Parts may have different IANA MIME types. @@ -3439,9 +3494,6 @@Method Details
"datastore": "A String", # Required. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` }, "vertexRagStore": { # Retrieve from Vertex RAG Store for grounding. # Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService. - "ragCorpora": [ # Optional. Deprecated. Please use rag_resources instead. - "A String", - ], "ragResources": [ # Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support. { # The definition of the Rag resource. "ragCorpus": "A String", # Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` @@ -3450,6 +3502,14 @@Method Details
], }, ], + "ragRetrievalConfig": { # Specifies the context retrieval config. # Optional. The retrieval config for the Rag query. + "filter": { # Config for filters. # Optional. Config for filters. + "metadataFilter": "A String", # Optional. String for metadata filtering. + "vectorDistanceThreshold": 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold. + "vectorSimilarityThreshold": 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold. + }, + "topK": 42, # Optional. The number of contexts to retrieve. + }, "similarityTopK": 42, # Optional. Number of top k results to return from the selected corpora. "vectorDistanceThreshold": 3.14, # Optional. Only return results with vector distance smaller than the threshold. }, @@ -3610,6 +3670,7 @@Method Details
], }, "usageMetadata": { # Usage metadata about response(s). # Usage metadata about the response(s). + "cachedContentTokenCount": 42, # Output only. Number of tokens in the cached part in the input (the cached content). "candidatesTokenCount": 42, # Number of tokens in the response(s). "promptTokenCount": 42, # Number of tokens in the request. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content. "totalTokenCount": 42, # Total token count for prompt and response candidates. @@ -3748,6 +3809,7 @@Method Details
}, "maxReplicaCount": 42, # Immutable. The maximum number of replicas this DeployedModel may be deployed on when the traffic against it increases. If the requested value is too large, the deployment will error, but if deployment succeeds then the ability to scale the model to that many replicas is guaranteed (barring service outages). If traffic against the DeployedModel increases beyond what its replicas at maximum may handle, a portion of the traffic will be dropped. If this value is not provided, will use min_replica_count as the default value. The value of this field impacts the charge against Vertex CPU and GPU quotas. Specifically, you will be charged for (max_replica_count * number of cores in the selected machine type) and (max_replica_count * number of GPUs per replica in the selected machine type). "minReplicaCount": 42, # Required. Immutable. The minimum number of machine replicas this DeployedModel will be always deployed on. This value must be greater than or equal to 1. If traffic against the DeployedModel increases, it may dynamically be deployed onto more replicas, and as traffic decreases, some of these extra replicas may be freed. + "requiredReplicaCount": 42, # Optional. Number of required available replicas for the deployment to succeed. This field is only needed when partial model deployment/mutation is desired. If set, the model deploy/mutate operation will succeed once available_replica_count reaches required_replica_count, and the rest of the replicas will be retried. If not set, the default required_replica_count will be min_replica_count. "spot": True or False, # Optional. If true, schedule the deployment workload on [spot VMs](https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms). }, "disableContainerLogging": True or False, # For custom-trained Models and AutoML Tabular Models, the container of the DeployedModel instances will send `stderr` and `stdout` streams to Cloud Logging by default. Please note that the logs incur cost, which are subject to [Cloud Logging pricing](https://cloud.google.com/logging/pricing). User can disable container logging by setting this flag to true. @@ -3876,6 +3938,11 @@Method Details
}, "serviceAccount": "A String", # The service account that the DeployedModel's container runs as. Specify the email address of the service account. If this service account is not specified, the container runs as a service account that doesn't have access to the resource project. Users deploying the Model must have the `iam.serviceAccounts.actAs` permission on this service account. "sharedResources": "A String", # The resource name of the shared DeploymentResourcePool to deploy on. Format: `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}` + "status": { # Runtime status of the deployed model. # Output only. Runtime status of the deployed model. + "availableReplicaCount": 42, # Output only. The number of available replicas of the deployed model. + "lastUpdateTime": "A String", # Output only. The time at which the status was last updated. + "message": "A String", # Output only. The latest deployed model's status message (if any). + }, "systemLabels": { # System labels to apply to Model Garden deployments. System labels are managed by Google for internal use only. "a_key": "A String", }, diff --git a/docs/dyn/aiplatform_v1.projects.locations.endpoints.operations.html b/docs/dyn/aiplatform_v1.projects.locations.endpoints.operations.html index 43329eac1a..ae8f4d846e 100644 --- a/docs/dyn/aiplatform_v1.projects.locations.endpoints.operations.html +++ b/docs/dyn/aiplatform_v1.projects.locations.endpoints.operations.html @@ -76,7 +76,7 @@Vertex AI API .
cancel(name, x__xgafv=None)
-Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
+Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.
Close httplib2 connections.
@@ -98,7 +98,7 @@Instance Methods
Method Details
cancel(name, x__xgafv=None)
-Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. +Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`. Args: name: string, The name of the operation resource to be cancelled. (required) diff --git a/docs/dyn/aiplatform_v1.projects.locations.featurestores.entityTypes.features.operations.html b/docs/dyn/aiplatform_v1.projects.locations.featurestores.entityTypes.features.operations.html index 81122a0492..47a26c5759 100644 --- a/docs/dyn/aiplatform_v1.projects.locations.featurestores.entityTypes.features.operations.html +++ b/docs/dyn/aiplatform_v1.projects.locations.featurestores.entityTypes.features.operations.html @@ -76,7 +76,7 @@Vertex AI API .
cancel(name, x__xgafv=None)
-Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
+Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.
Close httplib2 connections.
@@ -98,7 +98,7 @@Instance Methods
Method Details
cancel(name, x__xgafv=None)
-Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. +Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`. Args: name: string, The name of the operation resource to be cancelled. (required) diff --git a/docs/dyn/aiplatform_v1.projects.locations.featurestores.entityTypes.operations.html b/docs/dyn/aiplatform_v1.projects.locations.featurestores.entityTypes.operations.html index a243709363..919561ce85 100644 --- a/docs/dyn/aiplatform_v1.projects.locations.featurestores.entityTypes.operations.html +++ b/docs/dyn/aiplatform_v1.projects.locations.featurestores.entityTypes.operations.html @@ -76,7 +76,7 @@Vertex AI API .
cancel(name, x__xgafv=None)
-Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
+Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.
Close httplib2 connections.
@@ -98,7 +98,7 @@Instance Methods
Method Details
cancel(name, x__xgafv=None)
-Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. +Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`. Args: name: string, The name of the operation resource to be cancelled. (required) diff --git a/docs/dyn/aiplatform_v1.projects.locations.featurestores.operations.html b/docs/dyn/aiplatform_v1.projects.locations.featurestores.operations.html index 8d06ea6daa..95c1f1722a 100644 --- a/docs/dyn/aiplatform_v1.projects.locations.featurestores.operations.html +++ b/docs/dyn/aiplatform_v1.projects.locations.featurestores.operations.html @@ -76,7 +76,7 @@Vertex AI API .
cancel(name, x__xgafv=None)
-Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
+Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.
Close httplib2 connections.
@@ -98,7 +98,7 @@Instance Methods
Method Details
cancel(name, x__xgafv=None)
-Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. +Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`. Args: name: string, The name of the operation resource to be cancelled. (required) diff --git a/docs/dyn/aiplatform_v1.projects.locations.html b/docs/dyn/aiplatform_v1.projects.locations.html index a40900f83f..9fb5beecaf 100644 --- a/docs/dyn/aiplatform_v1.projects.locations.html +++ b/docs/dyn/aiplatform_v1.projects.locations.html @@ -79,6 +79,11 @@Instance Methods
Returns the batchPredictionJobs Resource.
++
+cachedContents()
+Returns the cachedContents Resource.
+ @@ -194,6 +199,11 @@Instance Methods
Returns the publishers Resource.
++
+ragCorpora()
+Returns the ragCorpora Resource.
+ @@ -229,9 +239,15 @@Instance Methods
Returns the tuningJobs Resource.
++
+augmentPrompt(parent, body=None, x__xgafv=None)
Given an input prompt, it returns augmented prompt from vertex rag store to guide LLM towards generating grounded responses.
Close httplib2 connections.
++
+corroborateContent(parent, body=None, x__xgafv=None)
Given an input text, it returns a score that evaluates the factuality of the text. It also extracts and returns claims from the text and provides supporting facts.
evaluateInstances(location, body=None, x__xgafv=None)
Evaluates instances based on a given metric.
@@ -244,12 +260,221 @@Instance Methods
Retrieves the next page of results.
++
+retrieveContexts(parent, body=None, x__xgafv=None)
Retrieves relevant contexts for a query.
Method Details
+++augmentPrompt(parent, body=None, x__xgafv=None)
+Given an input prompt, it returns augmented prompt from vertex rag store to guide LLM towards generating grounded responses. + +Args: + parent: string, Required. The resource name of the Location from which to augment prompt. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for AugmentPrompt. + "contents": [ # Optional. Input content to augment, only text format is supported for now. + { # The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. + "parts": [ # Required. Ordered `Parts` that constitute a single message. Parts may have different IANA MIME types. + { # A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes. + "fileData": { # URI based data. # Optional. URI based data. + "fileUri": "A String", # Required. URI. + "mimeType": "A String", # Required. The IANA standard MIME type of the source data. + }, + "functionCall": { # A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing the parameters and their values. # Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. + "args": { # Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. + "a_key": "", # Properties of the object. + }, + "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name]. + }, + "functionResponse": { # The result output from a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a [FunctionCall] made based on model prediction. # Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. + "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. + "response": { # Required. The function response in JSON object format. Use "output" key to specify function output and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as function output. + "a_key": "", # Properties of the object. + }, + }, + "inlineData": { # Content blob. It's preferred to send as text directly rather than raw bytes. # Optional. Inlined bytes data. + "data": "A String", # Required. Raw bytes. + "mimeType": "A String", # Required. The IANA standard MIME type of the source data. + }, + "text": "A String", # Optional. Text part (can be code). + "videoMetadata": { # Metadata describes the input video content. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data. + "endOffset": "A String", # Optional. The end offset of the video. + "startOffset": "A String", # Optional. The start offset of the video. + }, + }, + ], + "role": "A String", # Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset. + }, + ], + "model": { # Metadata of the backend deployed model. # Optional. Metadata of the backend deployed model. + "model": "A String", # Optional. The model that the user will send the augmented prompt for content generation. + "modelVersion": "A String", # Optional. The model version of the backend deployed model. + }, + "vertexRagStore": { # Retrieve from Vertex RAG Store for grounding. # Optional. Retrieves contexts from the Vertex RagStore. + "ragResources": [ # Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support. + { # The definition of the Rag resource. + "ragCorpus": "A String", # Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + "ragFileIds": [ # Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field. + "A String", + ], + }, + ], + "ragRetrievalConfig": { # Specifies the context retrieval config. # Optional. The retrieval config for the Rag query. + "filter": { # Config for filters. # Optional. Config for filters. + "metadataFilter": "A String", # Optional. String for metadata filtering. + "vectorDistanceThreshold": 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold. + "vectorSimilarityThreshold": 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold. + }, + "topK": 42, # Optional. The number of contexts to retrieve. + }, + "similarityTopK": 42, # Optional. Number of top k results to return from the selected corpora. + "vectorDistanceThreshold": 3.14, # Optional. Only return results with vector distance smaller than the threshold. + }, +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response message for AugmentPrompt. + "augmentedPrompt": [ # Augmented prompt, only text format is supported for now. + { # The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. + "parts": [ # Required. Ordered `Parts` that constitute a single message. Parts may have different IANA MIME types. + { # A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes. + "fileData": { # URI based data. # Optional. URI based data. + "fileUri": "A String", # Required. URI. + "mimeType": "A String", # Required. The IANA standard MIME type of the source data. + }, + "functionCall": { # A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing the parameters and their values. # Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. + "args": { # Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. + "a_key": "", # Properties of the object. + }, + "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name]. + }, + "functionResponse": { # The result output from a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a [FunctionCall] made based on model prediction. # Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. + "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. + "response": { # Required. The function response in JSON object format. Use "output" key to specify function output and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as function output. + "a_key": "", # Properties of the object. + }, + }, + "inlineData": { # Content blob. It's preferred to send as text directly rather than raw bytes. # Optional. Inlined bytes data. + "data": "A String", # Required. Raw bytes. + "mimeType": "A String", # Required. The IANA standard MIME type of the source data. + }, + "text": "A String", # Optional. Text part (can be code). + "videoMetadata": { # Metadata describes the input video content. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data. + "endOffset": "A String", # Optional. The end offset of the video. + "startOffset": "A String", # Optional. The start offset of the video. + }, + }, + ], + "role": "A String", # Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset. + }, + ], + "facts": [ # Retrieved facts from RAG data sources. + { # The fact used in grounding. + "query": "A String", # Query that is used to retrieve this fact. + "score": 3.14, # If present, according to the underlying Vector DB and the selected metric type, the score can be either the distance or the similarity between the query and the fact and its range depends on the metric type. For example, if the metric type is COSINE_DISTANCE, it represents the distance between the query and the fact. The larger the distance, the less relevant the fact is to the query. The range is [0, 2], while 0 means the most relevant and 2 means the least relevant. + "summary": "A String", # If present, the summary/snippet of the fact. + "title": "A String", # If present, it refers to the title of this fact. + "uri": "A String", # If present, this uri links to the source of the fact. + "vectorDistance": 3.14, # If present, the distance between the query vector and this fact vector. + }, + ], +}++close()
Close httplib2 connections.++corroborateContent(parent, body=None, x__xgafv=None)
+Given an input text, it returns a score that evaluates the factuality of the text. It also extracts and returns claims from the text and provides supporting facts. + +Args: + parent: string, Required. The resource name of the Location from which to corroborate text. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for CorroborateContent. + "content": { # The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. # Optional. Input content to corroborate, only text format is supported for now. + "parts": [ # Required. Ordered `Parts` that constitute a single message. Parts may have different IANA MIME types. + { # A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes. + "fileData": { # URI based data. # Optional. URI based data. + "fileUri": "A String", # Required. URI. + "mimeType": "A String", # Required. The IANA standard MIME type of the source data. + }, + "functionCall": { # A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing the parameters and their values. # Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. + "args": { # Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. + "a_key": "", # Properties of the object. + }, + "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name]. + }, + "functionResponse": { # The result output from a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a [FunctionCall] made based on model prediction. # Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. + "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. + "response": { # Required. The function response in JSON object format. Use "output" key to specify function output and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as function output. + "a_key": "", # Properties of the object. + }, + }, + "inlineData": { # Content blob. It's preferred to send as text directly rather than raw bytes. # Optional. Inlined bytes data. + "data": "A String", # Required. Raw bytes. + "mimeType": "A String", # Required. The IANA standard MIME type of the source data. + }, + "text": "A String", # Optional. Text part (can be code). + "videoMetadata": { # Metadata describes the input video content. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data. + "endOffset": "A String", # Optional. The end offset of the video. + "startOffset": "A String", # Optional. The start offset of the video. + }, + }, + ], + "role": "A String", # Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset. + }, + "facts": [ # Optional. Facts used to generate the text can also be used to corroborate the text. + { # The fact used in grounding. + "query": "A String", # Query that is used to retrieve this fact. + "score": 3.14, # If present, according to the underlying Vector DB and the selected metric type, the score can be either the distance or the similarity between the query and the fact and its range depends on the metric type. For example, if the metric type is COSINE_DISTANCE, it represents the distance between the query and the fact. The larger the distance, the less relevant the fact is to the query. The range is [0, 2], while 0 means the most relevant and 2 means the least relevant. + "summary": "A String", # If present, the summary/snippet of the fact. + "title": "A String", # If present, it refers to the title of this fact. + "uri": "A String", # If present, this uri links to the source of the fact. + "vectorDistance": 3.14, # If present, the distance between the query vector and this fact vector. + }, + ], + "parameters": { # Parameters that can be overrided per request. # Optional. Parameters that can be set to override default settings per request. + "citationThreshold": 3.14, # Optional. Only return claims with citation score larger than the threshold. + }, +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response message for CorroborateContent. + "claims": [ # Claims that are extracted from the input content and facts that support the claims. + { # Claim that is extracted from the input text and facts that support it. + "endIndex": 42, # Index in the input text where the claim ends (exclusive). + "factIndexes": [ # Indexes of the facts supporting this claim. + 42, + ], + "score": 3.14, # Confidence score of this corroboration. + "startIndex": 42, # Index in the input text where the claim starts (inclusive). + }, + ], + "corroborationScore": 3.14, # Confidence score of corroborating content. Value is [0,1] with 1 is the most confidence. +}++evaluateInstances(location, body=None, x__xgafv=None)
Evaluates instances based on a given metric. @@ -750,4 +975,60 @@Method Details
++retrieveContexts(parent, body=None, x__xgafv=None)
+Retrieves relevant contexts for a query. + +Args: + parent: string, Required. The resource name of the Location from which to retrieve RagContexts. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for VertexRagService.RetrieveContexts. + "query": { # A query to retrieve relevant contexts. # Required. Single RAG retrieve query. + "ragRetrievalConfig": { # Specifies the context retrieval config. # Optional. The retrieval config for the query. + "filter": { # Config for filters. # Optional. Config for filters. + "metadataFilter": "A String", # Optional. String for metadata filtering. + "vectorDistanceThreshold": 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold. + "vectorSimilarityThreshold": 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold. + }, + "topK": 42, # Optional. The number of contexts to retrieve. + }, + "text": "A String", # Optional. The query in text format to get relevant contexts. + }, + "vertexRagStore": { # The data source for Vertex RagStore. # The data source for Vertex RagStore. + "ragResources": [ # Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support. + { # The definition of the Rag resource. + "ragCorpus": "A String", # Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + "ragFileIds": [ # Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field. + "A String", + ], + }, + ], + "vectorDistanceThreshold": 3.14, # Optional. Only return contexts with vector distance smaller than the threshold. + }, +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response message for VertexRagService.RetrieveContexts. + "contexts": { # Relevant contexts for one query. # The contexts of the query. + "contexts": [ # All its contexts. + { # A context of the query. + "score": 3.14, # According to the underlying Vector DB and the selected metric type, the score can be either the distance or the similarity between the query and the context and its range depends on the metric type. For example, if the metric type is COSINE_DISTANCE, it represents the distance between the query and the context. The larger the distance, the less relevant the context is to the query. The range is [0, 2], while 0 means the most relevant and 2 means the least relevant. + "sourceDisplayName": "A String", # The file display name. + "sourceUri": "A String", # If the file is imported from Cloud Storage or Google Drive, source_uri will be original file URI in Cloud Storage or Google Drive; if file is uploaded, source_uri will be file display name. + "text": "A String", # The text chunk. + }, + ], + }, +}+