接口的使用
io.agentscope.core.model.ToolChoice
使用ToolChoice的程序包
-
io.agentscope.core.formatter中ToolChoice的使用
参数类型为ToolChoice的io.agentscope.core.formatter中的方法修饰符和类型方法说明default voidFormatter.applyToolChoice(TParams paramsBuilder, ToolChoice toolChoice) Apply tool choice configuration to provider-specific request parameters.default voidFormatter.applyToolChoice(TParams paramsBuilder, ToolChoice toolChoice, String baseUrl, String modelName) Apply tool choice configuration to provider-specific request parameters with provider detection. -
io.agentscope.core.model中ToolChoice的使用
修饰符和类型类说明static final recordAuto mode: Let the model decide whether and which tools to call.static final recordNone mode: Prevent the model from calling any tools.static final recordRequired mode: Force the model to call at least one tool.static final recordSpecific mode: Force the model to call a specific tool by name.修饰符和类型方法说明GenerateOptions.getToolChoice()Gets the tool choice configuration for controlling how the model uses tools.参数类型为ToolChoice的io.agentscope.core.model中的方法修饰符和类型方法说明GenerateOptions.Builder.toolChoice(ToolChoice toolChoice) Sets the tool choice configuration for controlling how the model uses tools.