Class: OmniAI::Chat::Delta
- Inherits:
 - 
      Object
      
        
- Object
 - OmniAI::Chat::Delta
 
 
- Defined in:
 - lib/omniai/chat/delta.rb
 
Overview
An ‘OmniAI::Chat::Delta` is used to assist with streaming. It represents a chunk of a conversation that is yielded back to the caller.
Instance Attribute Summary collapse
Instance Method Summary collapse
- 
  
    
      #initialize(text:)  ⇒ Delta 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Delta.
 - #text? ⇒ Boolean
 
Constructor Details
#initialize(text:) ⇒ Delta
Returns a new instance of Delta.
      13 14 15  | 
    
      # File 'lib/omniai/chat/delta.rb', line 13 def initialize(text:) @text = text end  | 
  
Instance Attribute Details
#text ⇒ Object
      10 11 12  | 
    
      # File 'lib/omniai/chat/delta.rb', line 10 def text @text end  | 
  
Instance Method Details
#text? ⇒ Boolean
      18 19 20  | 
    
      # File 'lib/omniai/chat/delta.rb', line 18 def text? !text.empty? end  |