Builder
public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements io.agentscope.aistio.proto.SessionSnapshotOrBuilder
io/agentscope/aistio/proto/SessionSnapshot.java:605–1485构建器,用于构建并配置目标实例。位于 io.agentscope.aistio.proto 包,继承自 com.google.protobuf.GeneratedMessage.Builder<Builder>,实现 io.agentscope.aistio.proto.SessionSnapshotOrBuilder。核心成员包括 getDescriptor、internalGetFieldAccessorTable、clear、getDescriptorForType、getDefaultInstanceForType、build。
Protobuf type agentscope.protocol.v1.SessionSnapshot
方法摘要Method Summary
方法详情Method Detail
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
获取描述符。
Returns the descriptor.
com.google.protobuf.Descriptors.Descriptorio/agentscope/aistio/proto/SessionSnapshot.java:609–612internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
返回 internalGetFieldAccessorTable 结果。
Returns the internal get field accessor table.
com.google.protobuf.GeneratedMessage.FieldAccessorTableio/agentscope/aistio/proto/SessionSnapshot.java:614–620clear
public Builder clear()
清空或重置内部状态。
Clears or resets internal state.
Builderio/agentscope/aistio/proto/SessionSnapshot.java:632–648getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
获取 getDescriptorForType。
Returns the descriptor for type.
com.google.protobuf.Descriptors.Descriptorio/agentscope/aistio/proto/SessionSnapshot.java:650–654getDefaultInstanceForType
public io.agentscope.aistio.proto.SessionSnapshot getDefaultInstanceForType()
获取默认实例用于类型。
Returns the default instance for type.
io.agentscope.aistio.proto.SessionSnapshotio/agentscope/aistio/proto/SessionSnapshot.java:656–659build
public io.agentscope.aistio.proto.SessionSnapshot build()
构建并返回最终实例。
Creates and returns an instance.
io.agentscope.aistio.proto.SessionSnapshotio/agentscope/aistio/proto/SessionSnapshot.java:661–668buildPartial
public io.agentscope.aistio.proto.SessionSnapshot buildPartial()
构建 buildPartial。
Builds the partial.
io.agentscope.aistio.proto.SessionSnapshotio/agentscope/aistio/proto/SessionSnapshot.java:670–676mergeFrom
public Builder mergeFrom(com.google.protobuf.Message other)
设置该配置项。
Performs the merge from operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
other | com.google.protobuf.Message | other(类型 `com.google.protobuf.Message`)。The other. |
Builderio/agentscope/aistio/proto/SessionSnapshot.java:715–723mergeFrom
public Builder mergeFrom(io.agentscope.aistio.proto.SessionSnapshot other)
设置该配置项。
Performs the merge from operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
other | io.agentscope.aistio.proto.SessionSnapshot | other(类型 `io.agentscope.aistio.proto.SessionSnapshot`)。The other. |
Builderio/agentscope/aistio/proto/SessionSnapshot.java:725–773isInitialized
public final boolean isInitialized()
判断是否已初始化。
Returns whether the initialized.
booleanio/agentscope/aistio/proto/SessionSnapshot.java:775–778mergeFrom
public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
设置该配置项。
Performs the merge from operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
input | com.google.protobuf.CodedInputStream | 输入消息(类型 `com.google.protobuf.CodedInputStream`)。The input. |
extensionRegistry | com.google.protobuf.ExtensionRegistryLite | 扩展注册表(类型 `com.google.protobuf.ExtensionRegistryLite`)。The extension registry. |
Builderjava.io.IOException可能抛出 `java.io.IOException`。Thrown when the operation cannot be completed.
io/agentscope/aistio/proto/SessionSnapshot.java:780–865getSessionId
public java.lang.String getSessionId()
获取会话标识。
string session_id = 1;
java.lang.Stringio/agentscope/aistio/proto/SessionSnapshot.java:873–884getSessionIdBytes
public com.google.protobuf.ByteString getSessionIdBytes()
获取会话标识字节。
string session_id = 1;
com.google.protobuf.ByteStringio/agentscope/aistio/proto/SessionSnapshot.java:889–901setSessionId
public Builder setSessionId(java.lang.String value)
设置设置会话标识。
string session_id = 1;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | java.lang.String | 会话标识到设置。The sessionId to set. |
Builderio/agentscope/aistio/proto/SessionSnapshot.java:907–914clearSessionId
public Builder clearSessionId()
清空会话标识。
string session_id = 1;
Builderio/agentscope/aistio/proto/SessionSnapshot.java:919–924setSessionIdBytes
public Builder setSessionIdBytes(com.google.protobuf.ByteString value)
设置设置会话标识字节。
string session_id = 1;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | com.google.protobuf.ByteString | 字节用于会话标识到设置。The bytes for sessionId to set. |
Builderio/agentscope/aistio/proto/SessionSnapshot.java:930–938getPhase
public java.lang.String getPhase()
获取阶段。
string phase = 2;
java.lang.Stringio/agentscope/aistio/proto/SessionSnapshot.java:945–956getPhaseBytes
public com.google.protobuf.ByteString getPhaseBytes()
获取阶段字节。
string phase = 2;
com.google.protobuf.ByteStringio/agentscope/aistio/proto/SessionSnapshot.java:961–973setPhase
public Builder setPhase(java.lang.String value)
设置设置阶段。
string phase = 2;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | java.lang.String | 阶段到设置。The phase to set. |
Builderio/agentscope/aistio/proto/SessionSnapshot.java:979–986clearPhase
public Builder clearPhase()
清空阶段。
string phase = 2;
Builderio/agentscope/aistio/proto/SessionSnapshot.java:991–996setPhaseBytes
public Builder setPhaseBytes(com.google.protobuf.ByteString value)
设置设置阶段字节。
string phase = 2;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | com.google.protobuf.ByteString | 字节用于阶段到设置。The bytes for phase to set. |
Builderio/agentscope/aistio/proto/SessionSnapshot.java:1002–1010getMessageCount
public int getMessageCount()
获取消息数量。
int32 message_count = 3;
intio/agentscope/aistio/proto/SessionSnapshot.java:1017–1020setMessageCount
public Builder setMessageCount(int value)
设置设置消息数量。
int32 message_count = 3;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | int | messageCount 到设置。The messageCount to set. |
Builderio/agentscope/aistio/proto/SessionSnapshot.java:1026–1032clearMessageCount
public Builder clearMessageCount()
清空消息数量。
int32 message_count = 3;
Builderio/agentscope/aistio/proto/SessionSnapshot.java:1037–1042getPromptTokens
public long getPromptTokens()
获取提示词令牌数。
int64 prompt_tokens = 4;
longio/agentscope/aistio/proto/SessionSnapshot.java:1049–1052setPromptTokens
public Builder setPromptTokens(long value)
设置设置提示词令牌数。
int64 prompt_tokens = 4;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | long | promptTokens 到设置。The promptTokens to set. |
Builderio/agentscope/aistio/proto/SessionSnapshot.java:1058–1064clearPromptTokens
public Builder clearPromptTokens()
清空提示词令牌数。
int64 prompt_tokens = 4;
Builderio/agentscope/aistio/proto/SessionSnapshot.java:1069–1074getCompletionTokens
public long getCompletionTokens()
获取补全令牌数。
int64 completion_tokens = 5;
longio/agentscope/aistio/proto/SessionSnapshot.java:1081–1084setCompletionTokens
public Builder setCompletionTokens(long value)
设置设置补全令牌数。
int64 completion_tokens = 5;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | long | completionTokens 到设置。The completionTokens to set. |
Builderio/agentscope/aistio/proto/SessionSnapshot.java:1090–1096clearCompletionTokens
public Builder clearCompletionTokens()
清空补全令牌数。
int64 completion_tokens = 5;
Builderio/agentscope/aistio/proto/SessionSnapshot.java:1101–1106getContextPressure
public double getContextPressure()
获取 getContextPressure。
double context_pressure = 6;
doubleio/agentscope/aistio/proto/SessionSnapshot.java:1113–1116setContextPressure
public Builder setContextPressure(double value)
设置该配置项。
double context_pressure = 6;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | double | contextPressure 到设置。The contextPressure to set. |
Builderio/agentscope/aistio/proto/SessionSnapshot.java:1122–1128clearContextPressure
public Builder clearContextPressure()
清空 clearContextPressure。
double context_pressure = 6;
Builderio/agentscope/aistio/proto/SessionSnapshot.java:1133–1138getFramework
public java.lang.String getFramework()
获取 getFramework。
Framework identification (Level 1 extension, see sdk-design.md §3.1) string framework = 10;
java.lang.Stringio/agentscope/aistio/proto/SessionSnapshot.java:1149–1160getFrameworkBytes
public com.google.protobuf.ByteString getFrameworkBytes()
获取 getFrameworkBytes。
Framework identification (Level 1 extension, see sdk-design.md §3.1) string framework = 10;
com.google.protobuf.ByteStringio/agentscope/aistio/proto/SessionSnapshot.java:1169–1181setFramework
public Builder setFramework(java.lang.String value)
设置该配置项。
Framework identification (Level 1 extension, see sdk-design.md §3.1) string framework = 10;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | java.lang.String | 值(类型 `java.lang.String`)。The framework to set. |
Builderio/agentscope/aistio/proto/SessionSnapshot.java:1191–1198clearFramework
public Builder clearFramework()
清空 clearFramework。
Framework identification (Level 1 extension, see sdk-design.md §3.1) string framework = 10;
Builderio/agentscope/aistio/proto/SessionSnapshot.java:1207–1212setFrameworkBytes
public Builder setFrameworkBytes(com.google.protobuf.ByteString value)
设置该配置项。
Framework identification (Level 1 extension, see sdk-design.md §3.1) string framework = 10;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | com.google.protobuf.ByteString | 值(类型 `com.google.protobuf.ByteString`)。The bytes for framework to set. |
Builderio/agentscope/aistio/proto/SessionSnapshot.java:1222–1230getFrameworkVersion
public java.lang.String getFrameworkVersion()
获取 getFrameworkVersion。
string framework_version = 11;
java.lang.Stringio/agentscope/aistio/proto/SessionSnapshot.java:1237–1248getFrameworkVersionBytes
public com.google.protobuf.ByteString getFrameworkVersionBytes()
获取 getFrameworkVersionBytes。
string framework_version = 11;
com.google.protobuf.ByteStringio/agentscope/aistio/proto/SessionSnapshot.java:1253–1265setFrameworkVersion
public Builder setFrameworkVersion(java.lang.String value)
设置该配置项。
string framework_version = 11;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | java.lang.String | frameworkVersion 到设置。The frameworkVersion to set. |
Builderio/agentscope/aistio/proto/SessionSnapshot.java:1271–1278clearFrameworkVersion
public Builder clearFrameworkVersion()
清空 clearFrameworkVersion。
string framework_version = 11;
Builderio/agentscope/aistio/proto/SessionSnapshot.java:1283–1288setFrameworkVersionBytes
public Builder setFrameworkVersionBytes(com.google.protobuf.ByteString value)
设置该配置项。
string framework_version = 11;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | com.google.protobuf.ByteString | 字节用于 frameworkVersion 到设置。The bytes for frameworkVersion to set. |
Builderio/agentscope/aistio/proto/SessionSnapshot.java:1294–1302getContextHash
public java.lang.String getContextHash()
获取 getContextHash。
Context change detection string context_hash = 12;
java.lang.Stringio/agentscope/aistio/proto/SessionSnapshot.java:1313–1324getContextHashBytes
public com.google.protobuf.ByteString getContextHashBytes()
获取 getContextHashBytes。
Context change detection string context_hash = 12;
com.google.protobuf.ByteStringio/agentscope/aistio/proto/SessionSnapshot.java:1333–1345setContextHash
public Builder setContextHash(java.lang.String value)
设置该配置项。
Context change detection string context_hash = 12;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | java.lang.String | contextHash 到设置。The contextHash to set. |
Builderio/agentscope/aistio/proto/SessionSnapshot.java:1355–1362clearContextHash
public Builder clearContextHash()
清空 clearContextHash。
Context change detection string context_hash = 12;
Builderio/agentscope/aistio/proto/SessionSnapshot.java:1371–1376setContextHashBytes
public Builder setContextHashBytes(com.google.protobuf.ByteString value)
设置该配置项。
Context change detection string context_hash = 12;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | com.google.protobuf.ByteString | 字节用于 contextHash 到设置。The bytes for contextHash to set. |
Builderio/agentscope/aistio/proto/SessionSnapshot.java:1386–1394getIsCompacted
public boolean getIsCompacted()
获取 getIsCompacted。
whether the context has been compacted bool is_compacted = 13;
booleanio/agentscope/aistio/proto/SessionSnapshot.java:1405–1408setIsCompacted
public Builder setIsCompacted(boolean value)
设置该配置项。
whether the context has been compacted bool is_compacted = 13;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | boolean | isCompacted 到设置。The isCompacted to set. |
Builderio/agentscope/aistio/proto/SessionSnapshot.java:1418–1424clearIsCompacted
public Builder clearIsCompacted()
清空 clearIsCompacted。
whether the context has been compacted bool is_compacted = 13;
Builderio/agentscope/aistio/proto/SessionSnapshot.java:1433–1438getEffectiveMessageCount
public int getEffectiveMessageCount()
获取 getEffectiveMessageCount。
effective messages after compaction (!= message_count) int32 effective_message_count = 14;
intio/agentscope/aistio/proto/SessionSnapshot.java:1449–1452setEffectiveMessageCount
public Builder setEffectiveMessageCount(int value)
设置该配置项。
effective messages after compaction (!= message_count) int32 effective_message_count = 14;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | int | effectiveMessageCount 到设置。The effectiveMessageCount to set. |
Builderio/agentscope/aistio/proto/SessionSnapshot.java:1462–1468clearEffectiveMessageCount
public Builder clearEffectiveMessageCount()
清空 clearEffectiveMessageCount。
effective messages after compaction (!= message_count) int32 effective_message_count = 14;
Builderio/agentscope/aistio/proto/SessionSnapshot.java:1477–1482