AS AgentScopeAPI 手册 / API Reference

BailianAddRequest

@JsonInclude(JsonInclude.Include.NON_NULL) public class BailianAddRequest
源码Source io/agentscope/core/memory/bailian/BailianAddRequest.java:33–307

Bailian 添加请求,在多次调用之间保存和恢复会话与记忆数据。位于 io.agentscope.core.memory.bailian 包。核心成员包括 getUserId、setUserId、getMessages、setMessages、getCustomContent、setCustomContent。

Request object for adding memories to Bailian Memory API.

This request is sent to the POST /api/v2/apps/memory/add endpoint to record new memories. Bailian will process the messages and extract memorable information using LLM-powered inference.

The metadata fields are used to organize and filter memories, enabling multi-tenant and multi-user scenarios.

嵌套类摘要Nested Class Summary

类Class类型Kind说明Description
Builder类class
BailianAddRequest的构建器。
Builder for BailianAddRequest.

构造器摘要Constructor Summary

构造器Constructor说明Description
public BailianAddRequest()
初始化 `BailianAddRequest` 实例。
Default constructor for Jackson.

方法摘要Method Summary

方法Method说明Description
public String getUserId()
获取用户标识。
Gets the user ID.
public void setUserId(String userId)
设置用户标识。
Sets the user ID.
public List<BailianMessage> getMessages()
获取消息。
Gets the messages.
public void setMessages(List<BailianMessage> messages)
设置消息。
Sets the messages.
public String getCustomContent()
获取自定义内容。
Gets the custom content.
public void setCustomContent(String customContent)
设置自定义内容。
Sets the custom content.
public String getMemoryLibraryId()
获取 `getMemoryLibraryId`。
Gets the memory library ID.
public void setMemoryLibraryId(String memoryLibraryId)
设置 `setMemoryLibraryId`。
Sets the memory library ID.
public String getProjectId()
获取 `getProjectId`。
Gets the project ID.
public void setProjectId(String projectId)
设置 `setProjectId`。
Sets the project ID.
public String getProfileSchema()
获取配置档案模式。
Gets the profile schema.
public void setProfileSchema(String profileSchema)
设置配置档案模式。
Sets the profile schema.
public Map<String, Object> getMetadata()
获取元数据。
Gets the metadata.
public void setMetadata(Map<String, Object> metadata)
设置元数据。
Sets the metadata.
public static Builder builder()
static
创建新的构建器用于 BailianAddRequest。
Creates a new builder for BailianAddRequest.

构造器详情Constructor Detail

BailianAddRequest

public BailianAddRequest()

初始化 BailianAddRequest 实例。

Default constructor for Jackson.

源码Source io/agentscope/core/memory/bailian/BailianAddRequest.java:64

方法详情Method Detail

getUserId

public String getUserId()

获取用户标识。

Gets the user ID.

返回Returns String
用户标识。the user ID
源码Source io/agentscope/core/memory/bailian/BailianAddRequest.java:71–73

setUserId

public void setUserId(String userId)

设置用户标识。

Sets the user ID.

参数Parameters
名称Name类型Type说明Description
userIdString用户标识。the user ID
源码Source io/agentscope/core/memory/bailian/BailianAddRequest.java:80–82

getMessages

public List<BailianMessage> getMessages()

获取消息。

Gets the messages.

返回Returns List<BailianMessage>
消息列出。the messages list
源码Source io/agentscope/core/memory/bailian/BailianAddRequest.java:89–91

setMessages

public void setMessages(List<BailianMessage> messages)

设置消息。

Sets the messages.

参数Parameters
名称Name类型Type说明Description
messagesList<BailianMessage>消息列出。the messages list
源码Source io/agentscope/core/memory/bailian/BailianAddRequest.java:98–100

getCustomContent

public String getCustomContent()

获取自定义内容。

Gets the custom content.

返回Returns String
自定义内容。the custom content
源码Source io/agentscope/core/memory/bailian/BailianAddRequest.java:107–109

setCustomContent

public void setCustomContent(String customContent)

设置自定义内容。

Sets the custom content.

参数Parameters
名称Name类型Type说明Description
customContentString自定义内容。the custom content
源码Source io/agentscope/core/memory/bailian/BailianAddRequest.java:116–118

getMemoryLibraryId

public String getMemoryLibraryId()

获取 getMemoryLibraryId。

Gets the memory library ID.

返回Returns String
返回字符串结果。the memory library ID
源码Source io/agentscope/core/memory/bailian/BailianAddRequest.java:125–127

setMemoryLibraryId

public void setMemoryLibraryId(String memoryLibraryId)

设置 setMemoryLibraryId。

Sets the memory library ID.

参数Parameters
名称Name类型Type说明Description
memoryLibraryIdString记忆 Library 标识(类型 `String`)。the memory library ID
源码Source io/agentscope/core/memory/bailian/BailianAddRequest.java:134–136

getProjectId

public String getProjectId()

获取 getProjectId。

Gets the project ID.

返回Returns String
返回字符串结果。the project ID
源码Source io/agentscope/core/memory/bailian/BailianAddRequest.java:143–145

setProjectId

public void setProjectId(String projectId)

设置 setProjectId。

Sets the project ID.

参数Parameters
名称Name类型Type说明Description
projectIdStringproject 标识(类型 `String`)。the project ID
源码Source io/agentscope/core/memory/bailian/BailianAddRequest.java:152–154

getProfileSchema

public String getProfileSchema()

获取配置档案模式。

Gets the profile schema.

返回Returns String
配置档案模式。the profile schema
源码Source io/agentscope/core/memory/bailian/BailianAddRequest.java:161–163

setProfileSchema

public void setProfileSchema(String profileSchema)

设置配置档案模式。

Sets the profile schema.

参数Parameters
名称Name类型Type说明Description
profileSchemaString配置档案模式。the profile schema
源码Source io/agentscope/core/memory/bailian/BailianAddRequest.java:170–172

getMetadata

public Map<String, Object> getMetadata()

获取元数据。

Gets the metadata.

返回Returns Map<String, Object>
元数据映射。the metadata map
源码Source io/agentscope/core/memory/bailian/BailianAddRequest.java:179–181

setMetadata

public void setMetadata(Map<String, Object> metadata)

设置元数据。

Sets the metadata.

参数Parameters
名称Name类型Type说明Description
metadataMap<String, Object>元数据映射。the metadata map
源码Source io/agentscope/core/memory/bailian/BailianAddRequest.java:188–190

builder

public static Builder builder()
static

创建新的构建器用于 BailianAddRequest。

Creates a new builder for BailianAddRequest.

返回Returns Builder
一种新的构建器实例。a new Builder instance
源码Source io/agentscope/core/memory/bailian/BailianAddRequest.java:197–199

嵌套类详情Nested Class Detail

Builder

public static class Builder

BailianAddRequest的构建器。位于 io.agentscope.core.memory.bailian 包。核心成员包括 userId、messages、customContent、memoryLibraryId、projectId、profileSchema。

Builder for BailianAddRequest.

基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.