AS AgentScopeAPI 手册 / API Reference

Specific

record Specific(String toolName) implements ToolChoice
源码Source io/agentscope/core/model/ToolChoice.java:71–83

承载特定数据的记录类型。位于 io.agentscope.core.model 包,实现 ToolChoice。核心成员包括 toolName、Specific。

Specific mode: Force the model to call a specific tool by name.

记录组件摘要Record Component Summary

组件Component类型Type说明Description
toolNameString
执行工具名称相关操作。
The name of the tool that must be called

构造器摘要Constructor Summary

构造器Constructor说明Description
public Specific(String toolName)
创建特定工具选项。
Creates a Specific tool choice.

记录组件详情Record Component Detail

toolName

String toolName

执行工具名称相关操作。

The name of the tool that must be called

源码Source io/agentscope/core/model/ToolChoice.java:71–83

构造器详情Constructor Detail

Specific

public Specific(String toolName)

创建特定工具选项。

Creates a Specific tool choice.

参数Parameters
名称Name类型Type说明Description
toolNameString工具名称(类型 `String`)。The name of the tool that must be called (must not be null or empty)
抛出Throws
  • IllegalArgumentException 可能抛出 `IllegalArgumentException`。if toolName is null or empty
源码Source io/agentscope/core/model/ToolChoice.java:78–82
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.