ChatRole Struct
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.
Describes the intended purpose of a message within a chat completion interaction.
public value class ChatRole : IEquatable<Microsoft::Extensions::AI::ChatRole>
[System.Text.Json.Serialization.JsonConverter(typeof(Microsoft.Extensions.AI.ChatRole+Converter))]
public readonly struct ChatRole : IEquatable<Microsoft.Extensions.AI.ChatRole>
[<System.Text.Json.Serialization.JsonConverter(typeof(Microsoft.Extensions.AI.ChatRole+Converter))>]
type ChatRole = struct
Public Structure ChatRole
Implements IEquatable(Of ChatRole)
- Inheritance
- Attributes
- Implements
Chat |
Initializes a new instance of the ChatRole struct with the provided value. |
Assistant |
Gets the role that provides responses to system-instructed, user-prompted input. |
System |
Gets the role that instructs or sets the behavior of the assistant. |
Tool |
Gets the role that provides additional information and references for chat completions. |
User |
Gets the role that provides input for chat completions. |
Value |
Gets the value associated with this ChatRole. |
Equals(Chat |
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. |
Get |
Returns the hash code for this instance. |
To |
Returns the fully qualified type name of this instance. |
Equality(Chat |
Returns a value indicating whether two ChatRole instances are equivalent, as determined by a case-insensitive comparison of their values. |
Inequality(Chat |
Returns a value indicating whether two ChatRole instances are not equivalent, as determined by a case-insensitive comparison of their values. |
Prodotto | Versioni |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
Feedback su .NET
.NET è un progetto di open source. Selezionare un collegamento per fornire feedback: