Mem0SearchResult
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class Mem0SearchResult
io/agentscope/core/memory/mem0/Mem0SearchResult.java:42–224Mem 0 搜索结果,在多次调用之间保存和恢复会话与记忆数据。位于 io.agentscope.core.memory.mem0 包。核心成员包括 getId、setId、getMemory、setMemory、getUserId、setUserId。
Represents a single memory search result from Mem0 v2 API.
Each search result contains:
-
The memory text content
-
Unique identifier for the memory
-
User identifier
-
Metadata associated with the memory
-
Categories for classification
-
Immutability flag
-
Optional expiration date
-
Creation and update timestamps
Results are typically ordered by relevance.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public Mem0SearchResult() | 初始化 `Mem0SearchResult` 实例。 Default constructor for Jackson. |
方法摘要Method Summary
构造器详情Constructor Detail
Mem0SearchResult
public Mem0SearchResult()
初始化 Mem0SearchResult 实例。
Default constructor for Jackson.
io/agentscope/core/memory/mem0/Mem0SearchResult.java:90方法详情Method Detail
getId
public String getId()
获取标识。
Returns the id.
Stringio/agentscope/core/memory/mem0/Mem0SearchResult.java:94–96setId
public void setId(String id)
设置标识。
Sets the id.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
id | String | 标识(类型 `String`)。The id. |
io/agentscope/core/memory/mem0/Mem0SearchResult.java:98–100getMemory
public String getMemory()
获取记忆。
Returns the memory.
Stringio/agentscope/core/memory/mem0/Mem0SearchResult.java:102–104setMemory
public void setMemory(String memory)
设置记忆。
Sets the memory.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
memory | String | 记忆(类型 `String`)。The memory. |
io/agentscope/core/memory/mem0/Mem0SearchResult.java:106–108getUserId
public String getUserId()
获取用户标识。
Returns the user id.
Stringio/agentscope/core/memory/mem0/Mem0SearchResult.java:110–112setUserId
public void setUserId(String userId)
设置用户标识。
Sets the user id.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
userId | String | 用户标识(类型 `String`)。The user id. |
io/agentscope/core/memory/mem0/Mem0SearchResult.java:114–116getMetadata
public Map<String, Object> getMetadata()
获取元数据。
Returns the metadata.
Map<String, Object>io/agentscope/core/memory/mem0/Mem0SearchResult.java:118–120setMetadata
public void setMetadata(Map<String, Object> metadata)
设置元数据。
Sets the metadata.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
metadata | Map<String, Object> | 元数据(类型 `Map`)。The metadata. |
io/agentscope/core/memory/mem0/Mem0SearchResult.java:122–124getCategories
public List<String> getCategories()
获取类别。
Returns the categories.
List<String>io/agentscope/core/memory/mem0/Mem0SearchResult.java:126–128setCategories
public void setCategories(List<String> categories)
设置类别。
Sets the categories.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
categories | List<String> | 类别(类型 `List`)。The categories. |
io/agentscope/core/memory/mem0/Mem0SearchResult.java:130–132getImmutable
public Boolean getImmutable()
获取不可变。
Returns the immutable.
Booleanio/agentscope/core/memory/mem0/Mem0SearchResult.java:134–136setImmutable
public void setImmutable(Boolean immutable)
设置不可变。
Sets the immutable.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
immutable | Boolean | 不可变(类型 `Boolean`)。The immutable. |
io/agentscope/core/memory/mem0/Mem0SearchResult.java:138–140getExpirationDate
public OffsetDateTime getExpirationDate()
获取 getExpirationDate。
Returns the expiration date.
OffsetDateTimeio/agentscope/core/memory/mem0/Mem0SearchResult.java:142–144setExpirationDate
public void setExpirationDate(OffsetDateTime expirationDate)
设置 setExpirationDate。
Sets the expiration date.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
expirationDate | OffsetDateTime | expiration 日期(类型 `OffsetDateTime`)。The expiration date. |
io/agentscope/core/memory/mem0/Mem0SearchResult.java:146–148getCreatedAt
public OffsetDateTime getCreatedAt()
获取已创建 At。
Returns the created at.
OffsetDateTimeio/agentscope/core/memory/mem0/Mem0SearchResult.java:150–152setCreatedAt
public void setCreatedAt(OffsetDateTime createdAt)
设置已创建 At。
Sets the created at.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
createdAt | OffsetDateTime | 已创建 At(类型 `OffsetDateTime`)。The created at. |
io/agentscope/core/memory/mem0/Mem0SearchResult.java:154–156getUpdatedAt
public OffsetDateTime getUpdatedAt()
获取已更新 At。
Returns the updated at.
OffsetDateTimeio/agentscope/core/memory/mem0/Mem0SearchResult.java:158–160setUpdatedAt
public void setUpdatedAt(OffsetDateTime updatedAt)
设置已更新 At。
Sets the updated at.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
updatedAt | OffsetDateTime | 已更新 At(类型 `OffsetDateTime`)。The updated at. |
io/agentscope/core/memory/mem0/Mem0SearchResult.java:162–164getScore
public Double getScore()
获取分数。
Gets the relevance score.
Doubleio/agentscope/core/memory/mem0/Mem0SearchResult.java:171–173setScore
public void setScore(Double score)
设置分数。
Sets the relevance score.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
score | Double | 分数(类型 `Double`)。The relevance score |
io/agentscope/core/memory/mem0/Mem0SearchResult.java:180–182getStructuredAttributes
public Map<String, Object> getStructuredAttributes()
获取结构化属性。
Gets the structured temporal attributes.
Map<String, Object>io/agentscope/core/memory/mem0/Mem0SearchResult.java:189–191setStructuredAttributes
public void setStructuredAttributes(Map<String, Object> structuredAttributes)
设置结构化属性。
Sets the structured temporal attributes.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
structuredAttributes | Map<String, Object> | 结构化属性映射。The structured attributes map |
io/agentscope/core/memory/mem0/Mem0SearchResult.java:198–200toString
public String toString()
返回 toString 结果。
Returns the to string.
Stringio/agentscope/core/memory/mem0/Mem0SearchResult.java:202–223