Skip to content
Closed
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
6 changes: 6 additions & 0 deletions agentplatform/_genai/memories.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,9 @@ def _MemoryConfig_to_vertex(
if getv(from_object, ["memory_id"]) is not None:
setv(parent_object, ["_query", "memoryId"], getv(from_object, ["memory_id"]))

if getv(from_object, ["context"]) is not None:
setv(parent_object, ["context"], getv(from_object, ["context"]))

return to_object


Expand Down Expand Up @@ -448,6 +451,9 @@ def _UpdateMemoryConfig_to_vertex(
if getv(from_object, ["memory_id"]) is not None:
setv(parent_object, ["_query", "memoryId"], getv(from_object, ["memory_id"]))

if getv(from_object, ["context"]) is not None:
setv(parent_object, ["context"], getv(from_object, ["context"]))

if getv(from_object, ["update_mask"]) is not None:
setv(
parent_object, ["_query", "updateMask"], getv(from_object, ["update_mask"])
Expand Down
12 changes: 12 additions & 0 deletions agentplatform/_genai/types/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -11412,6 +11412,9 @@ class MemoryConfig(_common.BaseModel):
default=None,
description="""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.""",
)
context: Optional[str] = Field(
default=None, description="""Optional. Represents the context of the memory."""
)


class MemoryConfigDict(TypedDict, total=False):
Expand Down Expand Up @@ -11455,6 +11458,9 @@ class MemoryConfigDict(TypedDict, total=False):
memory_id: Optional[str]
"""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."""

context: Optional[str]
"""Optional. Represents the context of the memory."""


MemoryConfigOrDict = Union[MemoryConfig, MemoryConfigDict]

Expand Down Expand Up @@ -12979,6 +12985,9 @@ class UpdateMemoryConfig(_common.BaseModel):
default=None,
description="""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.""",
)
context: Optional[str] = Field(
default=None, description="""Optional. Represents the context of the memory."""
)
update_mask: Optional[str] = Field(
default=None,
description="""The update mask to apply. For the `FieldMask` definition, see
Expand Down Expand Up @@ -13027,6 +13036,9 @@ class UpdateMemoryConfigDict(TypedDict, total=False):
memory_id: Optional[str]
"""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."""

context: Optional[str]
"""Optional. Represents the context of the memory."""

update_mask: Optional[str]
"""The update mask to apply. For the `FieldMask` definition, see
https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask."""
Expand Down
Loading