Class: Roseflow::OpenRouter::TextApiResponse
- Inherits:
-
ApiResponse
- Object
- ApiResponse
- Roseflow::OpenRouter::TextApiResponse
- Defined in:
- lib/roseflow/open_router/response.rb
Direct Known Subclasses
Instance Method Summary collapse
Methods inherited from ApiResponse
Constructor Details
This class inherits a constructor from Roseflow::OpenRouter::ApiResponse
Instance Method Details
#body ⇒ Object
20 21 22 |
# File 'lib/roseflow/open_router/response.rb', line 20 def body @body ||= FastJsonparser.parse(@response.body) end |
#choices ⇒ Object
24 25 26 |
# File 'lib/roseflow/open_router/response.rb', line 24 def choices body[:choices].map { |choice| Choice.new(choice) } end |