ExtendedModel
public interface ExtendedModel
源码Source
io/agentscope/core/tool/ExtendedModel.java:27–84定义 Extended 模型契约的接口。位于 io.agentscope.core.tool 包。核心成员包括 getAdditionalProperties、getAdditionalRequired、mergeWithBaseSchema。
Interface for extended model that adds properties to tool parameters.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Map<String, Object> getAdditionalProperties() | 获取 `getAdditionalProperties`。 Get the additional properties to merge into base schema. |
public List<String> getAdditionalRequired() | 获取 `getAdditionalRequired`。 Get the additional required fields. |
default public Map<String, Object> mergeWithBaseSchema(Map<String, Object> baseParameters)default | 合并使用基类模式。 Merge this extended model with base schema from tool. |
方法详情Method Detail
getAdditionalProperties
public Map<String, Object> getAdditionalProperties()
获取 getAdditionalProperties。
Get the additional properties to merge into base schema.
Map<String, Object>返回映射。Returns map.
源码Source
io/agentscope/core/tool/ExtendedModel.java:32getAdditionalRequired
public List<String> getAdditionalRequired()
获取 getAdditionalRequired。
Get the additional required fields.
List<String>返回列出。Returns list.
源码Source
io/agentscope/core/tool/ExtendedModel.java:37mergeWithBaseSchema
default public Map<String, Object> mergeWithBaseSchema(Map<String, Object> baseParameters)
default
合并使用基类模式。
Merge this extended model with base schema from tool.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
baseParameters | Map<String, Object> | 基类参数(类型 `Map`)。Base parameter schema from AgentTool |
Map<String, Object>返回映射。Merged schema
IllegalStateException可能抛出 `IllegalStateException`。if properties conflict
源码Source
io/agentscope/core/tool/ExtendedModel.java:46–83