次の方法で共有


ChatToolMode Class

Definition

Describes how tools should be selected by a IChatClient.

public ref class ChatToolMode
[System.Text.Json.Serialization.JsonDerivedType(typeof(Microsoft.Extensions.AI.AutoChatToolMode), "auto")]
[System.Text.Json.Serialization.JsonDerivedType(typeof(Microsoft.Extensions.AI.RequiredChatToolMode), "required")]
[System.Text.Json.Serialization.JsonPolymorphic(TypeDiscriminatorPropertyName="$type")]
public class ChatToolMode
[<System.Text.Json.Serialization.JsonDerivedType(typeof(Microsoft.Extensions.AI.AutoChatToolMode), "auto")>]
[<System.Text.Json.Serialization.JsonDerivedType(typeof(Microsoft.Extensions.AI.RequiredChatToolMode), "required")>]
[<System.Text.Json.Serialization.JsonPolymorphic(TypeDiscriminatorPropertyName="$type")>]
type ChatToolMode = class
Public Class ChatToolMode
Inheritance
ChatToolMode
Derived
Attributes

Remarks

The predefined values Auto and RequireAny are provided. To nominate a specific function, use RequireSpecific(String).

Properties

Auto

Gets a predefined ChatToolMode indicating that tool usage is optional.

RequireAny

Gets a predefined ChatToolMode indicating that tool usage is required, but that any tool may be selected. At least one tool must be provided in Tools.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
RequireSpecific(String)

Instantiates a ChatToolMode indicating that tool usage is required, and that the specified AIFunction must be selected. The function name must match an entry in Tools.

ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to