Exception: Ollama::Errors::NotFoundError

Inherits:
Error
  • Object
show all
Defined in:
lib/ollama/errors.rb

Overview

Ollama error class for handling cases where a requested resource is not found.

This exception is raised when the Ollama API returns a 404 status code, indicating that the requested model or resource could not be located.

Examples:

Handling a not found error

begin
  ollama.show(model: 'nonexistent-model')
rescue Ollama::Errors::NotFoundError
  puts "Model was not found"
end