Class: Ollama::Commands::Tags
- Inherits:
-
Object
- Object
- Ollama::Commands::Tags
- Defined in:
- lib/ollama/commands/tags.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(**parameters) ⇒ Tags
constructor
A new instance of Tags.
- #perform(handler) ⇒ Object
Constructor Details
#initialize(**parameters) ⇒ Tags
Returns a new instance of Tags.
6 7 8 9 10 |
# File 'lib/ollama/commands/tags.rb', line 6 def initialize(**parameters) parameters.empty? or raise ArgumentError, "Invalid parameters: #{parameters.keys * ' '}" @stream = false end |
Instance Attribute Details
#client=(value) ⇒ Object (writeonly)
Sets the attribute client
14 15 16 |
# File 'lib/ollama/commands/tags.rb', line 14 def client=(value) @client = value end |
#stream ⇒ Object (readonly)
Returns the value of attribute stream.
12 13 14 |
# File 'lib/ollama/commands/tags.rb', line 12 def stream @stream end |
Class Method Details
.path ⇒ Object
2 3 4 |
# File 'lib/ollama/commands/tags.rb', line 2 def self.path '/api/tags' end |
Instance Method Details
#perform(handler) ⇒ Object
16 17 18 |
# File 'lib/ollama/commands/tags.rb', line 16 def perform(handler) @client.request(method: :get, path: self.class.path, stream:, handler:) end |