| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_SINGLE_ARG |
| Constructor and Description |
|---|
StaticTool() |
| Modifier and Type | Method and Description |
|---|---|
String |
getInputDesc()
工具的输入描述
|
String |
getInputSchema()
获取入参的Json Schema定义
|
String |
getOutputDesc()
工具的输出描述
|
String |
getOutputSchema()
获取出参的Json Schema定义,在prompt模板中调用
|
String |
getPanguFunction()
获取pangu Function的定义,在prompt模板中调用
|
String |
getToolDesc()
工具的描述
|
String |
getToolId()
工具的唯一标识,在同一个Agent里必须唯一
|
String |
getToolPrinciple()
工具使用原则,告诉模型在什么情况下使用工具
|
boolean |
isEmptyInput()
是否入参为空
|
boolean |
isSingleInput()
是否入参为单个字段
|
protected abstract OUTPUT |
run(INPUT input)
运行工具
|
Object |
runFromJson(String json)
运行工具
|
public static final String DEFAULT_SINGLE_ARG
public Object runFromJson(String json)
ToolrunFromJson in interface Tooljson - 工具的输入jsonpublic String getToolDesc()
ToolgetToolDesc in interface Toolpublic String getToolPrinciple()
ToolgetToolPrinciple in interface Toolpublic String getInputDesc()
ToolgetInputDesc in interface Toolpublic String getOutputDesc()
ToolgetOutputDesc in interface Toolpublic boolean isSingleInput()
ToolisSingleInput in interface Toolpublic boolean isEmptyInput()
ToolisEmptyInput in interface Toolpublic String getInputSchema()
ToolgetInputSchema in interface Toolpublic String getOutputSchema()
ToolgetOutputSchema in interface Toolpublic String getPanguFunction()
ToolgetPanguFunction in interface ToolCopyright © 2024. All rights reserved.