Class: Ollama::Commands::Version
- Inherits:
-
Object
- Object
- Ollama::Commands::Version
- Defined in:
- lib/ollama/commands/version.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
writeonly
Sets the attribute client.
-
#stream ⇒ Object
readonly
Returns the value of attribute stream.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Version
constructor
A new instance of Version.
- #perform(handler) ⇒ Object
Constructor Details
#initialize ⇒ Version
Returns a new instance of Version.
6 7 8 |
# File 'lib/ollama/commands/version.rb', line 6 def initialize() @stream = false end |
Instance Attribute Details
#client=(value) ⇒ Object (writeonly)
Sets the attribute client
12 13 14 |
# File 'lib/ollama/commands/version.rb', line 12 def client=(value) @client = value end |
#stream ⇒ Object (readonly)
Returns the value of attribute stream.
10 11 12 |
# File 'lib/ollama/commands/version.rb', line 10 def stream @stream end |
Class Method Details
.path ⇒ Object
2 3 4 |
# File 'lib/ollama/commands/version.rb', line 2 def self.path '/api/version' end |
Instance Method Details
#perform(handler) ⇒ Object
14 15 16 |
# File 'lib/ollama/commands/version.rb', line 14 def perform(handler) @client.request(method: :get, path: self.class.path, stream:, handler:) end |