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 an Azure Function tool to the tool set. |
add |
Adds a code interpreter 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. |
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
addAzureFunctionTool(string, string, unknown, AzureFunctionStorageQueue, AzureFunctionStorageQueue, AzureFunctionDefinition)
Adds an Azure Function tool to the tool set.
function addAzureFunctionTool(name: string, description: string, parameters: unknown, inputQueue: AzureFunctionStorageQueue, outputQueue: AzureFunctionStorageQueue, definitionDetails: AzureFunctionDefinition): { definition: AzureFunctionToolDefinition, resources: ToolResources }
Parameters
- name
-
string
The name of the Azure Function.
- description
-
string
The description of the Azure Function.
- parameters
-
unknown
The parameters of the Azure Function.
- inputQueue
- AzureFunctionStorageQueue
The input queue configuration.
- outputQueue
- AzureFunctionStorageQueue
The output queue configuration.
- definitionDetails
- AzureFunctionDefinition
Returns
{ definition: AzureFunctionToolDefinition, resources: ToolResources }
An object containing the definition and resources for the Azure Function 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
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: ToolDefinition }
Parameters
- connectionId
-
string
The ID of the Fabric connection to use.
Returns
{ definition: ToolDefinition }
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