← All source files

V18 / 8d896b8a86e5

ChatRequest.cs

Lilith/Core/Chat/ChatRequest.cs

Changed in this version
CS
using System.Text.Json.Serialization;

namespace Lilith.Core.Chat;

internal record ChatRequest(
    [property: JsonPropertyName("model")] string Model,
    [property: JsonPropertyName("messages")] List<ChatMessage> Messages,
    [property: JsonPropertyName("stream")] bool Stream,
    [property: JsonPropertyName("options")] ChatOptions? Options = null,
    [property: JsonPropertyName("tools"), JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] object[]? Tools = null,
    [property: JsonPropertyName("format"), JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] System.Text.Json.JsonElement? Format = null);