| 1 |
<html><body> |
| 2 |
<style> |
| 3 |
|
| 4 |
body, h1, h2, h3, div, span, p, pre, a { |
| 5 |
margin: 0; |
| 6 |
padding: 0; |
| 7 |
border: 0; |
| 8 |
font-weight: inherit; |
| 9 |
font-style: inherit; |
| 10 |
font-size: 100%; |
| 11 |
font-family: inherit; |
| 12 |
vertical-align: baseline; |
| 13 |
} |
| 14 |
|
| 15 |
body { |
| 16 |
font-size: 13px; |
| 17 |
padding: 1em; |
| 18 |
} |
| 19 |
|
| 20 |
h1 { |
| 21 |
font-size: 26px; |
| 22 |
margin-bottom: 1em; |
| 23 |
} |
| 24 |
|
| 25 |
h2 { |
| 26 |
font-size: 24px; |
| 27 |
margin-bottom: 1em; |
| 28 |
} |
| 29 |
|
| 30 |
h3 { |
| 31 |
font-size: 20px; |
| 32 |
margin-bottom: 1em; |
| 33 |
margin-top: 1em; |
| 34 |
} |
| 35 |
|
| 36 |
pre, code { |
| 37 |
line-height: 1.5; |
| 38 |
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 |
} |
| 40 |
|
| 41 |
pre { |
| 42 |
margin-top: 0.5em; |
| 43 |
} |
| 44 |
|
| 45 |
h1, h2, h3, p { |
| 46 |
font-family: Arial, sans serif; |
| 47 |
} |
| 48 |
|
| 49 |
h1, h2, h3 { |
| 50 |
border-bottom: solid #CCC 1px; |
| 51 |
} |
| 52 |
|
| 53 |
.toc_element { |
| 54 |
margin-top: 0.5em; |
| 55 |
} |
| 56 |
|
| 57 |
.firstline { |
| 58 |
margin-left: 2 em; |
| 59 |
} |
| 60 |
|
| 61 |
.method { |
| 62 |
margin-top: 1em; |
| 63 |
border: solid 1px #CCC; |
| 64 |
padding: 1em; |
| 65 |
background: #EEE; |
| 66 |
} |
| 67 |
|
| 68 |
.details { |
| 69 |
font-weight: bold; |
| 70 |
font-size: 14px; |
| 71 |
} |
| 72 |
|
| 73 |
</style> |
| 74 |
|
| 75 |
<h1><a href="aiplatform_v1.html">Agent Platform API</a> . <a href="aiplatform_v1.media.html">media</a></h1> |
| 76 |
<h2>Instance Methods</h2> |
| 77 |
<p class="toc_element"> |
| 78 |
<code><a href="#close">close()</a></code></p> |
| 79 |
<p class="firstline">Close httplib2 connections.</p> |
| 80 |
<p class="toc_element"> |
| 81 |
<code><a href="#upload">upload(parent, body=None, media_body=None, media_mime_type=None, x__xgafv=None)</a></code></p> |
| 82 |
<p class="firstline">Upload a file into a RagCorpus.</p> |
| 83 |
<h3>Method Details</h3> |
| 84 |
<div class="method"> |
| 85 |
<code class="details" id="close">close()</code> |
| 86 |
<pre>Close httplib2 connections.</pre> |
| 87 |
</div> |
| 88 |
|
| 89 |
<div class="method"> |
| 90 |
<code class="details" id="upload">upload(parent, body=None, media_body=None, media_mime_type=None, x__xgafv=None)</code> |
| 91 |
<pre>Upload a file into a RagCorpus. |
| 92 |
|
| 93 |
Args: |
| 94 |
parent: string, Required. The name of the RagCorpus resource into which to upload the file. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` (required) |
| 95 |
body: object, The request body. |
| 96 |
The object takes the form of: |
| 97 |
|
| 98 |
{ # Request message for VertexRagDataService.UploadRagFile. |
| 99 |
"ragFile": { # A RagFile contains user data for chunking, embedding and indexing. # Required. The RagFile to upload. |
| 100 |
"createTime": "A String", # Output only. Timestamp when this RagFile was created. |
| 101 |
"description": "A String", # Optional. The description of the RagFile. |
| 102 |
"directUploadSource": { # The input content is encapsulated and uploaded in the request. # Output only. The RagFile is encapsulated and uploaded in the UploadRagFile request. |
| 103 |
}, |
| 104 |
"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. |
| 105 |
"fileStatus": { # RagFile status. # Output only. State of the RagFile. |
| 106 |
"errorStatus": "A String", # Output only. Only when the `state` field is ERROR. |
| 107 |
"state": "A String", # Output only. RagFile state. |
| 108 |
}, |
| 109 |
"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. |
| 110 |
"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/wildcards. |
| 111 |
"A String", |
| 112 |
], |
| 113 |
}, |
| 114 |
"googleDriveSource": { # The Google Drive location for the input content. # Output only. Google Drive location. Supports importing individual files as well as Google Drive folders. |
| 115 |
"resourceIds": [ # Required. Google Drive resource IDs. |
| 116 |
{ # The type and ID of the Google Drive resource. |
| 117 |
"resourceId": "A String", # Required. The ID of the Google Drive resource. |
| 118 |
"resourceType": "A String", # Required. The type of the Google Drive resource. |
| 119 |
}, |
| 120 |
], |
| 121 |
}, |
| 122 |
"jiraSource": { # The Jira source for the ImportRagFilesRequest. # The RagFile is imported from a Jira query. |
| 123 |
"jiraQueries": [ # Required. The Jira queries. |
| 124 |
{ # JiraQueries contains the Jira queries and corresponding authentication. |
| 125 |
"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/). |
| 126 |
"apiKeySecretVersion": "A String", # Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version} |
| 127 |
"apiKeyString": "A String", # The API key string. Either this or `api_key_secret_version` must be set. |
| 128 |
}, |
| 129 |
"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/ |
| 130 |
"A String", |
| 131 |
], |
| 132 |
"email": "A String", # Required. The Jira email address. |
| 133 |
"projects": [ # A list of Jira projects to import in their entirety. |
| 134 |
"A String", |
| 135 |
], |
| 136 |
"serverUri": "A String", # Required. The Jira server URI. |
| 137 |
}, |
| 138 |
], |
| 139 |
}, |
| 140 |
"name": "A String", # Output only. The resource name of the RagFile. |
| 141 |
"sharePointSources": { # The SharePointSources to pass to ImportRagFiles. # The RagFile is imported from a SharePoint source. |
| 142 |
"sharePointSources": [ # The SharePoint sources. |
| 143 |
{ # An individual SharePointSource. |
| 144 |
"clientId": "A String", # The Application ID for the app registered in Microsoft Azure Portal. The application must also be configured with MS Graph permissions "Files.ReadAll", "Sites.ReadAll" and BrowserSiteLists.Read.All. |
| 145 |
"clientSecret": { # The API secret. # The application secret for the app registered in Azure. |
| 146 |
"apiKeySecretVersion": "A String", # Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version} |
| 147 |
"apiKeyString": "A String", # The API key string. Either this or `api_key_secret_version` must be set. |
| 148 |
}, |
| 149 |
"driveId": "A String", # The ID of the drive to download from. |
| 150 |
"driveName": "A String", # The name of the drive to download from. |
| 151 |
"fileId": "A String", # Output only. The SharePoint file id. Output only. |
| 152 |
"sharepointFolderId": "A String", # The ID of the SharePoint folder to download from. |
| 153 |
"sharepointFolderPath": "A String", # The path of the SharePoint folder to download from. |
| 154 |
"sharepointSiteName": "A String", # The name of the SharePoint site to download from. This can be the site name or the site id. |
| 155 |
"tenantId": "A String", # Unique identifier of the Azure Active Directory Instance. |
| 156 |
}, |
| 157 |
], |
| 158 |
}, |
| 159 |
"slackSource": { # The Slack source for the ImportRagFilesRequest. # The RagFile is imported from a Slack channel. |
| 160 |
"channels": [ # Required. The Slack channels. |
| 161 |
{ # SlackChannels contains the Slack channels and corresponding access token. |
| 162 |
"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. |
| 163 |
"apiKeySecretVersion": "A String", # Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version} |
| 164 |
"apiKeyString": "A String", # The API key string. Either this or `api_key_secret_version` must be set. |
| 165 |
}, |
| 166 |
"channels": [ # Required. The Slack channel IDs. |
| 167 |
{ # SlackChannel contains the Slack channel ID and the time range to import. |
| 168 |
"channelId": "A String", # Required. The Slack channel ID. |
| 169 |
"endTime": "A String", # Optional. The ending timestamp for messages to import. |
| 170 |
"startTime": "A String", # Optional. The starting timestamp for messages to import. |
| 171 |
}, |
| 172 |
], |
| 173 |
}, |
| 174 |
], |
| 175 |
}, |
| 176 |
"updateTime": "A String", # Output only. Timestamp when this RagFile was last updated. |
| 177 |
"userMetadata": "A String", # Output only. The metadata for metadata search. The user_metadata Needs to be in JSON format. |
| 178 |
}, |
| 179 |
"uploadRagFileConfig": { # Config for uploading RagFile. # Required. The config for the RagFiles to be uploaded into the RagCorpus. VertexRagDataService.UploadRagFile. |
| 180 |
"ragFileTransformationConfig": { # Specifies the transformation config for RagFiles. # Specifies the transformation config for RagFiles. |
| 181 |
"ragFileChunkingConfig": { # Specifies the size and overlap of chunks for RagFiles. # Specifies the chunking config for RagFiles. |
| 182 |
"fixedLengthChunking": { # Specifies the fixed length chunking config. # Specifies the fixed length chunking config. |
| 183 |
"chunkOverlap": 42, # The overlap between chunks. |
| 184 |
"chunkSize": 42, # The size of the chunks. |
| 185 |
}, |
| 186 |
}, |
| 187 |
}, |
| 188 |
}, |
| 189 |
} |
| 190 |
|
| 191 |
media_body: string, The filename of the media request body, or an instance of a MediaUpload object. |
| 192 |
media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object. |
| 193 |
x__xgafv: string, V1 error format. |
| 194 |
Allowed values |
| 195 |
1 - v1 error format |
| 196 |
2 - v2 error format |
| 197 |
|
| 198 |
Returns: |
| 199 |
An object of the form: |
| 200 |
|
| 201 |
{ # Response message for VertexRagDataService.UploadRagFile. |
| 202 |
"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. |
| 203 |
"code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 204 |
"details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. |
| 205 |
{ |
| 206 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 207 |
}, |
| 208 |
], |
| 209 |
"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. |
| 210 |
}, |
| 211 |
"ragFile": { # A RagFile contains user data for chunking, embedding and indexing. # The RagFile that had been uploaded into the RagCorpus. |
| 212 |
"createTime": "A String", # Output only. Timestamp when this RagFile was created. |
| 213 |
"description": "A String", # Optional. The description of the RagFile. |
| 214 |
"directUploadSource": { # The input content is encapsulated and uploaded in the request. # Output only. The RagFile is encapsulated and uploaded in the UploadRagFile request. |
| 215 |
}, |
| 216 |
"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. |
| 217 |
"fileStatus": { # RagFile status. # Output only. State of the RagFile. |
| 218 |
"errorStatus": "A String", # Output only. Only when the `state` field is ERROR. |
| 219 |
"state": "A String", # Output only. RagFile state. |
| 220 |
}, |
| 221 |
"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. |
| 222 |
"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/wildcards. |
| 223 |
"A String", |
| 224 |
], |
| 225 |
}, |
| 226 |
"googleDriveSource": { # The Google Drive location for the input content. # Output only. Google Drive location. Supports importing individual files as well as Google Drive folders. |
| 227 |
"resourceIds": [ # Required. Google Drive resource IDs. |
| 228 |
{ # The type and ID of the Google Drive resource. |
| 229 |
"resourceId": "A String", # Required. The ID of the Google Drive resource. |
| 230 |
"resourceType": "A String", # Required. The type of the Google Drive resource. |
| 231 |
}, |
| 232 |
], |
| 233 |
}, |
| 234 |
"jiraSource": { # The Jira source for the ImportRagFilesRequest. # The RagFile is imported from a Jira query. |
| 235 |
"jiraQueries": [ # Required. The Jira queries. |
| 236 |
{ # JiraQueries contains the Jira queries and corresponding authentication. |
| 237 |
"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/). |
| 238 |
"apiKeySecretVersion": "A String", # Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version} |
| 239 |
"apiKeyString": "A String", # The API key string. Either this or `api_key_secret_version` must be set. |
| 240 |
}, |
| 241 |
"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/ |
| 242 |
"A String", |
| 243 |
], |
| 244 |
"email": "A String", # Required. The Jira email address. |
| 245 |
"projects": [ # A list of Jira projects to import in their entirety. |
| 246 |
"A String", |
| 247 |
], |
| 248 |
"serverUri": "A String", # Required. The Jira server URI. |
| 249 |
}, |
| 250 |
], |
| 251 |
}, |
| 252 |
"name": "A String", # Output only. The resource name of the RagFile. |
| 253 |
"sharePointSources": { # The SharePointSources to pass to ImportRagFiles. # The RagFile is imported from a SharePoint source. |
| 254 |
"sharePointSources": [ # The SharePoint sources. |
| 255 |
{ # An individual SharePointSource. |
| 256 |
"clientId": "A String", # The Application ID for the app registered in Microsoft Azure Portal. The application must also be configured with MS Graph permissions "Files.ReadAll", "Sites.ReadAll" and BrowserSiteLists.Read.All. |
| 257 |
"clientSecret": { # The API secret. # The application secret for the app registered in Azure. |
| 258 |
"apiKeySecretVersion": "A String", # Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version} |
| 259 |
"apiKeyString": "A String", # The API key string. Either this or `api_key_secret_version` must be set. |
| 260 |
}, |
| 261 |
"driveId": "A String", # The ID of the drive to download from. |
| 262 |
"driveName": "A String", # The name of the drive to download from. |
| 263 |
"fileId": "A String", # Output only. The SharePoint file id. Output only. |
| 264 |
"sharepointFolderId": "A String", # The ID of the SharePoint folder to download from. |
| 265 |
"sharepointFolderPath": "A String", # The path of the SharePoint folder to download from. |
| 266 |
"sharepointSiteName": "A String", # The name of the SharePoint site to download from. This can be the site name or the site id. |
| 267 |
"tenantId": "A String", # Unique identifier of the Azure Active Directory Instance. |
| 268 |
}, |
| 269 |
], |
| 270 |
}, |
| 271 |
"slackSource": { # The Slack source for the ImportRagFilesRequest. # The RagFile is imported from a Slack channel. |
| 272 |
"channels": [ # Required. The Slack channels. |
| 273 |
{ # SlackChannels contains the Slack channels and corresponding access token. |
| 274 |
"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. |
| 275 |
"apiKeySecretVersion": "A String", # Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version} |
| 276 |
"apiKeyString": "A String", # The API key string. Either this or `api_key_secret_version` must be set. |
| 277 |
}, |
| 278 |
"channels": [ # Required. The Slack channel IDs. |
| 279 |
{ # SlackChannel contains the Slack channel ID and the time range to import. |
| 280 |
"channelId": "A String", # Required. The Slack channel ID. |
| 281 |
"endTime": "A String", # Optional. The ending timestamp for messages to import. |
| 282 |
"startTime": "A String", # Optional. The starting timestamp for messages to import. |
| 283 |
}, |
| 284 |
], |
| 285 |
}, |
| 286 |
], |
| 287 |
}, |
| 288 |
"updateTime": "A String", # Output only. Timestamp when this RagFile was last updated. |
| 289 |
"userMetadata": "A String", # Output only. The metadata for metadata search. The user_metadata Needs to be in JSON format. |
| 290 |
}, |
| 291 |
}</pre> |
| 292 |
</div> |
| 293 |
|
| 294 |
</body></html> |