Class MemoryEntry.Builder
java.lang.Object
com.google.adk.memory.MemoryEntry.Builder
- Enclosing class:
MemoryEntry
Builder for
MemoryEntry.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract MemoryEntrybuild()Builds the immutableMemoryEntryobject.abstract MemoryEntry.BuilderSets the author of the memory.abstract MemoryEntry.BuildersetContent(com.google.genai.types.Content content) Sets the main content of the memory.abstract MemoryEntry.BuildersetTimestamp(String timestamp) Sets the timestamp when the original content of this memory happened.setTimestamp(Instant instant) A convenience method to set the timestamp from anInstantobject, formatted as an ISO 8601 string.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setContent
Sets the main content of the memory.This is a required field.
-
setAuthor
Sets the author of the memory. -
setTimestamp
Sets the timestamp when the original content of this memory happened. -
setTimestamp
A convenience method to set the timestamp from anInstantobject, formatted as an ISO 8601 string.- Parameters:
instant- The timestamp as an Instant object.
-
build
Builds the immutableMemoryEntryobject.
-