AIContext.Tools Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a sequence of tools or functions to make available to the AI model for the current invocation.
public System.Collections.Generic.IEnumerable<Microsoft.Extensions.AI.AITool>? Tools { get; set; }
member this.Tools : seq<Microsoft.Extensions.AI.AITool> with get, set
Public Property Tools As IEnumerable(Of AITool)
Property Value
A sequence of AITool instances that will be available to the AI model during the current invocation,
or null if no additional tools should be provided.
Remarks
These tools are transient and apply only to the current AI model invocation. Any existing tools are provided as input to the AIContextProvider instances, so context providers can choose to modify or replace the existing tools as needed based on the current context. The resulting set of tools is then passed to the underlying AI model, which may choose to utilize them when generating responses.
Context-specific tools enable:
- Providing specialized functions based on user intent or conversation context
- Adding domain-specific capabilities for particular types of queries
- Enabling access to external services or data sources relevant to the current task
- Offering interactive capabilities tailored to the current conversation state