Share via


ToolChoiceOption Class

Definition

Represents constraints placed on tool calls made by the model.

public class ToolChoiceOption : System.ClientModel.Primitives.IJsonModel<Azure.AI.VoiceLive.ToolChoiceOption>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.VoiceLive.ToolChoiceOption>
type ToolChoiceOption = class
    interface IJsonModel<ToolChoiceOption>
    interface IPersistableModel<ToolChoiceOption>
Public Class ToolChoiceOption
Implements IJsonModel(Of ToolChoiceOption), IPersistableModel(Of ToolChoiceOption)
Inheritance
ToolChoiceOption
Implements

Constructors

ToolChoiceOption(String)

Creates an options class with single tool name.

ToolChoiceOption(ToolChoiceLiteral)

Creates an options class with a fixed number of tokens.

Properties

FunctionName

The name of a single function the model is allowed to call.

ToolCallConstraint

Constraint applied to the ability of the model to call tools.

Operators

Implicit(String to ToolChoiceOption)

Creates a ToolChoiceOption class from an integer value.

Implicit(ToolChoiceLiteral to ToolChoiceOption)

Creates a ToolChoiceOption class from an integer value.

Explicit Interface Implementations

IJsonModel<ToolChoiceOption>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<ToolChoiceOption>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<ToolChoiceOption>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<ToolChoiceOption>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<ToolChoiceOption>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to