Table of Contents

Class ChatResponse

Namespace
OpenAI.Chat
Assembly
OpenAI-DotNet.dll
public sealed class ChatResponse : BaseResponse, IServerSentEvent
Inheritance
ChatResponse
Implements
Inherited Members

Constructors

ChatResponse()

public ChatResponse()

Properties

Choices

A list of chat completion choices. Can be more than one if n is greater than 1.

[JsonInclude]
[JsonPropertyName("choices")]
public IReadOnlyList<Choice> Choices { get; }

Property Value

IReadOnlyList<Choice>

CreatedAt

[JsonIgnore]
public DateTime CreatedAt { get; }

Property Value

DateTime

CreatedAtUnixTimeSeconds

The Unix timestamp (in seconds) of when the chat completion was created.

[JsonInclude]
[JsonPropertyName("created")]
public int CreatedAtUnixTimeSeconds { get; }

Property Value

int

FirstChoice

[JsonIgnore]
public Choice FirstChoice { get; }

Property Value

Choice

Id

A unique identifier for the chat completion.

[JsonInclude]
[JsonPropertyName("id")]
public string Id { get; }

Property Value

string

Model

[JsonInclude]
[JsonPropertyName("model")]
public string Model { get; }

Property Value

string

Object

[JsonInclude]
[JsonPropertyName("object")]
public string Object { get; }

Property Value

string

ServiceTier

[JsonInclude]
[JsonPropertyName("service_tier")]
public string ServiceTier { get; }

Property Value

string

SystemFingerprint

This fingerprint represents the backend configuration that the model runs with. Can be used in conjunction with the seed request parameter to understand when backend changes have been made that might impact determinism.

[JsonInclude]
[JsonPropertyName("system_fingerprint")]
public string SystemFingerprint { get; }

Property Value

string

Usage

[JsonInclude]
[JsonPropertyName("usage")]
public Usage Usage { get; }

Property Value

Usage

Methods

GetUsage(bool)

public string GetUsage(bool log = true)

Parameters

log bool

Returns

string

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(ChatResponse)

public static implicit operator string(ChatResponse response)

Parameters

response ChatResponse

Returns

string