Sha256: afe5f79ec5eeaeaea56c6ec7e62f98a5931c74a11070aa0f3e5fdb991203b761
Contents?: true
Size: 566 Bytes
Versions: 10
Compression:
Stored size: 566 Bytes
Contents
#!/usr/bin/env ruby require 'time' require 'term/ansicolor' include Term::ANSIColor require 'ollama' include Ollama base_url = ENV['OLLAMA_URL'] || 'http://%s' % ENV.fetch('OLLAMA_HOST') ollama = Client.new(base_url:) ollama.tags.models.each do |model| name, modified_at = model.name, Time.parse(model.modified_at) infobar.puts( "Updating model #{bold {name}} (last modified at #{modified_at.iso8601}):" ) ollama.pull(name:) rescue Ollama::Errors::Error => e infobar.puts "Caught #{e.class} for model #{bold { model.name }}: #{e} => Continuing." end
Version data entries
10 entries across 10 versions & 1 rubygems