← All source files

V6 / 920e1e35d097

ChatMessage.cs

Lilith/Core/Chat/ChatMessage.cs

Unchanged from the preceding version
CS
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);