using System.Text.Json.Serialization;
namespace Yi.Framework.AiHub.Domain.Shared.Dtos.OpenAi;
///
/// 对话补全服务返回结果
///
public record ThorChatCompletionsResponse
{
///
/// 对话补全的唯一标识符。
/// 聊天完成的唯一标识符。如果是流式对话,每个区块都具有相同的 ID。
///
[JsonPropertyName("id")]
public string Id { get; set; }
///
/// 用于对话补全的模型。
///
[JsonPropertyName("model")]
public string? Model { get; set; }
///
/// 对象类型
/// 非流式对话补全始终为 chat.completion
/// 流式对话补全始终为 chat.completion.chunk
///
[JsonPropertyName("object")]
public string? ObjectTypeName { get; set; }
///
/// 对话补全选项列表。如果 n 大于 1,则可以是多个。
///
[JsonPropertyName("choices")]
public List? Choices { get; set; }
///
/// 完成请求的使用情况统计信息。
/// 仅在您 stream_options: {"include_usage": true} 设置请求时才会显示。
/// 如果存在,则它包含一个 null 值,但最后一个块除外,该块包含整个请求的令牌使用情况统计信息。
///
[JsonPropertyName("usage")]
public ThorUsageResponse? Usage { get; set; }
///
/// 创建对话补全时的 Unix 时间戳(以秒为单位)。
///
[JsonPropertyName("created")]
public int Created { get; set; }
///
/// 此指纹表示模型运行时使用的后端配置。
/// 可以与 seed 请求参数结合使用,以了解何时进行了可能影响确定性的后端更改。
///
[JsonPropertyName("system_fingerprint")]
public string SystemFingerPrint { get; set; }
///
/// 错误信息
///
[JsonPropertyName("error")]
public ThorError? Error { get; set; }
}