Builder
public static class Builder
源码Source
io/agentscope/core/training/strategy/TrainingAnnotation.java:171–206用于TrainingAnnotation的构建器类。位于 io.agentscope.core.training.strategy 包。核心成员包括 enabled、taskId、labels、metadata、timestamp、build。
Builder class for TrainingAnnotation.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Builder enabled(boolean enabled) | 启用d。 Performs the enabled operation. |
public Builder taskId(String taskId) | 设置任务标识。 Performs the task id operation. |
public Builder labels(List<String> labels) | 设置该配置项。 Performs the labels operation. |
public Builder metadata(Map<String, Object> metadata) | 设置元数据。 Performs the metadata operation. |
public Builder timestamp(long timestamp) | 设置时间戳。 Performs the timestamp operation. |
public TrainingAnnotation build() | 构建并返回最终实例。 Creates and returns an instance. |
方法详情Method Detail
enabled
public Builder enabled(boolean enabled)
启用d。
Performs the enabled operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
enabled | boolean | 已启用(类型 `boolean`)。The enabled. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/training/strategy/TrainingAnnotation.java:178–181taskId
public Builder taskId(String taskId)
设置任务标识。
Performs the task id operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
taskId | String | 任务标识(类型 `String`)。The task id. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/training/strategy/TrainingAnnotation.java:183–186labels
public Builder labels(List<String> labels)
设置该配置项。
Performs the labels operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
labels | List<String> | labels(类型 `List`)。The labels. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/training/strategy/TrainingAnnotation.java:188–191metadata
public Builder metadata(Map<String, Object> metadata)
设置元数据。
Performs the metadata operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
metadata | Map<String, Object> | 元数据(类型 `Map`)。The metadata. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/training/strategy/TrainingAnnotation.java:193–196timestamp
public Builder timestamp(long timestamp)
设置时间戳。
Performs the timestamp operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
timestamp | long | 时间戳(类型 `long`)。The timestamp. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/training/strategy/TrainingAnnotation.java:198–201build
public TrainingAnnotation build()
构建并返回最终实例。
Creates and returns an instance.
TrainingAnnotation返回TrainingAnnotation。Returns training annotation.
源码Source
io/agentscope/core/training/strategy/TrainingAnnotation.java:203–205