using Newtonsoft.Json;
namespace Admin.NET.Core.Ai.Models;
///
/// LLM输出
///
public class LLMOutput {
public string Id { get; set; }
public string Provider { get; set; }
public string Model { get; set; }
public string Object { get; set; }
public long Created { get; set; }
public List Choices { get; set; }
public Usage Usage { get; set; }
}
///
/// LLM输出机会
///
public class ChoicesItem {
[JsonProperty("logprobs")]
public string? Logprobs { get; set; }
public string? FinishReason { get; set; }
public string? NativeFinishReason { get; set; }
public int Index { get; set; }
public OutPutMessage Message { get; set; }
}
///
/// LLM输出消息
///
public class OutPutMessage {
public string Role { get; set; }
public string Content { get; set; }
public Object Refusal { get; set; }
[JsonProperty("reasoning")]
public string? Reasoning { get; set; }
}
///
/// LLM的消耗
///
public class Usage {
public int PromptTokens { get; set; }
public int CompletionTokens { get; set; }
public int TotalTokens { get; set; }
}