memories
Creates, updates, deletes, gets or lists a memories resource.
Overview
| Name | memories |
| Type | Resource |
| Id | google.aiplatform.memories |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. The resource name of the Memory. Format: projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}/memories/{memory} |
createTime | string (google-datetime) | Output only. Timestamp when this Memory was created. |
description | string | Optional. Description of the Memory. |
disableMemoryRevisions | boolean | Optional. Input only. If true, no revision will be created for this request. |
displayName | string | Optional. Display name of the Memory. |
expireTime | string (google-datetime) | Optional. Timestamp of when this resource is considered expired. This is always provided on output when expiration is set on input, regardless of whether expire_time or ttl was provided. |
fact | string | Required. Semantic knowledge extracted from the source content. |
revisionExpireTime | string (google-datetime) | Optional. Input only. Timestamp of when the revision is considered expired. If not set, the memory revision will be kept until manually deleted. |
revisionLabels | object | Optional. Input only. The labels to apply to the Memory Revision created as a result of this request. |
revisionTtl | string (google-duration) | Optional. Input only. The TTL for the revision. The expiration time is computed: now + TTL. |
scope | object | Required. Immutable. The scope of the Memory. Memories are isolated within their scope. The scope is defined when creating or generating memories. Scope values cannot contain the wildcard character '*'. |
topics | array | Optional. The Topics of the Memory. |
ttl | string (google-duration) | Optional. Input only. The TTL for this resource. The expiration time is computed: now + TTL. |
updateTime | string (google-datetime) | Output only. Timestamp when this Memory was most recently updated. |
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. The resource name of the Memory. Format: projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}/memories/{memory} |
createTime | string (google-datetime) | Output only. Timestamp when this Memory was created. |
description | string | Optional. Description of the Memory. |
disableMemoryRevisions | boolean | Optional. Input only. If true, no revision will be created for this request. |
displayName | string | Optional. Display name of the Memory. |
expireTime | string (google-datetime) | Optional. Timestamp of when this resource is considered expired. This is always provided on output when expiration is set on input, regardless of whether expire_time or ttl was provided. |
fact | string | Required. Semantic knowledge extracted from the source content. |
revisionExpireTime | string (google-datetime) | Optional. Input only. Timestamp of when the revision is considered expired. If not set, the memory revision will be kept until manually deleted. |
revisionLabels | object | Optional. Input only. The labels to apply to the Memory Revision created as a result of this request. |
revisionTtl | string (google-duration) | Optional. Input only. The TTL for the revision. The expiration time is computed: now + TTL. |
scope | object | Required. Immutable. The scope of the Memory. Memories are isolated within their scope. The scope is defined when creating or generating memories. Scope values cannot contain the wildcard character '*'. |
topics | array | Optional. The Topics of the Memory. |
ttl | string (google-duration) | Optional. Input only. The TTL for this resource. The expiration time is computed: now + TTL. |
updateTime | string (google-datetime) | Output only. Timestamp when this Memory was most recently updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, reasoningEnginesId, memoriesId | Get a Memory. | |
list | select | projectsId, locationsId, reasoningEnginesId | pageToken, orderBy, pageSize, filter | List Memories. |
create | insert | projectsId, locationsId, reasoningEnginesId | Create a Memory. | |
patch | update | projectsId, locationsId, reasoningEnginesId, memoriesId | updateMask | Update a Memory. |
delete | delete | projectsId, locationsId, reasoningEnginesId, memoriesId | Delete a Memory. | |
rollback | exec | projectsId, locationsId, reasoningEnginesId, memoriesId | Rollback Memory to a specific revision. | |
retrieve | exec | projectsId, locationsId, reasoningEnginesId | Retrieve memories. | |
generate | exec | projectsId, locationsId, reasoningEnginesId | Generate memories. | |
purge | exec | projectsId, locationsId, reasoningEnginesId | Purge memories. |
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 | |
memoriesId | string | |
projectsId | string | |
reasoningEnginesId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT examples
- get
- list
Get a Memory.
SELECT
name,
createTime,
description,
disableMemoryRevisions,
displayName,
expireTime,
fact,
revisionExpireTime,
revisionLabels,
revisionTtl,
scope,
topics,
ttl,
updateTime
FROM google.aiplatform.memories
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND reasoningEnginesId = '{{ reasoningEnginesId }}' -- required
AND memoriesId = '{{ memoriesId }}' -- required
;
List Memories.
SELECT
name,
createTime,
description,
disableMemoryRevisions,
displayName,
expireTime,
fact,
revisionExpireTime,
revisionLabels,
revisionTtl,
scope,
topics,
ttl,
updateTime
FROM google.aiplatform.memories
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND reasoningEnginesId = '{{ reasoningEnginesId }}' -- required
AND pageToken = '{{ pageToken }}'
AND orderBy = '{{ orderBy }}'
AND pageSize = '{{ pageSize }}'
AND filter = '{{ filter }}'
;
INSERT examples
- create
- Manifest
Create a Memory.
INSERT INTO google.aiplatform.memories (
data__expireTime,
data__disableMemoryRevisions,
data__revisionExpireTime,
data__name,
data__revisionTtl,
data__ttl,
data__fact,
data__displayName,
data__topics,
data__scope,
data__description,
data__revisionLabels,
projectsId,
locationsId,
reasoningEnginesId
)
SELECT
'{{ expireTime }}',
{{ disableMemoryRevisions }},
'{{ revisionExpireTime }}',
'{{ name }}',
'{{ revisionTtl }}',
'{{ ttl }}',
'{{ fact }}',
'{{ displayName }}',
'{{ topics }}',
'{{ scope }}',
'{{ description }}',
'{{ revisionLabels }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ reasoningEnginesId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: memories
props:
- name: projectsId
value: string
description: Required parameter for the memories resource.
- name: locationsId
value: string
description: Required parameter for the memories resource.
- name: reasoningEnginesId
value: string
description: Required parameter for the memories resource.
- name: expireTime
value: string
description: >
Optional. Timestamp of when this resource is considered expired. This is *always* provided on output when `expiration` is set on input, regardless of whether `expire_time` or `ttl` was provided.
- name: disableMemoryRevisions
value: boolean
description: >
Optional. Input only. If true, no revision will be created for this request.
- name: revisionExpireTime
value: string
description: >
Optional. Input only. Timestamp of when the revision is considered expired. If not set, the memory revision will be kept until manually deleted.
- name: name
value: string
description: >
Identifier. The resource name of the Memory. Format: `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}/memories/{memory}`
- name: revisionTtl
value: string
description: >
Optional. Input only. The TTL for the revision. The expiration time is computed: now + TTL.
- name: ttl
value: string
description: >
Optional. Input only. The TTL for this resource. The expiration time is computed: now + TTL.
- name: fact
value: string
description: >
Required. Semantic knowledge extracted from the source content.
- name: displayName
value: string
description: >
Optional. Display name of the Memory.
- name: topics
value: array
description: >
Optional. The Topics of the Memory.
- name: scope
value: object
description: >
Required. Immutable. The scope of the Memory. Memories are isolated within their scope. The scope is defined when creating or generating memories. Scope values cannot contain the wildcard character '*'.
- name: description
value: string
description: >
Optional. Description of the Memory.
- name: revisionLabels
value: object
description: >
Optional. Input only. The labels to apply to the Memory Revision created as a result of this request.
UPDATE examples
- patch
Update a Memory.
UPDATE google.aiplatform.memories
SET
data__expireTime = '{{ expireTime }}',
data__disableMemoryRevisions = {{ disableMemoryRevisions }},
data__revisionExpireTime = '{{ revisionExpireTime }}',
data__name = '{{ name }}',
data__revisionTtl = '{{ revisionTtl }}',
data__ttl = '{{ ttl }}',
data__fact = '{{ fact }}',
data__displayName = '{{ displayName }}',
data__topics = '{{ topics }}',
data__scope = '{{ scope }}',
data__description = '{{ description }}',
data__revisionLabels = '{{ revisionLabels }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND reasoningEnginesId = '{{ reasoningEnginesId }}' --required
AND memoriesId = '{{ memoriesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE examples
- delete
Delete a Memory.
DELETE FROM google.aiplatform.memories
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND reasoningEnginesId = '{{ reasoningEnginesId }}' --required
AND memoriesId = '{{ memoriesId }}' --required
;
Lifecycle Methods
- rollback
- retrieve
- generate
- purge
Rollback Memory to a specific revision.
EXEC google.aiplatform.memories.rollback
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@reasoningEnginesId='{{ reasoningEnginesId }}' --required,
@memoriesId='{{ memoriesId }}' --required
@@json=
'{
"targetRevisionId": "{{ targetRevisionId }}"
}'
;
Retrieve memories.
EXEC google.aiplatform.memories.retrieve
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@reasoningEnginesId='{{ reasoningEnginesId }}' --required
@@json=
'{
"simpleRetrievalParams": "{{ simpleRetrievalParams }}",
"similaritySearchParams": "{{ similaritySearchParams }}",
"scope": "{{ scope }}",
"filter": "{{ filter }}"
}'
;
Generate memories.
EXEC google.aiplatform.memories.generate
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@reasoningEnginesId='{{ reasoningEnginesId }}' --required
@@json=
'{
"revisionTtl": "{{ revisionTtl }}",
"scope": "{{ scope }}",
"directMemoriesSource": "{{ directMemoriesSource }}",
"vertexSessionSource": "{{ vertexSessionSource }}",
"revisionLabels": "{{ revisionLabels }}",
"directContentsSource": "{{ directContentsSource }}",
"revisionExpireTime": "{{ revisionExpireTime }}",
"disableMemoryRevisions": {{ disableMemoryRevisions }},
"disableConsolidation": {{ disableConsolidation }}
}'
;
Purge memories.
EXEC google.aiplatform.memories.purge
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@reasoningEnginesId='{{ reasoningEnginesId }}' --required
@@json=
'{
"filter": "{{ filter }}",
"force": {{ force }}
}'
;