Delen via


ChatFinishReason Struct

Definition

Represents the reason a chat response completed.

public value class ChatFinishReason : IEquatable<Microsoft::Extensions::AI::ChatFinishReason>
[System.Text.Json.Serialization.JsonConverter(typeof(Microsoft.Extensions.AI.ChatFinishReason+Converter))]
public readonly struct ChatFinishReason : IEquatable<Microsoft.Extensions.AI.ChatFinishReason>
[<System.Text.Json.Serialization.JsonConverter(typeof(Microsoft.Extensions.AI.ChatFinishReason+Converter))>]
type ChatFinishReason = struct
Public Structure ChatFinishReason
Implements IEquatable(Of ChatFinishReason)
Inheritance
ChatFinishReason
Attributes
Implements

Constructors

ChatFinishReason(String)

Initializes a new instance of the ChatFinishReason struct with a string that describes the reason.

Properties

ContentFilter

Gets a ChatFinishReason representing the model filtering content, whether for safety, prohibited content, sensitive content, or other such issues.

Length

Gets a ChatFinishReason representing the model reaching the maximum length allowed for the request and/or response (typically in terms of tokens).

Stop

Gets a ChatFinishReason representing the model encountering a natural stop point or provided stop sequence.

ToolCalls

Gets a ChatFinishReason representing the model requesting the use of a tool that was defined in the request.

Value

Gets the finish reason value.

Methods

Equals(ChatFinishReason)

Indicates whether the current object is equal to another object of the same type.

Equals(Object)

Indicates whether this instance and a specified object are equal.

GetHashCode()

Returns the hash code for this instance.

ToString()

Gets the Value of the finish reason.

Operators

Equality(ChatFinishReason, ChatFinishReason)

Compares two instances.

Inequality(ChatFinishReason, ChatFinishReason)

Compares two instances.

Applies to