class Ollama::Commands::Show

show.model_info # => hash containing model details
show = ollama.show(model: ‘llama3.1’)
@example Retrieving detailed information about a model
show requests for model details.
base command structure and provides the necessary functionality to execute
retrieves detailed information about a specific model. It inherits from the
This class is used to interact with the Ollama API’s show endpoint, which
A command class that represents the show API endpoint for Ollama.

def self.path

Returns:
  • (String) - the API endpoint path '/api/show' for show requests
def self.path
  '/api/show'
end

def initialize(model:, verbose: nil)

Parameters:
  • model (String) -- the name of the model to be used @param verbose [
def initialize(model:, verbose: nil)
  @model, @verbose = model, verbose
  @stream = false
end

def perform(handler)

Returns:
  • (self) - returns the current instance after initiating the request

Parameters:
  • handler (Ollama::Handler) -- the handler object responsible for processing API responses
def perform(handler)
  @client.request(method: :post, path: self.class.path, body: to_json, stream:, handler:)
end