Choice 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.
The representation of a single prompt completion as part of an overall 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 Choice : System.ClientModel.Primitives.IJsonModel<Azure.AI.OpenAI.Choice>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.OpenAI.Choice>
type Choice = class
interface IJsonModel<Choice>
interface IPersistableModel<Choice>
Public Class Choice
Implements IJsonModel(Of Choice), IPersistableModel(Of Choice)
- Inheritance
-
Choice
- Implements
Properties
ContentFilterResults |
Information about the content filtering category (hate, sexual, violence, self_harm), if it has been detected, as well as the severity level (very_low, low, medium, high-scale that determines the intensity and risk level of harmful content) and if it has been filtered or not. |
FinishReason |
Reason for finishing. |
Index |
The ordered index associated with this completions choice. |
LogProbabilityModel |
The log probabilities model for tokens associated with this completions choice. |
Text |
The generated text for a given completions prompt. |
Explicit Interface Implementations
IJsonModel<Choice>.Create(Utf8JsonReader, ModelReaderWriterOptions) |
Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model. |
IJsonModel<Choice>.Write(Utf8JsonWriter, ModelReaderWriterOptions) |
Writes the model to the provided Utf8JsonWriter. |
IPersistableModel<Choice>.Create(BinaryData, ModelReaderWriterOptions) |
Converts the provided BinaryData into a model. |
IPersistableModel<Choice>.GetFormatFromOptions(ModelReaderWriterOptions) |
Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service. |
IPersistableModel<Choice>.Write(ModelReaderWriterOptions) |
Writes the model into a BinaryData. |
Applies to
Azure SDK for .NET
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for