HostedToolSearchTool Class

Definition

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
HostedToolSearchTool
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 serviceType.

(Inherited from AITool)
GetService<TService>(Object)

Asks the AITool for an object of type TService.

(Inherited from AITool)
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.

Applies to