HostedToolSearchTool Class
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.
Represents a hosted tool that can be specified to an AI service to enable it to search for and selectively load tool definitions on demand.
public ref class HostedToolSearchTool : Microsoft::Extensions::AI::AITool
[System.Diagnostics.CodeAnalysis.Experimental("MEAI001", UrlFormat="https://aka.ms/dotnet-extensions-warnings/{0}")]
public class HostedToolSearchTool : Microsoft.Extensions.AI.AITool
public class HostedToolSearchTool : Microsoft.Extensions.AI.AITool
[<System.Diagnostics.CodeAnalysis.Experimental("MEAI001", UrlFormat="https://aka.ms/dotnet-extensions-warnings/{0}")>]
type HostedToolSearchTool = class
inherit AITool
type HostedToolSearchTool = class
inherit AITool
Public Class HostedToolSearchTool
Inherits AITool
- Inheritance
- Attributes
Remarks
This tool does not itself implement tool search. It is a marker that can be used to inform a service that tool search should be enabled. When included, deferred tools are not placed into the model's context upfront; instead, the model invokes tool search to surface relevant tools on demand, reducing the input tokens consumed by tool definitions the model doesn't need.
By default, when a HostedToolSearchTool is present in the tools list, all other deferrable tools are treated as having deferred loading enabled. Use DeferredTools to control which tools have deferred loading on a per-tool basis.
Constructors
| Name | Description |
|---|---|
| HostedToolSearchTool() |
Initializes a new instance of the HostedToolSearchTool class. |
| HostedToolSearchTool(IReadOnlyDictionary<String,Object>) |
Initializes a new instance of the HostedToolSearchTool class. |
Properties
| Name | Description |
|---|---|
| AdditionalProperties |
Gets any additional properties associated with the tool. |
| DeferredTools |
Gets or sets the list of tool names for which deferred loading should be enabled. |
| Description |
Gets a description of the tool, suitable for use in describing the purpose to a model. (Inherited from AITool) |
| Name |
Gets the name of the tool. |
| Namespace |
Gets or sets the namespace name under which deferred tools should be grouped. |
| NamespaceDescription |
Gets or sets the description for the namespace produced when Namespace is specified. |
Methods
| Name | Description |
|---|---|
| GetService(Type, Object) |
Asks the AITool for an object of the specified type |
| GetService<TService>(Object) |
Asks the AITool for an object of type |
| ToString() |
Returns a string that represents the current object. (Inherited from AITool) |
Extension Methods
| Name | Description |
|---|---|
| AsOpenAIResponseTool(AITool) |
Creates an OpenAI ResponseTool from an AITool. |