Exception: OpenAI::Helpers::Streaming::LengthFinishReasonError

Inherits:
StreamError
  • Object
show all
Defined in:
lib/openai/helpers/streaming/exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(completion:) ⇒ LengthFinishReasonError

Returns a new instance of LengthFinishReasonError.



11
12
13
14
# File 'lib/openai/helpers/streaming/exceptions.rb', line 11

def initialize(completion:)
  @completion = completion
  super("Stream finished due to length limit")
end

Instance Attribute Details

#completionObject (readonly)

Returns the value of attribute completion.



9
10
11
# File 'lib/openai/helpers/streaming/exceptions.rb', line 9

def completion
  @completion
end