Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/converters/_memories_converters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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(
Expand Down
4 changes: 4 additions & 0 deletions src/types/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1627,6 +1627,8 @@ export declare interface MemoryConfig {
metadata?: Record<string, MemoryMetadataValue>;
/** 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. */
Expand Down Expand Up @@ -2167,6 +2169,8 @@ export declare interface UpdateMemoryConfig {
metadata?: Record<string, MemoryMetadataValue>;
/** 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;
Expand Down
Loading