ToolSet class
表示一组具有其定义和资源的工具。
属性
tool |
已添加到工具集的工具定义列表。 |
tool |
与工具集中的工具关联的资源集合。 |
方法
add |
将 Azure AI 搜索工具添加到工具集。 |
add |
将 Bing 接地搜索工具添加到工具集中。 |
add |
将代码解释器工具添加到工具集。 |
add |
将连接的代理工具添加到工具集。 |
add |
将连接工具添加到工具集。 |
add |
将 Microsoft Fabric 工具添加到工具集。 |
add |
将文件搜索工具添加到工具集。 |
add |
将 OpenApi 工具添加到工具集。 |
add |
将 SharePoint 接地搜索工具添加到工具集中。 |
属性详细信息
toolDefinitions
toolResources
方法详细信息
addAzureAISearchTool(string, string)
将 Azure AI 搜索工具添加到工具集。
function addAzureAISearchTool(indexConnectionId: string, indexName: string): { definition: AzureAISearchToolDefinition, resources: ToolResources }
参数
- indexConnectionId
-
string
Azure AI 搜索索引的连接 ID。
- indexName
-
string
Azure AI 搜索索引的名称。
返回
{ definition: AzureAISearchToolDefinition, resources: ToolResources }
包含 Azure AI 搜索工具的定义和资源的对象
addBingGroundingTool(BingGroundingSearchConfiguration[])
将 Bing 接地搜索工具添加到工具集中。
function addBingGroundingTool(searchConfigurations: BingGroundingSearchConfiguration[]): { definition: BingGroundingToolDefinition }
参数
- searchConfigurations
返回
{ definition: BingGroundingToolDefinition }
包含 bing 接地搜索工具的定义和资源的对象
addCodeInterpreterTool(string[], VectorStoreDataSource[])
将代码解释器工具添加到工具集。
function addCodeInterpreterTool(fileIds?: string[], dataSources?: VectorStoreDataSource[]): { definition: CodeInterpreterToolDefinition, resources: ToolResources }
参数
- fileIds
-
string[]
可供 code_interpreter
工具使用的文件 ID 列表。 最多可以有 20 个与该工具关联的文件。
- dataSources
要使用的数据源。 此选项与 fileId 互斥。
返回
{ definition: CodeInterpreterToolDefinition, resources: ToolResources }
包含代码解释器工具的定义和资源的对象
addConnectedAgentTool(string, string, string)
将连接的代理工具添加到工具集。
function addConnectedAgentTool(id: string, name: string, description: string): { definition: ConnectedAgentToolDefinition }
参数
- id
-
string
连接的代理的 ID。
- name
-
string
连接的代理的名称。
- description
-
string
连接的代理的描述。
返回
{ definition: ConnectedAgentToolDefinition }
包含 connected agent 工具定义的对象
addConnectionTool(connectionToolType, string[])
将连接工具添加到工具集。
function addConnectionTool(toolType: connectionToolType, connectionIds: string[]): { definition: ToolDefinition }
参数
- toolType
- connectionToolType
连接工具的类型。
- connectionIds
-
string[]
要使用的连接的 ID 列表。
返回
{ definition: ToolDefinition }
包含连接工具定义的对象
addFabricTool(string)
将 Microsoft Fabric 工具添加到工具集。
function addFabricTool(connectionId: string): { definition: MicrosoftFabricToolDefinition }
参数
- connectionId
-
string
要使用的 Fabric 连接的 ID。
返回
{ definition: MicrosoftFabricToolDefinition }
包含 Microsoft Fabric 工具定义的对象
addFileSearchTool(string[], VectorStoreConfigurations[], FileSearchToolDefinitionDetails)
将文件搜索工具添加到工具集。
function addFileSearchTool(vectorStoreIds?: string[], vectorStores?: VectorStoreConfigurations[], definitionDetails?: FileSearchToolDefinitionDetails): { definition: FileSearchToolDefinition, resources: ToolResources }
参数
- vectorStoreIds
-
string[]
附加到此代理的向量存储的 ID。 最多可以有 1 个向量存储附加到代理。
- vectorStores
来自 Azure 的矢量存储配置对象列表。 此列表限制为一个元素。 此列表的唯一元素包含搜索工具使用的 Azure 资产 ID 列表。
- definitionDetails
- FileSearchToolDefinitionDetails
用于配置代理的文件搜索工具的输入定义信息。
返回
{ definition: FileSearchToolDefinition, resources: ToolResources }
包含文件搜索工具的定义和资源的对象
addOpenApiTool(OpenApiFunctionDefinition)
将 OpenApi 工具添加到工具集。
function addOpenApiTool(openApiFunctionDefinition: OpenApiFunctionDefinition): { definition: OpenApiToolDefinition }
参数
- openApiFunctionDefinition
- OpenApiFunctionDefinition
要使用的 OpenApi 函数定义。
返回
{ definition: OpenApiToolDefinition }
包含 OpenApi 工具定义的对象
addSharepointGroundingTool(string)
将 SharePoint 接地搜索工具添加到工具集中。
function addSharepointGroundingTool(connectionId: string): { definition: SharepointToolDefinition }
参数
- connectionId
-
string
SharePoint 搜索连接的 ID。
返回
{ definition: SharepointToolDefinition }
包含 SharePoint 接地搜索工具的定义和资源的对象