diff --git a/src/converters/_memories_converters.ts b/src/converters/_memories_converters.ts index 4afc52a2..7ec039ef 100644 --- a/src/converters/_memories_converters.ts +++ b/src/converters/_memories_converters.ts @@ -361,6 +361,11 @@ export function memoryConfigToVertex( common.setValueByPath(parentObject, ['_query', 'memoryId'], fromMemoryId); } + const fromContext = common.getValueByPath(fromObject, ['context']); + if (parentObject !== undefined && fromContext != null) { + common.setValueByPath(parentObject, ['context'], fromContext); + } + return toObject; } @@ -585,6 +590,11 @@ export function updateMemoryConfigToVertex( common.setValueByPath(parentObject, ['_query', 'memoryId'], fromMemoryId); } + const fromContext = common.getValueByPath(fromObject, ['context']); + if (parentObject !== undefined && fromContext != null) { + common.setValueByPath(parentObject, ['context'], fromContext); + } + const fromUpdateMask = common.getValueByPath(fromObject, ['updateMask']); if (parentObject !== undefined && fromUpdateMask != null) { common.setValueByPath( diff --git a/src/types/common.ts b/src/types/common.ts index 2dec0cc4..c91505f5 100644 --- a/src/types/common.ts +++ b/src/types/common.ts @@ -1627,6 +1627,8 @@ export declare interface MemoryConfig { metadata?: Record; /** Optional. The user defined ID to use for memory, which will become the final component of the memory resource name. If not provided, Vertex AI will generate a value for this ID. This value may be up to 63 characters, and valid characters are `[a-z0-9-]`. The first character must be a letter, and the last character must be a letter or number. */ memoryId?: string; + /** Optional. Represents the context of the memory. */ + context?: string; } /** Parameters for creating Memories. */ @@ -2167,6 +2169,8 @@ export declare interface UpdateMemoryConfig { metadata?: Record; /** Optional. The user defined ID to use for memory, which will become the final component of the memory resource name. If not provided, Vertex AI will generate a value for this ID. This value may be up to 63 characters, and valid characters are `[a-z0-9-]`. The first character must be a letter, and the last character must be a letter or number. */ memoryId?: string; + /** Optional. Represents the context of the memory. */ + context?: string; /** The update mask to apply. For the `FieldMask` definition, see https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask. */ updateMask?: string;