AS AgentScopeAPI 手册 / API Reference

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
enabledboolean已启用(类型 `boolean`)。The enabled.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/training/strategy/TrainingAnnotation.java:178–181

taskId

public Builder taskId(String taskId)

设置任务标识。

Performs the task id operation.

参数Parameters
名称Name类型Type说明Description
taskIdString任务标识(类型 `String`)。The task id.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/training/strategy/TrainingAnnotation.java:183–186

labels

public Builder labels(List<String> labels)

设置该配置项。

Performs the labels operation.

参数Parameters
名称Name类型Type说明Description
labelsList<String>labels(类型 `List`)。The labels.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/training/strategy/TrainingAnnotation.java:188–191

metadata

public Builder metadata(Map<String, Object> metadata)

设置元数据。

Performs the metadata operation.

参数Parameters
名称Name类型Type说明Description
metadataMap<String, Object>元数据(类型 `Map`)。The metadata.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/training/strategy/TrainingAnnotation.java:193–196

timestamp

public Builder timestamp(long timestamp)

设置时间戳。

Performs the timestamp operation.

参数Parameters
名称Name类型Type说明Description
timestamplong时间戳(类型 `long`)。The timestamp.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/training/strategy/TrainingAnnotation.java:198–201

build

public TrainingAnnotation build()

构建并返回最终实例。

Creates and returns an instance.

返回Returns TrainingAnnotation
返回TrainingAnnotation。Returns training annotation.
源码Source io/agentscope/core/training/strategy/TrainingAnnotation.java:203–205
基于官方固定版本源码静态生成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.