AS AgentScopeAPI 手册 / API Reference

Builder

public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements io.agentscope.controlplane.proto.ContextReportOrBuilder
源码Source io/agentscope/controlplane/proto/ContextReport.java:678–1686

构建器,用于构建并配置目标实例。位于 io.agentscope.controlplane.proto 包,继承自 com.google.protobuf.GeneratedMessage.Builder<Builder>,实现 io.agentscope.controlplane.proto.ContextReportOrBuilder。核心成员包括 getDescriptor、internalGetFieldAccessorTable、clear、getDescriptorForType、getDefaultInstanceForType、build。


ContextReport is the Level-4 effective-context report, pushed on compaction
or when context_hash changes (debounced). Written into context_snapshots.

Protobuf type agentscope.protocol.v1.ContextReport

方法摘要Method Summary

方法Method说明Description
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
staticfinal
获取描述符。
Returns the descriptor.
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
返回 `internalGetFieldAccessorTable` 结果。
Returns the internal get field accessor table.
public Builder clear()
清空或重置内部状态。
Clears or resets internal state.
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
获取 `getDescriptorForType`。
Returns the descriptor for type.
public io.agentscope.controlplane.proto.ContextReport getDefaultInstanceForType()
获取默认实例用于类型。
Returns the default instance for type.
public io.agentscope.controlplane.proto.ContextReport build()
构建并返回最终实例。
Creates and returns an instance.
public io.agentscope.controlplane.proto.ContextReport buildPartial()
构建 `buildPartial`。
Builds the partial.
public Builder mergeFrom(com.google.protobuf.Message other)
设置该配置项。
Performs the merge from operation.
public Builder mergeFrom(io.agentscope.controlplane.proto.ContextReport other)
设置该配置项。
Performs the merge from operation.
public final boolean isInitialized()
final
判断是否已初始化。
Returns whether the initialized.
public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
设置该配置项。
Performs the merge from operation.
public java.lang.String getSessionId()
获取会话标识。
`string session_id = 1;`
public com.google.protobuf.ByteString getSessionIdBytes()
获取会话标识字节。
`string session_id = 1;`
public Builder setSessionId(java.lang.String value)
设置设置会话标识。
`string session_id = 1;`
public Builder clearSessionId()
清空会话标识。
`string session_id = 1;`
public Builder setSessionIdBytes(com.google.protobuf.ByteString value)
设置设置会话标识字节。
`string session_id = 1;`
public java.lang.String getContextHash()
获取 `getContextHash`。
`string context_hash = 2;`
public com.google.protobuf.ByteString getContextHashBytes()
获取 `getContextHashBytes`。
`string context_hash = 2;`
public Builder setContextHash(java.lang.String value)
设置该配置项。
`string context_hash = 2;`
public Builder clearContextHash()
清空 `clearContextHash`。
`string context_hash = 2;`
public Builder setContextHashBytes(com.google.protobuf.ByteString value)
设置该配置项。
`string context_hash = 2;`
public long getCapturedAt()
获取 `getCapturedAt`。
``` unix milliseconds
public Builder setCapturedAt(long value)
设置该配置项。
``` unix milliseconds
public Builder clearCapturedAt()
清空 `clearCapturedAt`。
``` unix milliseconds
public java.lang.String getSystemPrompt()
获取系统提示词。
`string system_prompt = 4;`
public com.google.protobuf.ByteString getSystemPromptBytes()
获取系统提示词字节。
`string system_prompt = 4;`
public Builder setSystemPrompt(java.lang.String value)
设置设置系统提示词。
`string system_prompt = 4;`
public Builder clearSystemPrompt()
清空系统提示词。
`string system_prompt = 4;`
public Builder setSystemPromptBytes(com.google.protobuf.ByteString value)
设置设置系统提示词字节。
`string system_prompt = 4;`
public com.google.protobuf.ByteString getMessages()
获取消息。
``` JSON array of {role, content, is_compaction?}
public Builder setMessages(com.google.protobuf.ByteString value)
设置设置消息。
``` JSON array of {role, content, is_compaction?}
public Builder clearMessages()
清空消息。
``` JSON array of {role, content, is_compaction?}
public com.google.protobuf.ByteString getTools()
获取工具。
``` JSON array of ToolInfo
public Builder setTools(com.google.protobuf.ByteString value)
设置设置工具。
``` JSON array of ToolInfo
public Builder clearTools()
清空工具。
``` JSON array of ToolInfo
public boolean getIsCompacted()
获取 `getIsCompacted`。
`bool is_compacted = 7;`
public Builder setIsCompacted(boolean value)
设置该配置项。
`bool is_compacted = 7;`
public Builder clearIsCompacted()
清空 `clearIsCompacted`。
`bool is_compacted = 7;`
public java.lang.String getCompactionSummary()
获取压缩摘要。
`string compaction_summary = 8;`
public com.google.protobuf.ByteString getCompactionSummaryBytes()
获取压缩摘要字节。
`string compaction_summary = 8;`
public Builder setCompactionSummary(java.lang.String value)
设置设置压缩摘要。
`string compaction_summary = 8;`
public Builder clearCompactionSummary()
清空压缩摘要。
`string compaction_summary = 8;`
public Builder setCompactionSummaryBytes(com.google.protobuf.ByteString value)
设置设置压缩摘要字节。
`string compaction_summary = 8;`
public int getOriginalMessageCount()
获取 `getOriginalMessageCount`。
`int32 original_message_count = 9;`
public Builder setOriginalMessageCount(int value)
设置该配置项。
`int32 original_message_count = 9;`
public Builder clearOriginalMessageCount()
清空 `clearOriginalMessageCount`。
`int32 original_message_count = 9;`
public long getCompactedAt()
获取 `getCompactedAt`。
``` unix milliseconds
public Builder setCompactedAt(long value)
设置该配置项。
``` unix milliseconds
public Builder clearCompactedAt()
清空 `clearCompactedAt`。
``` unix milliseconds
public int getTotalTokens()
获取总数令牌数。
`int32 total_tokens = 11;`
public Builder setTotalTokens(int value)
设置设置总数令牌数。
`int32 total_tokens = 11;`
public Builder clearTotalTokens()
清空总数令牌数。
`int32 total_tokens = 11;`
public int getMaxTokens()
获取最大令牌数。
`int32 max_tokens = 12;`
public Builder setMaxTokens(int value)
设置设置最大令牌数。
`int32 max_tokens = 12;`
public Builder clearMaxTokens()
清空最大令牌数。
`int32 max_tokens = 12;`
public java.lang.String getFramework()
获取 `getFramework`。
`string framework = 13;`
public com.google.protobuf.ByteString getFrameworkBytes()
获取 `getFrameworkBytes`。
`string framework = 13;`
public Builder setFramework(java.lang.String value)
设置该配置项。
`string framework = 13;`
public Builder clearFramework()
清空 `clearFramework`。
`string framework = 13;`
public Builder setFrameworkBytes(com.google.protobuf.ByteString value)
设置该配置项。
`string framework = 13;`
public com.google.protobuf.ByteString getFrameworkState()
获取 `getFrameworkState`。
``` framework-private JSON (graph state, session metadata, ...)
public Builder setFrameworkState(com.google.protobuf.ByteString value)
设置该配置项。
``` framework-private JSON (graph state, session metadata, ...)
public Builder clearFrameworkState()
清空 `clearFrameworkState`。
``` framework-private JSON (graph state, session metadata, ...)

方法详情Method Detail

getDescriptor

public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
staticfinal

获取描述符。

Returns the descriptor.

返回Returns com.google.protobuf.Descriptors.Descriptor
返回com.google.protobuf.Descriptors.Descriptor。Returns com google protobuf descriptors descriptor.
源码Source io/agentscope/controlplane/proto/ContextReport.java:682–685

internalGetFieldAccessorTable

protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()

返回 internalGetFieldAccessorTable 结果。

Returns the internal get field accessor table.

返回Returns com.google.protobuf.GeneratedMessage.FieldAccessorTable
返回com.google.protobuf.GeneratedMessage.FieldAccessorTable。Returns com google protobuf generated message field accessor table.
源码Source io/agentscope/controlplane/proto/ContextReport.java:687–693

clear

public Builder clear()

清空或重置内部状态。

Clears or resets internal state.

返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:705–724

getDescriptorForType

public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()

获取 getDescriptorForType。

Returns the descriptor for type.

返回Returns com.google.protobuf.Descriptors.Descriptor
返回com.google.protobuf.Descriptors.Descriptor。Returns com google protobuf descriptors descriptor.
源码Source io/agentscope/controlplane/proto/ContextReport.java:726–730

getDefaultInstanceForType

public io.agentscope.controlplane.proto.ContextReport getDefaultInstanceForType()

获取默认实例用于类型。

Returns the default instance for type.

返回Returns io.agentscope.controlplane.proto.ContextReport
返回io.agentscope.controlplane.协议.ContextReport。Returns io agentscope controlplane proto context report.
源码Source io/agentscope/controlplane/proto/ContextReport.java:732–735

build

public io.agentscope.controlplane.proto.ContextReport build()

构建并返回最终实例。

Creates and returns an instance.

返回Returns io.agentscope.controlplane.proto.ContextReport
返回io.agentscope.controlplane.协议.ContextReport。Returns io agentscope controlplane proto context report.
源码Source io/agentscope/controlplane/proto/ContextReport.java:737–744

buildPartial

public io.agentscope.controlplane.proto.ContextReport buildPartial()

构建 buildPartial。

Builds the partial.

返回Returns io.agentscope.controlplane.proto.ContextReport
返回io.agentscope.controlplane.协议.ContextReport。Returns io agentscope controlplane proto context report.
源码Source io/agentscope/controlplane/proto/ContextReport.java:746–752

mergeFrom

public Builder mergeFrom(com.google.protobuf.Message other)

设置该配置项。

Performs the merge from operation.

参数Parameters
名称Name类型Type说明Description
othercom.google.protobuf.Messageother(类型 `com.google.protobuf.Message`)。The other.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:800–808

mergeFrom

public Builder mergeFrom(io.agentscope.controlplane.proto.ContextReport other)

设置该配置项。

Performs the merge from operation.

参数Parameters
名称Name类型Type说明Description
otherio.agentscope.controlplane.proto.ContextReportother(类型 `io.agentscope.controlplane.proto.ContextReport`)。The other.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:810–867

isInitialized

public final boolean isInitialized()
final

判断是否已初始化。

Returns whether the initialized.

返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/controlplane/proto/ContextReport.java:869–872

mergeFrom

public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException

设置该配置项。

Performs the merge from operation.

参数Parameters
名称Name类型Type说明Description
inputcom.google.protobuf.CodedInputStream输入消息(类型 `com.google.protobuf.CodedInputStream`)。The input.
extensionRegistrycom.google.protobuf.ExtensionRegistryLite扩展注册表(类型 `com.google.protobuf.ExtensionRegistryLite`)。The extension registry.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
抛出Throws
  • java.io.IOException 可能抛出 `java.io.IOException`。Thrown when the operation cannot be completed.
源码Source io/agentscope/controlplane/proto/ContextReport.java:874–974

getSessionId

public java.lang.String getSessionId()

获取会话标识。

string session_id = 1;

返回Returns java.lang.String
会话标识。The sessionId.
源码Source io/agentscope/controlplane/proto/ContextReport.java:982–993

getSessionIdBytes

public com.google.protobuf.ByteString getSessionIdBytes()

获取会话标识字节。

string session_id = 1;

返回Returns com.google.protobuf.ByteString
字节用于会话标识。The bytes for sessionId.
源码Source io/agentscope/controlplane/proto/ContextReport.java:998–1010

setSessionId

public Builder setSessionId(java.lang.String value)

设置设置会话标识。

string session_id = 1;

参数Parameters
名称Name类型Type说明Description
valuejava.lang.String会话标识到设置。The sessionId to set.
返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1016–1023

clearSessionId

public Builder clearSessionId()

清空会话标识。

string session_id = 1;

返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1028–1033

setSessionIdBytes

public Builder setSessionIdBytes(com.google.protobuf.ByteString value)

设置设置会话标识字节。

string session_id = 1;

参数Parameters
名称Name类型Type说明Description
valuecom.google.protobuf.ByteString字节用于会话标识到设置。The bytes for sessionId to set.
返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1039–1047

getContextHash

public java.lang.String getContextHash()

获取 getContextHash。

string context_hash = 2;

返回Returns java.lang.String
返回java.lang.String。The contextHash.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1054–1065

getContextHashBytes

public com.google.protobuf.ByteString getContextHashBytes()

获取 getContextHashBytes。

string context_hash = 2;

返回Returns com.google.protobuf.ByteString
字节用于 contextHash。The bytes for contextHash.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1070–1082

setContextHash

public Builder setContextHash(java.lang.String value)

设置该配置项。

string context_hash = 2;

参数Parameters
名称Name类型Type说明Description
valuejava.lang.StringcontextHash 到设置。The contextHash to set.
返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1088–1095

clearContextHash

public Builder clearContextHash()

清空 clearContextHash。

string context_hash = 2;

返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1100–1105

setContextHashBytes

public Builder setContextHashBytes(com.google.protobuf.ByteString value)

设置该配置项。

string context_hash = 2;

参数Parameters
名称Name类型Type说明Description
valuecom.google.protobuf.ByteString字节用于 contextHash 到设置。The bytes for contextHash to set.
返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1111–1119

getCapturedAt

public long getCapturedAt()

获取 getCapturedAt。

unix milliseconds int64 captured_at = 3;

返回Returns long
返回数值结果。The capturedAt.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1130–1133

setCapturedAt

public Builder setCapturedAt(long value)

设置该配置项。

unix milliseconds int64 captured_at = 3;

参数Parameters
名称Name类型Type说明Description
valuelongcapturedAt 到设置。The capturedAt to set.
返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1143–1149

clearCapturedAt

public Builder clearCapturedAt()

清空 clearCapturedAt。

unix milliseconds int64 captured_at = 3;

返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1158–1163

getSystemPrompt

public java.lang.String getSystemPrompt()

获取系统提示词。

string system_prompt = 4;

返回Returns java.lang.String
返回java.lang.String。The systemPrompt.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1170–1181

getSystemPromptBytes

public com.google.protobuf.ByteString getSystemPromptBytes()

获取系统提示词字节。

string system_prompt = 4;

返回Returns com.google.protobuf.ByteString
字节用于 systemPrompt。The bytes for systemPrompt.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1186–1198

setSystemPrompt

public Builder setSystemPrompt(java.lang.String value)

设置设置系统提示词。

string system_prompt = 4;

参数Parameters
名称Name类型Type说明Description
valuejava.lang.StringsystemPrompt 到设置。The systemPrompt to set.
返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1204–1211

clearSystemPrompt

public Builder clearSystemPrompt()

清空系统提示词。

string system_prompt = 4;

返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1216–1221

setSystemPromptBytes

public Builder setSystemPromptBytes(com.google.protobuf.ByteString value)

设置设置系统提示词字节。

string system_prompt = 4;

参数Parameters
名称Name类型Type说明Description
valuecom.google.protobuf.ByteString字节用于 systemPrompt 到设置。The bytes for systemPrompt to set.
返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1227–1235

getMessages

public com.google.protobuf.ByteString getMessages()

获取消息。

JSON array of {role, content, is_compaction?} bytes messages = 5;

返回Returns com.google.protobuf.ByteString
消息。The messages.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1246–1249

setMessages

public Builder setMessages(com.google.protobuf.ByteString value)

设置设置消息。

JSON array of {role, content, is_compaction?} bytes messages = 5;

参数Parameters
名称Name类型Type说明Description
valuecom.google.protobuf.ByteString消息到设置。The messages to set.
返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1259–1265

clearMessages

public Builder clearMessages()

清空消息。

JSON array of {role, content, is_compaction?} bytes messages = 5;

返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1274–1279

getTools

public com.google.protobuf.ByteString getTools()

获取工具。

JSON array of ToolInfo bytes tools = 6;

返回Returns com.google.protobuf.ByteString
工具。The tools.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1290–1293

setTools

public Builder setTools(com.google.protobuf.ByteString value)

设置设置工具。

JSON array of ToolInfo bytes tools = 6;

参数Parameters
名称Name类型Type说明Description
valuecom.google.protobuf.ByteString工具到设置。The tools to set.
返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1303–1309

clearTools

public Builder clearTools()

清空工具。

JSON array of ToolInfo bytes tools = 6;

返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1318–1323

getIsCompacted

public boolean getIsCompacted()

获取 getIsCompacted。

bool is_compacted = 7;

返回Returns boolean
返回布尔值,表示判断结果。The isCompacted.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1330–1333

setIsCompacted

public Builder setIsCompacted(boolean value)

设置该配置项。

bool is_compacted = 7;

参数Parameters
名称Name类型Type说明Description
valuebooleanisCompacted 到设置。The isCompacted to set.
返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1339–1345

clearIsCompacted

public Builder clearIsCompacted()

清空 clearIsCompacted。

bool is_compacted = 7;

返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1350–1355

getCompactionSummary

public java.lang.String getCompactionSummary()

获取压缩摘要。

string compaction_summary = 8;

返回Returns java.lang.String
返回java.lang.String。The compactionSummary.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1362–1373

getCompactionSummaryBytes

public com.google.protobuf.ByteString getCompactionSummaryBytes()

获取压缩摘要字节。

string compaction_summary = 8;

返回Returns com.google.protobuf.ByteString
字节用于 compactionSummary。The bytes for compactionSummary.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1378–1390

setCompactionSummary

public Builder setCompactionSummary(java.lang.String value)

设置设置压缩摘要。

string compaction_summary = 8;

参数Parameters
名称Name类型Type说明Description
valuejava.lang.StringcompactionSummary 到设置。The compactionSummary to set.
返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1396–1403

clearCompactionSummary

public Builder clearCompactionSummary()

清空压缩摘要。

string compaction_summary = 8;

返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1408–1413

setCompactionSummaryBytes

public Builder setCompactionSummaryBytes(com.google.protobuf.ByteString value)

设置设置压缩摘要字节。

string compaction_summary = 8;

参数Parameters
名称Name类型Type说明Description
valuecom.google.protobuf.ByteString字节用于 compactionSummary 到设置。The bytes for compactionSummary to set.
返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1419–1427

getOriginalMessageCount

public int getOriginalMessageCount()

获取 getOriginalMessageCount。

int32 original_message_count = 9;

返回Returns int
返回数值结果。The originalMessageCount.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1434–1437

setOriginalMessageCount

public Builder setOriginalMessageCount(int value)

设置该配置项。

int32 original_message_count = 9;

参数Parameters
名称Name类型Type说明Description
valueintoriginalMessageCount 到设置。The originalMessageCount to set.
返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1443–1449

clearOriginalMessageCount

public Builder clearOriginalMessageCount()

清空 clearOriginalMessageCount。

int32 original_message_count = 9;

返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1454–1459

getCompactedAt

public long getCompactedAt()

获取 getCompactedAt。

unix milliseconds int64 compacted_at = 10;

返回Returns long
返回数值结果。The compactedAt.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1470–1473

setCompactedAt

public Builder setCompactedAt(long value)

设置该配置项。

unix milliseconds int64 compacted_at = 10;

参数Parameters
名称Name类型Type说明Description
valuelongcompactedAt 到设置。The compactedAt to set.
返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1483–1489

clearCompactedAt

public Builder clearCompactedAt()

清空 clearCompactedAt。

unix milliseconds int64 compacted_at = 10;

返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1498–1503

getTotalTokens

public int getTotalTokens()

获取总数令牌数。

int32 total_tokens = 11;

返回Returns int
返回数值结果。The totalTokens.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1510–1513

setTotalTokens

public Builder setTotalTokens(int value)

设置设置总数令牌数。

int32 total_tokens = 11;

参数Parameters
名称Name类型Type说明Description
valueinttotalTokens 到设置。The totalTokens to set.
返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1519–1525

clearTotalTokens

public Builder clearTotalTokens()

清空总数令牌数。

int32 total_tokens = 11;

返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1530–1535

getMaxTokens

public int getMaxTokens()

获取最大令牌数。

int32 max_tokens = 12;

返回Returns int
返回数值结果。The maxTokens.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1542–1545

setMaxTokens

public Builder setMaxTokens(int value)

设置设置最大令牌数。

int32 max_tokens = 12;

参数Parameters
名称Name类型Type说明Description
valueintmaxTokens 到设置。The maxTokens to set.
返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1551–1557

clearMaxTokens

public Builder clearMaxTokens()

清空最大令牌数。

int32 max_tokens = 12;

返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1562–1567

getFramework

public java.lang.String getFramework()

获取 getFramework。

string framework = 13;

返回Returns java.lang.String
返回java.lang.String。The framework.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1574–1585

getFrameworkBytes

public com.google.protobuf.ByteString getFrameworkBytes()

获取 getFrameworkBytes。

string framework = 13;

返回Returns com.google.protobuf.ByteString
返回com.google.protobuf.ByteString。The bytes for framework.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1590–1602

setFramework

public Builder setFramework(java.lang.String value)

设置该配置项。

string framework = 13;

参数Parameters
名称Name类型Type说明Description
valuejava.lang.String值(类型 `java.lang.String`)。The framework to set.
返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1608–1615

clearFramework

public Builder clearFramework()

清空 clearFramework。

string framework = 13;

返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1620–1625

setFrameworkBytes

public Builder setFrameworkBytes(com.google.protobuf.ByteString value)

设置该配置项。

string framework = 13;

参数Parameters
名称Name类型Type说明Description
valuecom.google.protobuf.ByteString值(类型 `com.google.protobuf.ByteString`)。The bytes for framework to set.
返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1631–1639

getFrameworkState

public com.google.protobuf.ByteString getFrameworkState()

获取 getFrameworkState。

framework-private JSON (graph state, session metadata, ...) bytes framework_state = 14;

返回Returns com.google.protobuf.ByteString
返回com.google.protobuf.ByteString。The frameworkState.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1650–1653

setFrameworkState

public Builder setFrameworkState(com.google.protobuf.ByteString value)

设置该配置项。

framework-private JSON (graph state, session metadata, ...) bytes framework_state = 14;

参数Parameters
名称Name类型Type说明Description
valuecom.google.protobuf.ByteStringframeworkState 到设置。The frameworkState to set.
返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1663–1669

clearFrameworkState

public Builder clearFrameworkState()

清空 clearFrameworkState。

framework-private JSON (graph state, session metadata, ...) bytes framework_state = 14;

返回Returns Builder
返回当前实例,以支持链式调用。This builder for chaining.
源码Source io/agentscope/controlplane/proto/ContextReport.java:1678–1683
基于官方固定版本源码静态生成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.