Class: Pikuri::Agent::Event::ThinkingDelta

Inherits:
Data
  • Object
show all
Defined in:
lib/pikuri/agent/event.rb

Overview

Streaming fragment of an assistant reasoning block, pulled off a RubyLLM::Chunk during a Chat#ask stream. Emitted by the per-chunk streaming block Pikuri::Agent.streaming_block builds and Pikuri::Agent#run_loop / Synthesizer.run pass to ask; empty fragments are filtered at the dispatch site.

Preview-only, not authoritative: the Thinking event emitted from after_message at the end of the round-trip is the final reasoning text. Providers may normalize whitespace, and Anthropic thinking blocks include a signature that never appears in deltas, so concat(deltas) == final.content is not guaranteed.

Ordering

Per round-trip: all ThinkingDeltas (and AssistantDeltas) for a round arrive before that round’s Thinking / Assistant / Tokens bookend, because the streaming block fires synchronously inside Chat#ask‘s SSE read and after_message fires once the message is complete. Within the delta stream itself, ordering between ThinkingDelta and AssistantDelta is provider-dependent (in practice non-interleaved on Anthropic and OpenAI reasoning models, but pikuri does not enforce it).

Instance Attribute Summary collapse

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content

Returns:

  • (Object)

    the current value of content



85
86
87
# File 'lib/pikuri/agent/event.rb', line 85

def content
  @content
end