rag_corpora
Creates, updates, deletes, gets or lists a rag_corpora
resource.
Overview
Name | rag_corpora |
Type | Resource |
Id | google.aiplatform.rag_corpora |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The resource name of the RagCorpus. |
corpusStatus | object | Output only. RagCorpus state. (id: GoogleCloudAiplatformV1CorpusStatus) |
createTime | string (google-datetime) | Output only. Timestamp when this RagCorpus was created. |
description | string | Optional. The description of the RagCorpus. |
displayName | string | Required. The display name of the RagCorpus. The name can be up to 128 characters long and can consist of any UTF-8 characters. |
encryptionSpec | object | Optional. Immutable. The CMEK key name used to encrypt at-rest data related to this Corpus. Only applicable to RagManagedDb option for Vector DB. This field can only be set at corpus creation time, and cannot be updated or deleted. (id: GoogleCloudAiplatformV1EncryptionSpec) |
updateTime | string (google-datetime) | Output only. Timestamp when this RagCorpus was last updated. |
vectorDbConfig | object | Optional. Immutable. The config for the Vector DBs. (id: GoogleCloudAiplatformV1RagVectorDbConfig) |
vertexAiSearchConfig | object | Optional. Immutable. The config for the Vertex AI Search. (id: GoogleCloudAiplatformV1VertexAiSearchConfig) |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The resource name of the RagCorpus. |
corpusStatus | object | Output only. RagCorpus state. (id: GoogleCloudAiplatformV1CorpusStatus) |
createTime | string (google-datetime) | Output only. Timestamp when this RagCorpus was created. |
description | string | Optional. The description of the RagCorpus. |
displayName | string | Required. The display name of the RagCorpus. The name can be up to 128 characters long and can consist of any UTF-8 characters. |
encryptionSpec | object | Optional. Immutable. The CMEK key name used to encrypt at-rest data related to this Corpus. Only applicable to RagManagedDb option for Vector DB. This field can only be set at corpus creation time, and cannot be updated or deleted. (id: GoogleCloudAiplatformV1EncryptionSpec) |
updateTime | string (google-datetime) | Output only. Timestamp when this RagCorpus was last updated. |
vectorDbConfig | object | Optional. Immutable. The config for the Vector DBs. (id: GoogleCloudAiplatformV1RagVectorDbConfig) |
vertexAiSearchConfig | object | Optional. Immutable. The config for the Vertex AI Search. (id: GoogleCloudAiplatformV1VertexAiSearchConfig) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , ragCorporaId | Gets a RagCorpus. | |
list | select | projectsId , locationsId | pageSize , pageToken | Lists RagCorpora in a Location. |
create | insert | projectsId , locationsId | Creates a RagCorpus. | |
patch | update | projectsId , locationsId , ragCorporaId | Updates a RagCorpus. | |
delete | delete | projectsId , locationsId , ragCorporaId | force | Deletes a RagCorpus. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
locationsId | string | |
projectsId | string | |
ragCorporaId | string | |
force | boolean | |
pageSize | integer (int32) | |
pageToken | string |
SELECT
examples
- get
- list
Gets a RagCorpus.
SELECT
name,
corpusStatus,
createTime,
description,
displayName,
encryptionSpec,
updateTime,
vectorDbConfig,
vertexAiSearchConfig
FROM google.aiplatform.rag_corpora
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND ragCorporaId = '{{ ragCorporaId }}' -- required;
Lists RagCorpora in a Location.
SELECT
name,
corpusStatus,
createTime,
description,
displayName,
encryptionSpec,
updateTime,
vectorDbConfig,
vertexAiSearchConfig
FROM google.aiplatform.rag_corpora
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- create
- Manifest
Creates a RagCorpus.
INSERT INTO google.aiplatform.rag_corpora (
data__vectorDbConfig,
data__vertexAiSearchConfig,
data__displayName,
data__description,
data__encryptionSpec,
projectsId,
locationsId
)
SELECT
'{{ vectorDbConfig }}',
'{{ vertexAiSearchConfig }}',
'{{ displayName }}',
'{{ description }}',
'{{ encryptionSpec }}',
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: rag_corpora
props:
- name: projectsId
value: string
description: Required parameter for the rag_corpora resource.
- name: locationsId
value: string
description: Required parameter for the rag_corpora resource.
- name: vectorDbConfig
value: object
description: >
Optional. Immutable. The config for the Vector DBs.
- name: vertexAiSearchConfig
value: object
description: >
Optional. Immutable. The config for the Vertex AI Search.
- name: displayName
value: string
description: >
Required. The display name of the RagCorpus. The name can be up to 128 characters long and can consist of any UTF-8 characters.
- name: description
value: string
description: >
Optional. The description of the RagCorpus.
- name: encryptionSpec
value: object
description: >
Optional. Immutable. The CMEK key name used to encrypt at-rest data related to this Corpus. Only applicable to RagManagedDb option for Vector DB. This field can only be set at corpus creation time, and cannot be updated or deleted.
UPDATE
examples
- patch
Updates a RagCorpus.
UPDATE google.aiplatform.rag_corpora
SET
data__vectorDbConfig = '{{ vectorDbConfig }}',
data__vertexAiSearchConfig = '{{ vertexAiSearchConfig }}',
data__displayName = '{{ displayName }}',
data__description = '{{ description }}',
data__encryptionSpec = '{{ encryptionSpec }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND ragCorporaId = '{{ ragCorporaId }}' --required
RETURNING
name,
done,
error,
metadata,
response;
DELETE
examples
- delete
Deletes a RagCorpus.
DELETE FROM google.aiplatform.rag_corpora
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND ragCorporaId = '{{ ragCorporaId }}' --required
AND force = '{{ force }}';