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.



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

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

Instance Attribute Details

#completionObject (readonly)

Returns the value of attribute completion.



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

def completion
  @completion
end