Class ChatCompletion
Inheritance
object
ChatCompletion
Assembly: .dll
Syntax
public class ChatCompletion : ModelResponse, IGenerated
Properties
Choices
A list of chat completion choices. Can be more than one if n is greater than 1.
If this is 'ChatCompletionChunk' which is a streamed response,
This can also be empty for the last chunk if you set stream_options: {"include_usage": true}.
Declaration
public ChatChoice[] Choices { get; set; }
Property Value
Count
Declaration
public int Count { get; }
Property Value
IsEmpty
Declaration
public bool IsEmpty { get; }
Property Value
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.
Declaration
public string SystemFingerprint { get; set; }
Property Value
Methods
GetContents()
Declaration
public Content[] GetContents()
Returns
Declaration
public ToolCall[] GetToolCalls()
Returns
ToContent()
Declaration
public Content ToContent()
Returns
ToDelta()
Declaration
public ChatDelta ToDelta()
Returns
ToMessage()
Declaration
public ChatMessage ToMessage()
Returns
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type |
Description |
string |
A string that represents the current object.
|
Overrides
object.ToString()
ToTextDelta()
Declaration
public string ToTextDelta()
Returns
Operators
implicit operator Content(ChatCompletion)
Declaration
public static implicit operator Content(ChatCompletion chat)
Parameters
Returns
implicit operator string(ChatCompletion)
Declaration
public static implicit operator string(ChatCompletion chat)
Parameters
Returns
Implements