SemanticBlock

org.llm4s.context.SemanticBlock
See theSemanticBlock companion object
@Stable
final case class SemanticBlock

Represents a semantic block of related messages in a conversation.

A semantic block groups logically related messages together, typically a user-assistant exchange with any associated tool calls.

Value parameters

blockType

The classification of this block (pair, standalone, etc.)

expectingAssistantResponse

True if the block is incomplete (awaiting response)

id

Unique identifier for this block

messages

The messages contained in this block

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 getBlockSummary: String

Sets the block classification.

Sets the block classification.

Attributes

def withExpectingAssistantResponse(expectingAssistantResponse: Boolean): SemanticBlock

Sets whether the block awaits an assistant response.

Sets whether the block awaits an assistant response.

Attributes

Sets the block identifier.

Sets the block identifier.

Attributes

def withMessages(messages: Seq[Message]): SemanticBlock

Sets the messages in the block.

Sets the messages in the block.

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product