StreamedChunk

org.llm4s.llmconnect.model.StreamedChunk
See theStreamedChunk companion object
@Stable
final case class StreamedChunk

Represents a streamed chunk of completion data.

Value parameters

content

Optional text content delta.

finishReason

Optional reason for stream completion.

id

Unique identifier for the stream.

thinkingDelta

Optional thinking/reasoning content delta. Present when streaming extended thinking content.

toolCall

Optional tool call information.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def hasContent: Boolean

Check if this chunk contains main content.

Check if this chunk contains main content.

Attributes

def hasThinking: Boolean

Check if this chunk contains thinking content.

Check if this chunk contains thinking content.

Attributes

def withContent(content: String): StreamedChunk
def withContent(content: Option[String]): StreamedChunk
def withFinishReason(finishReason: String): StreamedChunk
def withFinishReason(finishReason: Option[String]): StreamedChunk
def withId(id: String): StreamedChunk
def withThinkingDelta(thinkingDelta: String): StreamedChunk
def withThinkingDelta(thinkingDelta: Option[String]): StreamedChunk
def withToolCall(toolCall: Option[ToolCall]): StreamedChunk

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product