Class: Ollama::Commands::Version

Inherits:
Object
  • Object
show all
Defined in:
lib/ollama/commands/version.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeVersion

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

Parameters:

  • value

    the value to set the attribute client to.



12
13
14
# File 'lib/ollama/commands/version.rb', line 12

def client=(value)
  @client = value
end

#streamObject (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

.pathObject



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