Partager via


ChatChoice Class

Definition

The representation of a single prompt completion as part of an overall chat completions request. Generally, n choices are generated per provided prompt with a default value of 1. Token limits and other settings may limit the number of choices generated.

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

Properties

FinishReason

The reason that this chat completions choice completed its generated.

Index

The ordered index associated with this chat completions choice.

Message

The chat message for a given chat completions prompt.

Explicit Interface Implementations

IJsonModel<ChatChoice>.Create(Utf8JsonReader, ModelReaderWriterOptions)

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

IJsonModel<ChatChoice>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<ChatChoice>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<ChatChoice>.GetFormatFromOptions(ModelReaderWriterOptions)

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

IPersistableModel<ChatChoice>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to