ChatResponse 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.
Represents the response to a chat request.
public ref class ChatResponse
public class ChatResponse
type ChatResponse = class
Public Class ChatResponse
- Inheritance
-
ChatResponse
- Derived
Remarks
ChatResponse provides one or more response messages and metadata about the response. A typical response will contain a single message, however a response may contain multiple messages in a variety of scenarios. For example, if automatic function calling is employed, such that a single request to a IChatClient may actually generate multiple roundtrips to an inner IChatClient it uses, all of the involved messages may be surfaced as part of the final ChatResponse.
Constructors
ChatResponse() |
Initializes a new instance of the ChatResponse class. |
ChatResponse(ChatMessage) |
Initializes a new instance of the ChatResponse class. |
ChatResponse(IList<ChatMessage>) |
Initializes a new instance of the ChatResponse class. |
Properties
AdditionalProperties |
Gets or sets any additional properties associated with the chat response. |
ChatThreadId |
Gets or sets the chat thread ID associated with this chat response. |
CreatedAt |
Gets or sets a timestamp for the chat response. |
FinishReason |
Gets or sets the reason for the chat response. |
Messages |
Gets or sets the chat response messages. |
ModelId |
Gets or sets the model ID used in the creation of the chat response. |
RawRepresentation |
Gets or sets the raw representation of the chat response from an underlying implementation. |
ResponseId |
Gets or sets the ID of the chat response. |
Text |
Gets the text of the response. |
Usage |
Gets or sets usage details for the chat response. |
Methods
ToChatResponseUpdates() |
Creates an array of ChatResponseUpdate instances that represent this ChatResponse. |
ToString() |
Returns a string that represents the current object. |