Class Choice
public sealed class Choice
- Inheritance
-
Choice
- Inherited Members
Properties
Delta
A chat completion delta generated by streamed model responses.
[JsonInclude]
[JsonPropertyName("delta")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Delta Delta { get; }
Property Value
FinishDetails
[JsonInclude]
[JsonPropertyName("finish_details")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public FinishDetails FinishDetails { get; }
Property Value
FinishReason
The reason the model stopped generating tokens. This will be stop if the model hit a natural stop point or a provided stop sequence, length if the maximum number of tokens specified in the request was reached, content_filter if content was omitted due to a flag from our content filters, tool_calls if the model called a tool, or function_call (deprecated) if the model called a function.
[JsonInclude]
[JsonPropertyName("finish_reason")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string FinishReason { get; }
Property Value
Index
The index of the choice in the list of choices.
[JsonInclude]
[JsonPropertyName("index")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public int? Index { get; }
Property Value
- int?
LogProbs
Log probability information for the choice.
[JsonInclude]
[JsonPropertyName("logprobs")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public LogProbs LogProbs { get; }
Property Value
Message
A chat completion message generated by the model.
[JsonInclude]
[JsonPropertyName("message")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Message Message { get; }
Property Value
Methods
AppendFrom(Choice)
public void AppendFrom(Choice other)
Parameters
other
Choice
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
Operators
implicit operator string(Choice)
public static implicit operator string(Choice choice)
Parameters
choice
Choice