Builder
public static final class Builder
io/agentscope/extensions/controlplane/model/ContextSnapshot.java:321–416用于ContextSnapshot的可变构建器。位于 io.agentscope.extensions.controlplane.model 包。核心成员包括 sessionId、systemPrompt、messages、tools、compacted、compactionSummary。
Mutable builder for ContextSnapshot.
方法摘要Method Summary
方法详情Method Detail
sessionId
public Builder sessionId(String sessionId)
设置会话标识。
Performs the session id operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sessionId | String | 会话标识(类型 `String`)。The session id. |
Builderio/agentscope/extensions/controlplane/model/ContextSnapshot.java:338–341systemPrompt
public Builder systemPrompt(String systemPrompt)
设置系统提示词。
Performs the system prompt operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
systemPrompt | String | 系统提示词(类型 `String`)。The system prompt. |
Builderio/agentscope/extensions/controlplane/model/ContextSnapshot.java:343–346messages
public Builder messages(List<ContextMessage> messages)
设置消息。
Performs the messages operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
messages | List<ContextMessage> | 消息列表(类型 `List`)。The messages. |
Builderio/agentscope/extensions/controlplane/model/ContextSnapshot.java:348–351tools
public Builder tools(List<ToolInfo> tools)
设置工具。
Performs the tools operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
tools | List<ToolInfo> | 工具列表(类型 `List`)。The tools. |
Builderio/agentscope/extensions/controlplane/model/ContextSnapshot.java:353–356compacted
public Builder compacted(boolean compacted)
设置该配置项。
Performs the compacted operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
compacted | boolean | compacted(类型 `boolean`)。The compacted. |
Builderio/agentscope/extensions/controlplane/model/ContextSnapshot.java:358–361compactionSummary
public Builder compactionSummary(String compactionSummary)
设置压缩摘要。
Performs the compaction summary operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
compactionSummary | String | 压缩摘要(类型 `String`)。The compaction summary. |
Builderio/agentscope/extensions/controlplane/model/ContextSnapshot.java:363–366originalMessageCount
public Builder originalMessageCount(int originalMessageCount)
设置该配置项。
Performs the original message count operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
originalMessageCount | int | original 消息数量(类型 `int`)。The original message count. |
Builderio/agentscope/extensions/controlplane/model/ContextSnapshot.java:368–371compactedAt
public Builder compactedAt(long compactedAt)
设置该配置项。
Performs the compacted at operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
compactedAt | long | compacted At(类型 `long`)。The compacted at. |
Builderio/agentscope/extensions/controlplane/model/ContextSnapshot.java:373–376totalTokens
public Builder totalTokens(int totalTokens)
设置总数令牌数。
Performs the total tokens operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
totalTokens | int | 总数令牌数(类型 `int`)。The total tokens. |
Builderio/agentscope/extensions/controlplane/model/ContextSnapshot.java:378–381maxTokens
public Builder maxTokens(int maxTokens)
设置最大令牌数。
Performs the max tokens operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
maxTokens | int | 最大令牌数(类型 `int`)。The max tokens. |
Builderio/agentscope/extensions/controlplane/model/ContextSnapshot.java:383–386framework
public Builder framework(String framework)
设置该配置项。
Performs the framework operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
framework | String | framework(类型 `String`)。The framework. |
Builderio/agentscope/extensions/controlplane/model/ContextSnapshot.java:388–391model
public Builder model(String model)
设置模型。
Performs the model operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
model | String | 模型实例(类型 `String`)。The model. |
Builderio/agentscope/extensions/controlplane/model/ContextSnapshot.java:393–396frameworkState
public Builder frameworkState(byte[] frameworkState)
设置该配置项。
Performs the framework state operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
frameworkState | byte[] | framework 状态(类型 `byte[]`)。The framework state. |
Builderio/agentscope/extensions/controlplane/model/ContextSnapshot.java:398–401capturedAt
public Builder capturedAt(long capturedAt)
设置该配置项。
Performs the captured at operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
capturedAt | long | captured At(类型 `long`)。The captured at. |
Builderio/agentscope/extensions/controlplane/model/ContextSnapshot.java:403–406contextHash
public Builder contextHash(String contextHash)
设置该配置项。
Performs the context hash operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
contextHash | String | 上下文 Hash(类型 `String`)。The context hash. |
Builderio/agentscope/extensions/controlplane/model/ContextSnapshot.java:408–411build
public ContextSnapshot build()
构建并返回最终实例。
Creates and returns an instance.
ContextSnapshotio/agentscope/extensions/controlplane/model/ContextSnapshot.java:413–415