class RubyLLM::QueuedMessage
A user message waiting to join a conversation, from Chat#queue. The conversation loop takes it between two of its moves, where it becomes an ordinary user Message.
queued = chat.queue "Use the EU file instead" chat.queued_messages # => [#<RubyLLM::QueuedMessage ...>] queued.withdraw # => true
Attributes
The attachments given with with:, or nil.
The text of the message, as given to Chat#queue.
A String that identifies this message among the chatβs queued ones.
The Time the message was queued.
Whoever queued the message, as given with sender:, or nil. RubyLLM stores it and hands it back without interpreting it.
Public Instance Methods
Source
# File lib/ruby_llm/queued_message.rb, line 45 def steer? @steer end
Returns whether the message steers the turn that is running, joining it at the next step, rather than waiting for the turn to end.
Source
# File lib/ruby_llm/queued_message.rb, line 56 def withdraw !@queue&.delete(self).nil? end
Takes the message out of the queue of the chat it was queued on, as Chat#withdraw does. Returns true, or false when it is no longer queued: the loop took it into the conversation, or it was withdrawn already.
queued.withdraw # => true