Class: Ollama::Responses::Generate
- Inherits:
-
Base
- Object
- Ollama::Response
- Base
- Ollama::Responses::Generate
- Defined in:
- lib/ollama/responses/generate.rb
Overview
Typed response wrapper for generate endpoints
Instance Method Summary collapse
Methods inherited from Ollama::Response
#[], #content, #created_at, #done?, #done_reason, #eval_count, #eval_duration, #initialize, #latency_ms, #load_duration, #logprobs, #message, #method_missing, #model, #prompt_eval_count, #prompt_eval_duration, #respond_to_missing?, #to_h, #total_duration, #usage
Constructor Details
This class inherits a constructor from Ollama::Response
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Ollama::Response
Instance Method Details
#context ⇒ Object
9 10 11 |
# File 'lib/ollama/responses/generate.rb', line 9 def context @data["context"] || @data[:context] end |
#to_s ⇒ Object
13 14 15 |
# File 'lib/ollama/responses/generate.rb', line 13 def to_s content || "" end |
#to_str ⇒ Object
17 18 19 |
# File 'lib/ollama/responses/generate.rb', line 17 def to_str to_s end |