Class: Roseflow::OpenAI::ApiResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/roseflow/openai/response.rb

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ ApiResponse

Returns a new instance of ApiResponse.



12
13
14
# File 'lib/roseflow/openai/response.rb', line 12

def initialize(response)
  @response = response
end

Instance Method Details

#bodyObject

Raises:

  • (NotImplementedError)


24
25
26
# File 'lib/roseflow/openai/response.rb', line 24

def body
  raise NotImplementedError, "Subclasses must implement this method."
end

#statusObject



20
21
22
# File 'lib/roseflow/openai/response.rb', line 20

def status
  @response.status
end

#success?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/roseflow/openai/response.rb', line 16

def success?
  @response.success?
end