ToolSet class
Represents a set of tools with their definitions and resources.
Properties
tool |
A list of tool definitions that have been added to the tool set. |
tool |
A collection of resources associated with the tools in the tool set. |
Methods
add |
Adds an Azure AI search tool to the tool set. |
add |
Adds a bing grounding search tool to the tool set. |
add |
Adds a code interpreter tool to the tool set. |
add |
Adds a connected agent tool to the tool set. |
add |
Adds a connection tool to the tool set. |
add |
Adds a Microsoft Fabric tool to the tool set. |
add |
Adds a file search tool to the tool set. |
add |
Adds an OpenApi tool to the tool set. |
add |
Adds sharepoint grounding search tool to the tool set. |
Property Details
toolDefinitions
A list of tool definitions that have been added to the tool set.
toolDefinitions: ToolDefinition[]
Property Value
toolResources
A collection of resources associated with the tools in the tool set.
toolResources: ToolResources
Property Value
Method Details
addAzureAISearchTool(string, string)
Adds an Azure AI search tool to the tool set.
function addAzureAISearchTool(indexConnectionId: string, indexName: string): { definition: AzureAISearchToolDefinition, resources: ToolResources }
Parameters
- indexConnectionId
-
string
The connection ID of the Azure AI search index.
- indexName
-
string
The name of the Azure AI search index.
Returns
{ definition: AzureAISearchToolDefinition, resources: ToolResources }
An object containing the definition and resources for the Azure AI search tool
addBingGroundingTool(BingGroundingSearchConfiguration[])
Adds a bing grounding search tool to the tool set.
function addBingGroundingTool(searchConfigurations: BingGroundingSearchConfiguration[]): { definition: BingGroundingToolDefinition }
Parameters
- searchConfigurations
Returns
{ definition: BingGroundingToolDefinition }
An object containing the definition and resources for the bing grounding search tool
addCodeInterpreterTool(string[], VectorStoreDataSource[])
Adds a code interpreter tool to the tool set.
function addCodeInterpreterTool(fileIds?: string[], dataSources?: VectorStoreDataSource[]): { definition: CodeInterpreterToolDefinition, resources: ToolResources }
Parameters
- fileIds
-
string[]
A list of file IDs made available to the code_interpreter
tool. There can be a maximum of 20 files associated with the tool.
- dataSources
The data sources to be used. This option is mutually exclusive with fileIds.
Returns
{ definition: CodeInterpreterToolDefinition, resources: ToolResources }
An object containing the definition and resources for the code interpreter tool
addConnectedAgentTool(string, string, string)
Adds a connected agent tool to the tool set.
function addConnectedAgentTool(id: string, name: string, description: string): { definition: ConnectedAgentToolDefinition }
Parameters
- id
-
string
The ID of the connected agent.
- name
-
string
The name of the connected agent.
- description
-
string
The description of the connected agent.
Returns
{ definition: ConnectedAgentToolDefinition }
An object containing the definition for the connected agent tool
addConnectionTool(connectionToolType, string[])
Adds a connection tool to the tool set.
function addConnectionTool(toolType: connectionToolType, connectionIds: string[]): { definition: ToolDefinition }
Parameters
- toolType
- connectionToolType
The type of the connection tool.
- connectionIds
-
string[]
A list of the IDs of the connections to use.
Returns
{ definition: ToolDefinition }
An object containing the definition for the connection tool
addFabricTool(string)
Adds a Microsoft Fabric tool to the tool set.
function addFabricTool(connectionId: string): { definition: MicrosoftFabricToolDefinition }
Parameters
- connectionId
-
string
The ID of the Fabric connection to use.
Returns
{ definition: MicrosoftFabricToolDefinition }
An object containing the definition for the Microsoft Fabric tool
addFileSearchTool(string[], VectorStoreConfigurations[], FileSearchToolDefinitionDetails)
Adds a file search tool to the tool set.
function addFileSearchTool(vectorStoreIds?: string[], vectorStores?: VectorStoreConfigurations[], definitionDetails?: FileSearchToolDefinitionDetails): { definition: FileSearchToolDefinition, resources: ToolResources }
Parameters
- vectorStoreIds
-
string[]
The ID of the vector store attached to this agent. There can be a maximum of 1 vector store attached to the agent.
- vectorStores
The list of vector store configuration objects from Azure. This list is limited to one element. The only element of this list contains the list of azure asset IDs used by the search tool.
- definitionDetails
- FileSearchToolDefinitionDetails
The input definition information for a file search tool as used to configure an agent.
Returns
{ definition: FileSearchToolDefinition, resources: ToolResources }
An object containing the definition and resources for the file search tool
addOpenApiTool(OpenApiFunctionDefinition)
Adds an OpenApi tool to the tool set.
function addOpenApiTool(openApiFunctionDefinition: OpenApiFunctionDefinition): { definition: OpenApiToolDefinition }
Parameters
- openApiFunctionDefinition
- OpenApiFunctionDefinition
The OpenApi function definition to use.
Returns
{ definition: OpenApiToolDefinition }
An object containing the definition for the OpenApi tool
addSharepointGroundingTool(string)
Adds sharepoint grounding search tool to the tool set.
function addSharepointGroundingTool(connectionId: string): { definition: SharepointToolDefinition }
Parameters
- connectionId
-
string
The ID of the sharepoint search connection.
Returns
{ definition: SharepointToolDefinition }
An object containing the definition and resources for the sharepoint grounding search tool