Builder
public static final class Builder
源码Source
io/agentscope/extensions/aistio/model/SessionEvent.java:156–235用于SessionEvent的可变构建器。位于 io.agentscope.extensions.aistio.model 包。核心成员包括 sessionId、eventType、occurredAt、role、content、toolName。
Mutable builder for SessionEvent.
方法摘要Method Summary
方法详情Method Detail
sessionId
public Builder sessionId(String sessionId)
设置会话标识。
Performs the session id operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sessionId | String | 会话标识(类型 `String`)。The session id. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/aistio/model/SessionEvent.java:171–174eventType
public Builder eventType(String eventType)
设置事件类型。
Performs the event type operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
eventType | String | 事件类型(类型 `String`)。The event type. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/aistio/model/SessionEvent.java:176–179occurredAt
public Builder occurredAt(long occurredAt)
设置该配置项。
Performs the occurred at operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
occurredAt | long | occurred At(类型 `long`)。The occurred at. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/aistio/model/SessionEvent.java:181–184role
public Builder role(String role)
设置角色。
Performs the role operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
role | String | 角色(类型 `String`)。The role. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/aistio/model/SessionEvent.java:186–189content
public Builder content(String content)
设置内容。
Performs the content operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
content | String | 内容(类型 `String`)。The content. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/aistio/model/SessionEvent.java:191–194toolName
public Builder toolName(String toolName)
设置工具名称。
Performs the tool name operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
toolName | String | 工具名称(类型 `String`)。The tool name. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/aistio/model/SessionEvent.java:196–199toolInput
public Builder toolInput(byte[] toolInput)
设置工具输入。
Performs the tool input operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
toolInput | byte[] | 工具输入(类型 `byte[]`)。The tool input. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/aistio/model/SessionEvent.java:201–204toolInputJson
public Builder toolInputJson(String json)
设置工具输入 JSON。
Performs the tool input json operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
json | String | JSON(类型 `String`)。The json. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/aistio/model/SessionEvent.java:206–209toolOutput
public Builder toolOutput(String toolOutput)
设置工具输出。
Performs the tool output operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
toolOutput | String | 工具输出(类型 `String`)。The tool output. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/aistio/model/SessionEvent.java:211–214tokens
public Builder tokens(int tokensIn, int tokensOut)
设置令牌数。
Performs the tokens operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
tokensIn | int | 令牌数 In(类型 `int`)。The tokens in. |
tokensOut | int | 令牌数 Out(类型 `int`)。The tokens out. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/aistio/model/SessionEvent.java:216–220durationMs
public Builder durationMs(int durationMs)
设置时长 Ms。
Performs the duration ms operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
durationMs | int | 时长 Ms(类型 `int`)。The duration ms. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/aistio/model/SessionEvent.java:222–225frameworkMeta
public Builder frameworkMeta(byte[] frameworkMeta)
设置该配置项。
Performs the framework meta operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
frameworkMeta | byte[] | framework 元数据(类型 `byte[]`)。The framework meta. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/aistio/model/SessionEvent.java:227–230build
public SessionEvent build()
构建并返回最终实例。
Creates and returns an instance.
SessionEvent返回SessionEvent。Returns session event.
源码Source
io/agentscope/extensions/aistio/model/SessionEvent.java:232–234