ToolSchema
public class ToolSchema
源码Source
io/agentscope/core/model/ToolSchema.java:28–182工具模式,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.core.model 包。核心成员包括 getName、getDescription、getParameters、getOutputSchema、getStrict、builder。
Immutable tool schema definition. Describes a tool's interface using JSON Schema for parameters.
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
Builder | 类class | 构建器,用于构建并配置目标实例。 Builder for creating ToolSchema instances. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String getName() | 获取工具名称。 Gets the tool name. |
public String getDescription() | 获取 `getDescription`。 Gets the tool description. |
public Map<String, Object> getParameters() | 获取工具参数 as JSON 模式。 Gets the tool parameters as a JSON Schema. |
public Map<String, Object> getOutputSchema() | 获取可选工具输出模式 as JSON 模式。 Gets the optional tool output schema as a JSON Schema. |
public Boolean getStrict() | 获取 `getStrict`。 Gets the strict mode flag for schema validation. |
public static Builder builder()static | 创建新的构建器用于 ToolSchema。 Creates a new builder for ToolSchema. |
方法详情Method Detail
getName
public String getName()
获取工具名称。
Gets the tool name.
String工具名称。the tool name
源码Source
io/agentscope/core/model/ToolSchema.java:59–61getDescription
public String getDescription()
获取 getDescription。
Gets the tool description.
String返回字符串结果。the tool description
源码Source
io/agentscope/core/model/ToolSchema.java:68–70getParameters
public Map<String, Object> getParameters()
获取工具参数 as JSON 模式。
Gets the tool parameters as a JSON Schema.
Map<String, Object>返回映射。an unmodifiable map containing the parameter schema
源码Source
io/agentscope/core/model/ToolSchema.java:77–79getOutputSchema
public Map<String, Object> getOutputSchema()
获取可选工具输出模式 as JSON 模式。
Gets the optional tool output schema as a JSON Schema.
Map<String, Object>返回映射。an unmodifiable map containing the output schema, or null if unspecified
源码Source
io/agentscope/core/model/ToolSchema.java:86–88getStrict
public Boolean getStrict()
获取 getStrict。
Gets the strict mode flag for schema validation.
Boolean返回布尔值,表示判断结果。true if strict mode is enabled, false otherwise, or null if not specified
源码Source
io/agentscope/core/model/ToolSchema.java:95–97builder
public static Builder builder()
static
创建新的构建器用于 ToolSchema。
Creates a new builder for ToolSchema.
Builder一种新的构建器实例。a new Builder instance
源码Source
io/agentscope/core/model/ToolSchema.java:104–106嵌套类详情Nested Class Detail
Builder
public static class Builder构建器,用于构建并配置目标实例。位于 io.agentscope.core.model 包。核心成员包括 name、description、parameters、outputSchema、strict、build。
Builder for creating ToolSchema instances.