Builder
public static class Builder
源码Source
io/agentscope/core/formatter/ResponseFormat.java:121–139构建器,用于构建并配置目标实例。位于 io.agentscope.core.formatter 包。核心成员包括 type、jsonSchema、build。
A class in io.agentscope.core.formatter that carries structured messages and events between agents, models and UIs. Declared in io.agentscope.core.formatter.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Builder type(String type) | 设置类型。 Performs the type operation. |
public Builder jsonSchema(JsonSchema jsonSchema) | 设置JSON 模式。 Performs the json schema operation. |
public ResponseFormat build() | 构建并返回最终实例。 Creates and returns an instance. |
方法详情Method Detail
type
public Builder type(String type)
设置类型。
Performs the type operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
type | String | 类型(类型 `String`)。The type. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/formatter/ResponseFormat.java:125–128jsonSchema
public Builder jsonSchema(JsonSchema jsonSchema)
设置JSON 模式。
Performs the json schema operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
jsonSchema | JsonSchema | JSON 模式(类型 `JsonSchema`)。The json schema. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/formatter/ResponseFormat.java:130–134build
public ResponseFormat build()
构建并返回最终实例。
Creates and returns an instance.
ResponseFormat返回ResponseFormat。Returns response format.
源码Source
io/agentscope/core/formatter/ResponseFormat.java:136–138