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 MemoryEntry
build()
Builds the immutableMemoryEntry
object.abstract MemoryEntry.Builder
Sets the author of the memory.abstract MemoryEntry.Builder
setContent
(com.google.genai.types.Content content) Sets the main content of the memory.abstract MemoryEntry.Builder
setTimestamp
(String timestamp) Sets the timestamp when the original content of this memory happened.setTimestamp
(Instant instant) A convenience method to set the timestamp from anInstant
object, 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 anInstant
object, formatted as an ISO 8601 string.- Parameters:
instant
- The timestamp as an Instant object.
-
build
Builds the immutableMemoryEntry
object.
-