class RubyLLM::AgUI::Reservation
The answer to a run reservation: the record that owns the identity, and how the reservation was obtained.
A retried request whose input digest matches an existing reservation gets ATTACHED, so the host streams or reports the run already in progress instead of executing it a second time.
Constants
- ATTACHED
-
The identity was already claimed by an identical request.
- CREATED
-
The identity was free and is now claimed by this call.
Attributes
The record that owns the run identity.
:created or :attached.
Public Class Methods
Source
# File lib/ruby_llm/ag_ui/reservation.rb, line 23 def initialize(record:, status:) @record = record @status = status freeze end
Public Instance Methods
Source
# File lib/ruby_llm/ag_ui/reservation.rb, line 35 def attached? status == ATTACHED end
Whether the identity was already claimed by an identical request.
Source
# File lib/ruby_llm/ag_ui/reservation.rb, line 30 def created? status == CREATED end
Whether this call claimed the identity.
Source
# File lib/ruby_llm/ag_ui/reservation.rb, line 39 def thread_id record.thread_id end
Source
# File lib/ruby_llm/ag_ui/reservation.rb, line 51 def to_h { 'status' => status.to_s, 'threadId' => thread_id, 'runId' => run_id, 'digest' => digest } end