V2 / df3fc286644d
ChatMessage.cs
Lilith/Core/Chat/ChatMessage.cs
Changed in this versionCS
using System.Text.Json.Serialization;
namespace Lilith.Core.Chat;
public record ChatMessage(
[property: JsonPropertyName("role")] string Role,
[property: JsonPropertyName("content")] string Content,
[property: JsonPropertyName("images"), JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] List<string>? Images = null,
[property: JsonIgnore] int? Tokens = null,
[property: JsonPropertyName("tool_calls"), JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] List<Lilith.Core.Tools.ToolCall>? ToolCalls = null,
[property: JsonPropertyName("tool_name"), JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] string? ToolName = null,
[property: JsonIgnore] string? ToolCallId = null);