Table of Contents

Property PayloadEncoding

Namespace
LMKit.Retrieval
Assembly
LM-Kit.NET.dll

PayloadEncoding

Gets the encoding format used to interpret the Payload content for this similarity result.

public string PayloadEncoding { get; }

Property Value

string

A string identifier for the payload encoding, for example "text" for plain UTF-8 text or "base64" for binary/image data.

Examples

PartitionSimilarity match = ragEngine.FindMatchingPartitions("query", topK: 1)[0];

if (match.PayloadEncoding == "text")
{
    Console.WriteLine($"Plain text content: {match.Payload}");
}
else if (match.PayloadEncoding == "base64")
{
    byte[] bytes = Convert.FromBase64String(match.Payload);
    Console.WriteLine($"Binary payload size: {bytes.Length} bytes");
}
Share