内存条目(Entry)

data class MemoryEntry(val content: Content, val id: String? = null, val author: String? = null, val timestamp: String? = null, val customMetadata: Map<String, Any> = emptyMap())

Represents one memory entry in the Vertex AI Memory Bank.

Serializable because load_memory returns entries to the model through this serializer; the field names below are therefore the ones the model sees.

构造函数(Constructors)

Link copied to clipboard
constructor(content: Content, id: String? = null, author: String? = null, timestamp: String? = null, customMetadata: Map<String, Any> = emptyMap())

类型

Link copied to clipboard
class Builder

Fluent Builder for MemoryEntry该功能主要为 Java 语言的调用者提供支持;如果某个属性未被设置,其值将默认使用构造函数中指定的默认值。

Link copied to clipboard
object Companion

属性(Properties)

Link copied to clipboard

该内存条的制造商名称;如果未设置,则返回 `null`。

Link copied to clipboard

内存的主要存储内容。

Link copied to clipboard
@SerialName(`value` = “custom_metadata”)
val customMetadata: Map<String, Any>

与该内存相关联的可选键值元数据。该数据结构必须能够被序列化为 JSON 格式。 load_memory 然后,该结果会被作为模型工具输出的一部分返回给模型。

Link copied to clipboard
val id: String?

该内存条目的唯一标识符;如果该条目尚未被持久化存储(即尚未被写入数据库或文件等),则该标识符为 `null`。

Link copied to clipboard

该内存中的原始内容被创建的时间戳;如果未设置时间戳,则返回 `null`。推荐的时间戳格式为 ISO 8601 格式。

函数

Link copied to clipboard

返回一个 Builder 使用该实例的属性进行初始化,主要适用于 Java 调用者。建议优先选择这种方式。 copy 来自 Java 的代码: copy 该函数会按位置获取所有属性的值;因此,每当有新属性被添加时,其函数签名(即函数的定义)就会发生变化。