Method: memories.generate

Full name: projects.locations.reasoningEngines.memories.generate

Generate memories.

Endpoint

post https://aiplatform.googleapis.com/v1beta1/{parent}/memories:generate

Path parameters

parent string

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:

Fields
disableConsolidation boolean

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.

scope map (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 '*'.

source Union type
Source content used to generate memories. source can be only one of the following:
vertexSessionSource object (VertexSessionSource)

Defines a Vertex Session as the source content from which to generate memories.

directContentsSource object (DirectContentsSource)

Defines a direct source of content as the source content from which to generate memories.

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}).

Fields
session string

Required. The resource name of the Session to generate memories for. Format: projects/{project}/locations/{location}/reasoningEngines/{reasoningEngine}/sessions/{session}

startTime string (Timestamp format)

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 uses 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".

endTime string (Timestamp format)

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 uses 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

Defines a direct source of content from which to generate the memories.

Fields
events[] object (Event)

Required. The source content (i.e. chat history) to generate memories from.

JSON representation
{
  "events": [
    {
      object (Event)
    }
  ]
}

Event

A single piece of conversation from which to generate memories.

Fields
content object (Content)

Required. A single piece of content from which to generate memories.

JSON representation
{
  "content": {
    object (Content)
  }
}