Skip to content

Commit

Permalink
Add new properties to ChatCompletionResponse model
Browse files Browse the repository at this point in the history
Two new properties, 'Created' and 'SystemFingerprint' have been added to the ChatCompletionResponse model in OpenAI.ChatGpt. 'Created' is a Unix timestamp of when the chat completion was created and 'SystemFingerprint' is a string used to understand if backend configuration changes may affect determinism with respect to the model's usage.
  • Loading branch information
rodion-m committed Nov 8, 2023
1 parent 59cee5e commit ae076a1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/OpenAI.ChatGpt/Models/ChatCompletion/ChatCompletionResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,22 @@ public class ChatCompletionResponse
[JsonPropertyName("object")]
public string Object { get; set; }

/// <summary>
/// The Unix timestamp (in seconds) of when the chat completion was created.
/// </summary>
[JsonPropertyName("created")]
public long Created { get; set; }

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

/// <summary>
/// This fingerprint represents the backend configuration that the model runs with.
/// Can be used in conjunction with the <see cref="ChatCompletionRequest.Seed"/> request parameter to understand when backend changes have been made that might impact determinism.
/// </summary>
[JsonPropertyName("system_fingerprint")]
public string SystemFingerprint { get; set; }

[JsonPropertyName("choices")]
public Choice[] Choices { get; set; }

Expand Down

0 comments on commit ae076a1

Please sign in to comment.