程序包 com.sh.ai
类 AiToolUtil
java.lang.Object
com.sh.ai.AiToolUtil
AI工具类
-
嵌套类概要
嵌套类 -
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static List<SelfToolCall>appendAgentTool(AIBaseConfig config, List<SelfToolCall> selfToolCallList, String text) 供模型调用,添加解析的工具static StringgetChartsImagePath(String chartId) 工具生成图表截图上传资源服务器路径static SystemToolInfogetSystemToolInfo(String toolName) static AiToolUtil.AiToolInfo从文本中获取工具信息static voidprocessSystemTools(ModuleContext context, AIBaseConfig config, List<String> toolList) 将系统可用工具拼接到系统提示词里static voidrefresh()刷新系统工具static voidrefresh(DataCenter dc)
-
字段详细资料
-
TOOL_RET_TYPE_ECHARTS
- 另请参阅:
-
systemToolsMap
-
-
构造器详细资料
-
AiToolUtil
public AiToolUtil()
-
-
方法详细资料
-
refresh
public static void refresh()刷新系统工具 -
refresh
-
getSystemToolInfo
-
processSystemTools
public static void processSystemTools(ModuleContext context, AIBaseConfig config, List<String> toolList) 将系统可用工具拼接到系统提示词里- 参数:
context-config-tools-
-
appendAgentTool
public static List<SelfToolCall> appendAgentTool(AIBaseConfig config, List<SelfToolCall> selfToolCallList, String text) 供模型调用,添加解析的工具- 参数:
selfToolCallList-text-- 返回:
List<SelfToolCall>
-
getTool
从文本中获取工具信息- 参数:
text- 文本内容,一般为大模型返回的结果- 返回:
AiToolUtil.AiToolInfo返回识别到的最后一个工具,因为工具只允许一次调用一个,但think里可能也用报文,所以用提取的最后一个做为当前有效的工具
-
getChartsImagePath
工具生成图表截图上传资源服务器路径- 参数:
chartId-- 返回:
String
-