Class: LLM::Response
- Inherits:
-
Object
- Object
- LLM::Response
- Defined in:
- lib/llm/response.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Completion, Embedding
Instance Attribute Summary collapse
-
#body ⇒ Hash
readonly
Returns the response body.
Instance Method Summary collapse
-
#initialize(res) ⇒ LLM::Response
constructor
Returns an instance of LLM::Response.
Constructor Details
#initialize(res) ⇒ LLM::Response
Returns an instance of LLM::Response
19 20 21 22 |
# File 'lib/llm/response.rb', line 19 def initialize(res) @res = res @body = JSON.parse(res.body) end |
Instance Attribute Details
#body ⇒ Hash (readonly)
Returns the response body
12 13 14 |
# File 'lib/llm/response.rb', line 12 def body @body end |