Full name: projects.locations.reasoningEngines.memories.generate
Generate memories.
Endpoint
posthttps://{service-endpoint}/v1beta1/{parent}/memories:generate
Where {service-endpoint} is one of the supported service endpoints.
Path parameters
parentstring
Required. The resource name of the ReasoningEngine to generate memories for. Format: projects/{project}/locations/{location}/reasoningEngines/{reasoningEngine}
Request body
The request body contains data with the following structure:
disableConsolidationboolean
Optional. If true, generated memories will not be consolidated with existing memories; all generated memories will be added as new memories regardless of whether they are duplicates of or contradictory to existing memories. By default, memory consolidation is enabled.
scopemap (key: string, value: string)
Optional. The scope of the memories that should be generated. Memories will be consolidated across memories with the same scope. Must be provided unless the scope is defined in the source content. If scope is provided, it will override the scope defined in the source content. scope values cannot contain the wildcard character '*'.
sourceUnion type
source can be only one of the following:Defines a Vertex Session as the source content from which to generate memories.
Defines a direct source of content as the source content from which to generate memories.
Defines a direct source of memories that should be uploaded to Memory Bank. This is similar to memories.create, but it allows for consolidation between these new memories and existing memories for the same scope.
revision_expirationUnion type
MemoryBankConfig.memory_revision_default_ttl or the global default, 365 days. revision_expiration can be only one of the following:Optional. timestamp of when the revision is considered expired. If not set, the memory revision will be kept until manually deleted.
Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".
Optional. The TTL for the revision. The expiration time is computed: now + TTL.
A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
Response body
If successful, the response body contains an instance of Operation.
VertexSessionSource
Defines an Agent Engine Session from which to generate the memories. If scope is not provided, the scope will be extracted from the Session (i.e. {"userId": sesison.user_id}).
sessionstring
Required. The resource name of the Session to generate memories for. Format: projects/{project}/locations/{location}/reasoningEngines/{reasoningEngine}/sessions/{session}
Optional. time range to define which session events should be used to generate memories. Start time (inclusive) of the time range. If not set, the start time is unbounded.
Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".
Optional. End time (exclusive) of the time range. If not set, the end time is unbounded.
Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".
| JSON representation |
|---|
{ "session": string, "startTime": string, "endTime": string } |
DirectContentsSource
Event
DirectMemoriesSource
Defines a direct source of memories that should be uploaded to Memory Bank with consolidation.
Required. The direct memories to upload to Memory Bank. At most 5 direct memories are allowed per request.
| JSON representation |
|---|
{
"directMemories": [
{
object ( |
DirectMemory
A direct memory to upload to Memory Bank.
factstring
Required. The fact to consolidate with existing memories.
| JSON representation |
|---|
{ "fact": string } |