Class: Roseflow::OpenAI::TextApiResponse
- Inherits:
-
ApiResponse
- Object
- ApiResponse
- Roseflow::OpenAI::TextApiResponse
- Defined in:
- lib/roseflow/openai/response.rb
Overview
ApiResponse
Direct Known Subclasses
Instance Method Summary collapse
Methods inherited from ApiResponse
#initialize, #status, #success?
Constructor Details
This class inherits a constructor from Roseflow::OpenAI::ApiResponse
Instance Method Details
#body ⇒ Object
30 31 32 |
# File 'lib/roseflow/openai/response.rb', line 30 def body @body ||= ApiResponseBody.new(JSON.parse(@response.body)) end |
#choices ⇒ Object
34 35 36 |
# File 'lib/roseflow/openai/response.rb', line 34 def choices body.choices.map { |choice| Choice.new(choice) } end |