Table of Contents

Struct LiteRtStreamChunk

Namespace
LiteRtLmSharp
Assembly
LiteRtLmSharp.dll

One streamed piece of a reply from SendStreamingAsync(string, CancellationToken). Kind says what it is: an Answer or Thinking text delta (concatenate same-kind chunks in order to rebuild each), a ToolCall carrying the model's tool calls, or an opt-in ToolCallDelta raw progress fragment. Text is the delta for the text kinds (empty for complete tool calls); ToolCalls is populated only for the tool-call kind.

public readonly record struct LiteRtStreamChunk : IEquatable<LiteRtStreamChunk>
Implements
Inherited Members

Properties

IsThinking

Shorthand for Kind == Thinking. Note that a chunk where this is false may be an Answer OR a ToolCall; switch on Kind when the conversation has tools.

public bool IsThinking { get; }

Property Value

bool

Kind

Whether this chunk is answer text, reasoning text, or a tool call.

public LiteRtStreamChunkKind Kind { get; }

Property Value

LiteRtStreamChunkKind

Text

The text delta for Answer / Thinking chunks; empty for tool-call chunks.

public string Text { get; }

Property Value

string

ToolCalls

The tool calls for a ToolCall chunk; empty otherwise.

public IReadOnlyList<LiteRtToolCall> ToolCalls { get; }

Property Value

IReadOnlyList<LiteRtToolCall>