ToolLoopObservationContext

class ToolLoopObservationContext(val startEvent: ToolLoopStartEvent, val inputMessages: List<Message>)

Thin context for the embabel.tool_loop span: wraps the ToolLoopStartEvent and the inputMessages (the prompt, captured at start). output is set after the loop runs and read by the convention at stop — the only mutable field, since the result is not on the start event.

No cross-thread synchronization is needed: observe{} is synchronous, so output is written and then read (by the convention at stop) on the same thread, with a happens-before from program order.

Constructors

Link copied to clipboard
constructor(startEvent: ToolLoopStartEvent, inputMessages: List<Message>)

Properties

Link copied to clipboard
Link copied to clipboard
var output: Any?
Link copied to clipboard

Functions

Link copied to clipboard
open override fun toString(): String